wp/wp-includes/js/dist/edit-site.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /******/ (function() { // webpackBootstrap
     1 /******/ (() => { // webpackBootstrap
     2 /******/ 	var __webpack_modules__ = ({
     2 /******/ 	var __webpack_modules__ = ({
     3 
     3 
     4 /***/ 6411:
     4 /***/ 4660:
     5 /***/ (function(module, exports) {
     5 /***/ ((module) => {
     6 
     6 
     7 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
     7 /* eslint eslint-comments/no-unlimited-disable: 0 */
     8 	autosize 4.0.4
     8 /* eslint-disable */
     9 	license: MIT
     9 /* pako 1.0.10 nodeca/pako */ ( function ( f ) {
    10 	http://www.jacklmoore.com/autosize
    10 	if ( true ) {
    11 */
    11 		module.exports = f();
    12 (function (global, factory) {
    12 	} else { var g; }
    13 	if (true) {
    13 } )( function () {
    14 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
    14 	var define, module, exports;
    15 		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
    15 	return ( function () {
    16 		(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
    16 		function r( e, n, t ) {
    17 		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    17 			function o( i, f ) {
    18 	} else { var mod; }
    18 				if ( ! n[ i ] ) {
    19 })(this, function (module, exports) {
    19 					if ( ! e[ i ] ) {
    20 	'use strict';
    20 						var c = undefined;
    21 
    21 						if ( ! f && c ) return require( i, ! 0 );
    22 	var map = typeof Map === "function" ? new Map() : function () {
    22 						if ( u ) return u( i, ! 0 );
    23 		var keys = [];
    23 						var a = new Error( "Cannot find module '" + i + "'" );
    24 		var values = [];
    24 						throw ( ( a.code = 'MODULE_NOT_FOUND' ), a );
    25 
    25 					}
    26 		return {
    26 					var p = ( n[ i ] = { exports: {} } );
    27 			has: function has(key) {
    27 					e[ i ][ 0 ].call(
    28 				return keys.indexOf(key) > -1;
    28 						p.exports,
    29 			},
    29 						function ( r ) {
    30 			get: function get(key) {
    30 							var n = e[ i ][ 1 ][ r ];
    31 				return values[keys.indexOf(key)];
    31 							return o( n || r );
    32 			},
    32 						},
    33 			set: function set(key, value) {
    33 						p,
    34 				if (keys.indexOf(key) === -1) {
    34 						p.exports,
    35 					keys.push(key);
    35 						r,
    36 					values.push(value);
    36 						e,
       
    37 						n,
       
    38 						t
       
    39 					);
    37 				}
    40 				}
    38 			},
    41 				return n[ i ].exports;
    39 			delete: function _delete(key) {
       
    40 				var index = keys.indexOf(key);
       
    41 				if (index > -1) {
       
    42 					keys.splice(index, 1);
       
    43 					values.splice(index, 1);
       
    44 				}
       
    45 			}
    42 			}
    46 		};
    43 			for (
    47 	}();
    44 				var u = undefined, i = 0;
    48 
    45 				i < t.length;
    49 	var createEvent = function createEvent(name) {
    46 				i++
    50 		return new Event(name, { bubbles: true });
    47 			)
    51 	};
    48 				o( t[ i ] );
    52 	try {
    49 			return o;
    53 		new Event('test');
       
    54 	} catch (e) {
       
    55 		// IE does not support `new Event()`
       
    56 		createEvent = function createEvent(name) {
       
    57 			var evt = document.createEvent('Event');
       
    58 			evt.initEvent(name, true, false);
       
    59 			return evt;
       
    60 		};
       
    61 	}
       
    62 
       
    63 	function assign(ta) {
       
    64 		if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
       
    65 
       
    66 		var heightOffset = null;
       
    67 		var clientWidth = null;
       
    68 		var cachedHeight = null;
       
    69 
       
    70 		function init() {
       
    71 			var style = window.getComputedStyle(ta, null);
       
    72 
       
    73 			if (style.resize === 'vertical') {
       
    74 				ta.style.resize = 'none';
       
    75 			} else if (style.resize === 'both') {
       
    76 				ta.style.resize = 'horizontal';
       
    77 			}
       
    78 
       
    79 			if (style.boxSizing === 'content-box') {
       
    80 				heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
       
    81 			} else {
       
    82 				heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
       
    83 			}
       
    84 			// Fix when a textarea is not on document body and heightOffset is Not a Number
       
    85 			if (isNaN(heightOffset)) {
       
    86 				heightOffset = 0;
       
    87 			}
       
    88 
       
    89 			update();
       
    90 		}
    50 		}
    91 
    51 		return r;
    92 		function changeOverflow(value) {
    52 	} )()(
    93 			{
    53 		{
    94 				// Chrome/Safari-specific fix:
    54 			1: [
    95 				// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
    55 				function ( require, module, exports ) {
    96 				// made available by removing the scrollbar. The following forces the necessary text reflow.
    56 					'use strict';
    97 				var width = ta.style.width;
    57 
    98 				ta.style.width = '0px';
    58 					var TYPED_OK =
    99 				// Force reflow:
    59 						typeof Uint8Array !== 'undefined' &&
   100 				/* jshint ignore:start */
    60 						typeof Uint16Array !== 'undefined' &&
   101 				ta.offsetWidth;
    61 						typeof Int32Array !== 'undefined';
   102 				/* jshint ignore:end */
    62 
   103 				ta.style.width = width;
    63 					function _has( obj, key ) {
   104 			}
    64 						return Object.prototype.hasOwnProperty.call( obj, key );
   105 
       
   106 			ta.style.overflowY = value;
       
   107 		}
       
   108 
       
   109 		function getParentOverflows(el) {
       
   110 			var arr = [];
       
   111 
       
   112 			while (el && el.parentNode && el.parentNode instanceof Element) {
       
   113 				if (el.parentNode.scrollTop) {
       
   114 					arr.push({
       
   115 						node: el.parentNode,
       
   116 						scrollTop: el.parentNode.scrollTop
       
   117 					});
       
   118 				}
       
   119 				el = el.parentNode;
       
   120 			}
       
   121 
       
   122 			return arr;
       
   123 		}
       
   124 
       
   125 		function resize() {
       
   126 			if (ta.scrollHeight === 0) {
       
   127 				// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
       
   128 				return;
       
   129 			}
       
   130 
       
   131 			var overflows = getParentOverflows(ta);
       
   132 			var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
       
   133 
       
   134 			ta.style.height = '';
       
   135 			ta.style.height = ta.scrollHeight + heightOffset + 'px';
       
   136 
       
   137 			// used to check if an update is actually necessary on window.resize
       
   138 			clientWidth = ta.clientWidth;
       
   139 
       
   140 			// prevents scroll-position jumping
       
   141 			overflows.forEach(function (el) {
       
   142 				el.node.scrollTop = el.scrollTop;
       
   143 			});
       
   144 
       
   145 			if (docTop) {
       
   146 				document.documentElement.scrollTop = docTop;
       
   147 			}
       
   148 		}
       
   149 
       
   150 		function update() {
       
   151 			resize();
       
   152 
       
   153 			var styleHeight = Math.round(parseFloat(ta.style.height));
       
   154 			var computed = window.getComputedStyle(ta, null);
       
   155 
       
   156 			// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
       
   157 			var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
       
   158 
       
   159 			// The actual height not matching the style height (set via the resize method) indicates that 
       
   160 			// the max-height has been exceeded, in which case the overflow should be allowed.
       
   161 			if (actualHeight < styleHeight) {
       
   162 				if (computed.overflowY === 'hidden') {
       
   163 					changeOverflow('scroll');
       
   164 					resize();
       
   165 					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
       
   166 				}
       
   167 			} else {
       
   168 				// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
       
   169 				if (computed.overflowY !== 'hidden') {
       
   170 					changeOverflow('hidden');
       
   171 					resize();
       
   172 					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
       
   173 				}
       
   174 			}
       
   175 
       
   176 			if (cachedHeight !== actualHeight) {
       
   177 				cachedHeight = actualHeight;
       
   178 				var evt = createEvent('autosize:resized');
       
   179 				try {
       
   180 					ta.dispatchEvent(evt);
       
   181 				} catch (err) {
       
   182 					// Firefox will throw an error on dispatchEvent for a detached element
       
   183 					// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
       
   184 				}
       
   185 			}
       
   186 		}
       
   187 
       
   188 		var pageResize = function pageResize() {
       
   189 			if (ta.clientWidth !== clientWidth) {
       
   190 				update();
       
   191 			}
       
   192 		};
       
   193 
       
   194 		var destroy = function (style) {
       
   195 			window.removeEventListener('resize', pageResize, false);
       
   196 			ta.removeEventListener('input', update, false);
       
   197 			ta.removeEventListener('keyup', update, false);
       
   198 			ta.removeEventListener('autosize:destroy', destroy, false);
       
   199 			ta.removeEventListener('autosize:update', update, false);
       
   200 
       
   201 			Object.keys(style).forEach(function (key) {
       
   202 				ta.style[key] = style[key];
       
   203 			});
       
   204 
       
   205 			map.delete(ta);
       
   206 		}.bind(ta, {
       
   207 			height: ta.style.height,
       
   208 			resize: ta.style.resize,
       
   209 			overflowY: ta.style.overflowY,
       
   210 			overflowX: ta.style.overflowX,
       
   211 			wordWrap: ta.style.wordWrap
       
   212 		});
       
   213 
       
   214 		ta.addEventListener('autosize:destroy', destroy, false);
       
   215 
       
   216 		// IE9 does not fire onpropertychange or oninput for deletions,
       
   217 		// so binding to onkeyup to catch most of those events.
       
   218 		// There is no way that I know of to detect something like 'cut' in IE9.
       
   219 		if ('onpropertychange' in ta && 'oninput' in ta) {
       
   220 			ta.addEventListener('keyup', update, false);
       
   221 		}
       
   222 
       
   223 		window.addEventListener('resize', pageResize, false);
       
   224 		ta.addEventListener('input', update, false);
       
   225 		ta.addEventListener('autosize:update', update, false);
       
   226 		ta.style.overflowX = 'hidden';
       
   227 		ta.style.wordWrap = 'break-word';
       
   228 
       
   229 		map.set(ta, {
       
   230 			destroy: destroy,
       
   231 			update: update
       
   232 		});
       
   233 
       
   234 		init();
       
   235 	}
       
   236 
       
   237 	function destroy(ta) {
       
   238 		var methods = map.get(ta);
       
   239 		if (methods) {
       
   240 			methods.destroy();
       
   241 		}
       
   242 	}
       
   243 
       
   244 	function update(ta) {
       
   245 		var methods = map.get(ta);
       
   246 		if (methods) {
       
   247 			methods.update();
       
   248 		}
       
   249 	}
       
   250 
       
   251 	var autosize = null;
       
   252 
       
   253 	// Do nothing in Node.js environment and IE8 (or lower)
       
   254 	if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
       
   255 		autosize = function autosize(el) {
       
   256 			return el;
       
   257 		};
       
   258 		autosize.destroy = function (el) {
       
   259 			return el;
       
   260 		};
       
   261 		autosize.update = function (el) {
       
   262 			return el;
       
   263 		};
       
   264 	} else {
       
   265 		autosize = function autosize(el, options) {
       
   266 			if (el) {
       
   267 				Array.prototype.forEach.call(el.length ? el : [el], function (x) {
       
   268 					return assign(x, options);
       
   269 				});
       
   270 			}
       
   271 			return el;
       
   272 		};
       
   273 		autosize.destroy = function (el) {
       
   274 			if (el) {
       
   275 				Array.prototype.forEach.call(el.length ? el : [el], destroy);
       
   276 			}
       
   277 			return el;
       
   278 		};
       
   279 		autosize.update = function (el) {
       
   280 			if (el) {
       
   281 				Array.prototype.forEach.call(el.length ? el : [el], update);
       
   282 			}
       
   283 			return el;
       
   284 		};
       
   285 	}
       
   286 
       
   287 	exports.default = autosize;
       
   288 	module.exports = exports['default'];
       
   289 });
       
   290 
       
   291 /***/ }),
       
   292 
       
   293 /***/ 4403:
       
   294 /***/ (function(module, exports) {
       
   295 
       
   296 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
       
   297   Copyright (c) 2018 Jed Watson.
       
   298   Licensed under the MIT License (MIT), see
       
   299   http://jedwatson.github.io/classnames
       
   300 */
       
   301 /* global define */
       
   302 
       
   303 (function () {
       
   304 	'use strict';
       
   305 
       
   306 	var hasOwn = {}.hasOwnProperty;
       
   307 
       
   308 	function classNames() {
       
   309 		var classes = [];
       
   310 
       
   311 		for (var i = 0; i < arguments.length; i++) {
       
   312 			var arg = arguments[i];
       
   313 			if (!arg) continue;
       
   314 
       
   315 			var argType = typeof arg;
       
   316 
       
   317 			if (argType === 'string' || argType === 'number') {
       
   318 				classes.push(arg);
       
   319 			} else if (Array.isArray(arg)) {
       
   320 				if (arg.length) {
       
   321 					var inner = classNames.apply(null, arg);
       
   322 					if (inner) {
       
   323 						classes.push(inner);
       
   324 					}
    65 					}
   325 				}
    66 
   326 			} else if (argType === 'object') {
    67 					exports.assign = function (
   327 				if (arg.toString === Object.prototype.toString) {
    68 						obj /*from1, from2, from3, ...*/
   328 					for (var key in arg) {
    69 					) {
   329 						if (hasOwn.call(arg, key) && arg[key]) {
    70 						var sources = Array.prototype.slice.call(
   330 							classes.push(key);
    71 							arguments,
       
    72 							1
       
    73 						);
       
    74 						while ( sources.length ) {
       
    75 							var source = sources.shift();
       
    76 							if ( ! source ) {
       
    77 								continue;
       
    78 							}
       
    79 
       
    80 							if ( typeof source !== 'object' ) {
       
    81 								throw new TypeError(
       
    82 									source + 'must be non-object'
       
    83 								);
       
    84 							}
       
    85 
       
    86 							for ( var p in source ) {
       
    87 								if ( _has( source, p ) ) {
       
    88 									obj[ p ] = source[ p ];
       
    89 								}
       
    90 							}
       
    91 						}
       
    92 
       
    93 						return obj;
       
    94 					};
       
    95 
       
    96 					// reduce buffer size, avoiding mem copy
       
    97 					exports.shrinkBuf = function ( buf, size ) {
       
    98 						if ( buf.length === size ) {
       
    99 							return buf;
       
   100 						}
       
   101 						if ( buf.subarray ) {
       
   102 							return buf.subarray( 0, size );
       
   103 						}
       
   104 						buf.length = size;
       
   105 						return buf;
       
   106 					};
       
   107 
       
   108 					var fnTyped = {
       
   109 						arraySet: function (
       
   110 							dest,
       
   111 							src,
       
   112 							src_offs,
       
   113 							len,
       
   114 							dest_offs
       
   115 						) {
       
   116 							if ( src.subarray && dest.subarray ) {
       
   117 								dest.set(
       
   118 									src.subarray( src_offs, src_offs + len ),
       
   119 									dest_offs
       
   120 								);
       
   121 								return;
       
   122 							}
       
   123 							// Fallback to ordinary array
       
   124 							for ( var i = 0; i < len; i++ ) {
       
   125 								dest[ dest_offs + i ] = src[ src_offs + i ];
       
   126 							}
       
   127 						},
       
   128 						// Join array of chunks to single array.
       
   129 						flattenChunks: function ( chunks ) {
       
   130 							var i, l, len, pos, chunk, result;
       
   131 
       
   132 							// calculate data length
       
   133 							len = 0;
       
   134 							for ( i = 0, l = chunks.length; i < l; i++ ) {
       
   135 								len += chunks[ i ].length;
       
   136 							}
       
   137 
       
   138 							// join chunks
       
   139 							result = new Uint8Array( len );
       
   140 							pos = 0;
       
   141 							for ( i = 0, l = chunks.length; i < l; i++ ) {
       
   142 								chunk = chunks[ i ];
       
   143 								result.set( chunk, pos );
       
   144 								pos += chunk.length;
       
   145 							}
       
   146 
       
   147 							return result;
       
   148 						},
       
   149 					};
       
   150 
       
   151 					var fnUntyped = {
       
   152 						arraySet: function (
       
   153 							dest,
       
   154 							src,
       
   155 							src_offs,
       
   156 							len,
       
   157 							dest_offs
       
   158 						) {
       
   159 							for ( var i = 0; i < len; i++ ) {
       
   160 								dest[ dest_offs + i ] = src[ src_offs + i ];
       
   161 							}
       
   162 						},
       
   163 						// Join array of chunks to single array.
       
   164 						flattenChunks: function ( chunks ) {
       
   165 							return [].concat.apply( [], chunks );
       
   166 						},
       
   167 					};
       
   168 
       
   169 					// Enable/Disable typed arrays use, for testing
       
   170 					//
       
   171 					exports.setTyped = function ( on ) {
       
   172 						if ( on ) {
       
   173 							exports.Buf8 = Uint8Array;
       
   174 							exports.Buf16 = Uint16Array;
       
   175 							exports.Buf32 = Int32Array;
       
   176 							exports.assign( exports, fnTyped );
       
   177 						} else {
       
   178 							exports.Buf8 = Array;
       
   179 							exports.Buf16 = Array;
       
   180 							exports.Buf32 = Array;
       
   181 							exports.assign( exports, fnUntyped );
       
   182 						}
       
   183 					};
       
   184 
       
   185 					exports.setTyped( TYPED_OK );
       
   186 				},
       
   187 				{},
       
   188 			],
       
   189 			2: [
       
   190 				function ( require, module, exports ) {
       
   191 					// String encode/decode helpers
       
   192 					'use strict';
       
   193 
       
   194 					var utils = require( './common' );
       
   195 
       
   196 					// Quick check if we can use fast array to bin string conversion
       
   197 					//
       
   198 					// - apply(Array) can fail on Android 2.2
       
   199 					// - apply(Uint8Array) can fail on iOS 5.1 Safari
       
   200 					//
       
   201 					var STR_APPLY_OK = true;
       
   202 					var STR_APPLY_UIA_OK = true;
       
   203 
       
   204 					try {
       
   205 						String.fromCharCode.apply( null, [ 0 ] );
       
   206 					} catch ( __ ) {
       
   207 						STR_APPLY_OK = false;
       
   208 					}
       
   209 					try {
       
   210 						String.fromCharCode.apply( null, new Uint8Array( 1 ) );
       
   211 					} catch ( __ ) {
       
   212 						STR_APPLY_UIA_OK = false;
       
   213 					}
       
   214 
       
   215 					// Table with utf8 lengths (calculated by first byte of sequence)
       
   216 					// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
       
   217 					// because max possible codepoint is 0x10ffff
       
   218 					var _utf8len = new utils.Buf8( 256 );
       
   219 					for ( var q = 0; q < 256; q++ ) {
       
   220 						_utf8len[ q ] =
       
   221 							q >= 252
       
   222 								? 6
       
   223 								: q >= 248
       
   224 								? 5
       
   225 								: q >= 240
       
   226 								? 4
       
   227 								: q >= 224
       
   228 								? 3
       
   229 								: q >= 192
       
   230 								? 2
       
   231 								: 1;
       
   232 					}
       
   233 					_utf8len[ 254 ] = _utf8len[ 254 ] = 1; // Invalid sequence start
       
   234 
       
   235 					// convert string to array (typed, when possible)
       
   236 					exports.string2buf = function ( str ) {
       
   237 						var buf,
       
   238 							c,
       
   239 							c2,
       
   240 							m_pos,
       
   241 							i,
       
   242 							str_len = str.length,
       
   243 							buf_len = 0;
       
   244 
       
   245 						// count binary size
       
   246 						for ( m_pos = 0; m_pos < str_len; m_pos++ ) {
       
   247 							c = str.charCodeAt( m_pos );
       
   248 							if (
       
   249 								( c & 0xfc00 ) === 0xd800 &&
       
   250 								m_pos + 1 < str_len
       
   251 							) {
       
   252 								c2 = str.charCodeAt( m_pos + 1 );
       
   253 								if ( ( c2 & 0xfc00 ) === 0xdc00 ) {
       
   254 									c =
       
   255 										0x10000 +
       
   256 										( ( c - 0xd800 ) << 10 ) +
       
   257 										( c2 - 0xdc00 );
       
   258 									m_pos++;
       
   259 								}
       
   260 							}
       
   261 							buf_len +=
       
   262 								c < 0x80
       
   263 									? 1
       
   264 									: c < 0x800
       
   265 									? 2
       
   266 									: c < 0x10000
       
   267 									? 3
       
   268 									: 4;
       
   269 						}
       
   270 
       
   271 						// allocate buffer
       
   272 						buf = new utils.Buf8( buf_len );
       
   273 
       
   274 						// convert
       
   275 						for ( i = 0, m_pos = 0; i < buf_len; m_pos++ ) {
       
   276 							c = str.charCodeAt( m_pos );
       
   277 							if (
       
   278 								( c & 0xfc00 ) === 0xd800 &&
       
   279 								m_pos + 1 < str_len
       
   280 							) {
       
   281 								c2 = str.charCodeAt( m_pos + 1 );
       
   282 								if ( ( c2 & 0xfc00 ) === 0xdc00 ) {
       
   283 									c =
       
   284 										0x10000 +
       
   285 										( ( c - 0xd800 ) << 10 ) +
       
   286 										( c2 - 0xdc00 );
       
   287 									m_pos++;
       
   288 								}
       
   289 							}
       
   290 							if ( c < 0x80 ) {
       
   291 								/* one byte */
       
   292 								buf[ i++ ] = c;
       
   293 							} else if ( c < 0x800 ) {
       
   294 								/* two bytes */
       
   295 								buf[ i++ ] = 0xc0 | ( c >>> 6 );
       
   296 								buf[ i++ ] = 0x80 | ( c & 0x3f );
       
   297 							} else if ( c < 0x10000 ) {
       
   298 								/* three bytes */
       
   299 								buf[ i++ ] = 0xe0 | ( c >>> 12 );
       
   300 								buf[ i++ ] = 0x80 | ( ( c >>> 6 ) & 0x3f );
       
   301 								buf[ i++ ] = 0x80 | ( c & 0x3f );
       
   302 							} else {
       
   303 								/* four bytes */
       
   304 								buf[ i++ ] = 0xf0 | ( c >>> 18 );
       
   305 								buf[ i++ ] = 0x80 | ( ( c >>> 12 ) & 0x3f );
       
   306 								buf[ i++ ] = 0x80 | ( ( c >>> 6 ) & 0x3f );
       
   307 								buf[ i++ ] = 0x80 | ( c & 0x3f );
       
   308 							}
       
   309 						}
       
   310 
       
   311 						return buf;
       
   312 					};
       
   313 
       
   314 					// Helper (used in 2 places)
       
   315 					function buf2binstring( buf, len ) {
       
   316 						// On Chrome, the arguments in a function call that are allowed is `65534`.
       
   317 						// If the length of the buffer is smaller than that, we can use this optimization,
       
   318 						// otherwise we will take a slower path.
       
   319 						if ( len < 65534 ) {
       
   320 							if (
       
   321 								( buf.subarray && STR_APPLY_UIA_OK ) ||
       
   322 								( ! buf.subarray && STR_APPLY_OK )
       
   323 							) {
       
   324 								return String.fromCharCode.apply(
       
   325 									null,
       
   326 									utils.shrinkBuf( buf, len )
       
   327 								);
       
   328 							}
       
   329 						}
       
   330 
       
   331 						var result = '';
       
   332 						for ( var i = 0; i < len; i++ ) {
       
   333 							result += String.fromCharCode( buf[ i ] );
       
   334 						}
       
   335 						return result;
       
   336 					}
       
   337 
       
   338 					// Convert byte array to binary string
       
   339 					exports.buf2binstring = function ( buf ) {
       
   340 						return buf2binstring( buf, buf.length );
       
   341 					};
       
   342 
       
   343 					// Convert binary string (typed, when possible)
       
   344 					exports.binstring2buf = function ( str ) {
       
   345 						var buf = new utils.Buf8( str.length );
       
   346 						for ( var i = 0, len = buf.length; i < len; i++ ) {
       
   347 							buf[ i ] = str.charCodeAt( i );
       
   348 						}
       
   349 						return buf;
       
   350 					};
       
   351 
       
   352 					// convert array to string
       
   353 					exports.buf2string = function ( buf, max ) {
       
   354 						var i, out, c, c_len;
       
   355 						var len = max || buf.length;
       
   356 
       
   357 						// Reserve max possible length (2 words per char)
       
   358 						// NB: by unknown reasons, Array is significantly faster for
       
   359 						//     String.fromCharCode.apply than Uint16Array.
       
   360 						var utf16buf = new Array( len * 2 );
       
   361 
       
   362 						for ( out = 0, i = 0; i < len;  ) {
       
   363 							c = buf[ i++ ];
       
   364 							// quick process ascii
       
   365 							if ( c < 0x80 ) {
       
   366 								utf16buf[ out++ ] = c;
       
   367 								continue;
       
   368 							}
       
   369 
       
   370 							c_len = _utf8len[ c ];
       
   371 							// skip 5 & 6 byte codes
       
   372 							if ( c_len > 4 ) {
       
   373 								utf16buf[ out++ ] = 0xfffd;
       
   374 								i += c_len - 1;
       
   375 								continue;
       
   376 							}
       
   377 
       
   378 							// apply mask on first byte
       
   379 							c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
       
   380 							// join the rest
       
   381 							while ( c_len > 1 && i < len ) {
       
   382 								c = ( c << 6 ) | ( buf[ i++ ] & 0x3f );
       
   383 								c_len--;
       
   384 							}
       
   385 
       
   386 							// terminated by end of string?
       
   387 							if ( c_len > 1 ) {
       
   388 								utf16buf[ out++ ] = 0xfffd;
       
   389 								continue;
       
   390 							}
       
   391 
       
   392 							if ( c < 0x10000 ) {
       
   393 								utf16buf[ out++ ] = c;
       
   394 							} else {
       
   395 								c -= 0x10000;
       
   396 								utf16buf[ out++ ] =
       
   397 									0xd800 | ( ( c >> 10 ) & 0x3ff );
       
   398 								utf16buf[ out++ ] = 0xdc00 | ( c & 0x3ff );
       
   399 							}
       
   400 						}
       
   401 
       
   402 						return buf2binstring( utf16buf, out );
       
   403 					};
       
   404 
       
   405 					// Calculate max possible position in utf8 buffer,
       
   406 					// that will not break sequence. If that's not possible
       
   407 					// - (very small limits) return max size as is.
       
   408 					//
       
   409 					// buf[] - utf8 bytes array
       
   410 					// max   - length limit (mandatory);
       
   411 					exports.utf8border = function ( buf, max ) {
       
   412 						var pos;
       
   413 
       
   414 						max = max || buf.length;
       
   415 						if ( max > buf.length ) {
       
   416 							max = buf.length;
       
   417 						}
       
   418 
       
   419 						// go back from last position, until start of sequence found
       
   420 						pos = max - 1;
       
   421 						while ( pos >= 0 && ( buf[ pos ] & 0xc0 ) === 0x80 ) {
       
   422 							pos--;
       
   423 						}
       
   424 
       
   425 						// Very small and broken sequence,
       
   426 						// return max, because we should return something anyway.
       
   427 						if ( pos < 0 ) {
       
   428 							return max;
       
   429 						}
       
   430 
       
   431 						// If we came to start of buffer - that means buffer is too small,
       
   432 						// return max too.
       
   433 						if ( pos === 0 ) {
       
   434 							return max;
       
   435 						}
       
   436 
       
   437 						return pos + _utf8len[ buf[ pos ] ] > max ? pos : max;
       
   438 					};
       
   439 				},
       
   440 				{ './common': 1 },
       
   441 			],
       
   442 			3: [
       
   443 				function ( require, module, exports ) {
       
   444 					'use strict';
       
   445 
       
   446 					// Note: adler32 takes 12% for level 0 and 2% for level 6.
       
   447 					// It isn't worth it to make additional optimizations as in original.
       
   448 					// Small size is preferable.
       
   449 
       
   450 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
   451 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
   452 					//
       
   453 					// This software is provided 'as-is', without any express or implied
       
   454 					// warranty. In no event will the authors be held liable for any damages
       
   455 					// arising from the use of this software.
       
   456 					//
       
   457 					// Permission is granted to anyone to use this software for any purpose,
       
   458 					// including commercial applications, and to alter it and redistribute it
       
   459 					// freely, subject to the following restrictions:
       
   460 					//
       
   461 					// 1. The origin of this software must not be misrepresented; you must not
       
   462 					//   claim that you wrote the original software. If you use this software
       
   463 					//   in a product, an acknowledgment in the product documentation would be
       
   464 					//   appreciated but is not required.
       
   465 					// 2. Altered source versions must be plainly marked as such, and must not be
       
   466 					//   misrepresented as being the original software.
       
   467 					// 3. This notice may not be removed or altered from any source distribution.
       
   468 
       
   469 					function adler32( adler, buf, len, pos ) {
       
   470 						var s1 = ( adler & 0xffff ) | 0,
       
   471 							s2 = ( ( adler >>> 16 ) & 0xffff ) | 0,
       
   472 							n = 0;
       
   473 
       
   474 						while ( len !== 0 ) {
       
   475 							// Set limit ~ twice less than 5552, to keep
       
   476 							// s2 in 31-bits, because we force signed ints.
       
   477 							// in other case %= will fail.
       
   478 							n = len > 2000 ? 2000 : len;
       
   479 							len -= n;
       
   480 
       
   481 							do {
       
   482 								s1 = ( s1 + buf[ pos++ ] ) | 0;
       
   483 								s2 = ( s2 + s1 ) | 0;
       
   484 							} while ( --n );
       
   485 
       
   486 							s1 %= 65521;
       
   487 							s2 %= 65521;
       
   488 						}
       
   489 
       
   490 						return s1 | ( s2 << 16 ) | 0;
       
   491 					}
       
   492 
       
   493 					module.exports = adler32;
       
   494 				},
       
   495 				{},
       
   496 			],
       
   497 			4: [
       
   498 				function ( require, module, exports ) {
       
   499 					'use strict';
       
   500 
       
   501 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
   502 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
   503 					//
       
   504 					// This software is provided 'as-is', without any express or implied
       
   505 					// warranty. In no event will the authors be held liable for any damages
       
   506 					// arising from the use of this software.
       
   507 					//
       
   508 					// Permission is granted to anyone to use this software for any purpose,
       
   509 					// including commercial applications, and to alter it and redistribute it
       
   510 					// freely, subject to the following restrictions:
       
   511 					//
       
   512 					// 1. The origin of this software must not be misrepresented; you must not
       
   513 					//   claim that you wrote the original software. If you use this software
       
   514 					//   in a product, an acknowledgment in the product documentation would be
       
   515 					//   appreciated but is not required.
       
   516 					// 2. Altered source versions must be plainly marked as such, and must not be
       
   517 					//   misrepresented as being the original software.
       
   518 					// 3. This notice may not be removed or altered from any source distribution.
       
   519 
       
   520 					module.exports = {
       
   521 						/* Allowed flush values; see deflate() and inflate() below for details */
       
   522 						Z_NO_FLUSH: 0,
       
   523 						Z_PARTIAL_FLUSH: 1,
       
   524 						Z_SYNC_FLUSH: 2,
       
   525 						Z_FULL_FLUSH: 3,
       
   526 						Z_FINISH: 4,
       
   527 						Z_BLOCK: 5,
       
   528 						Z_TREES: 6,
       
   529 
       
   530 						/* Return codes for the compression/decompression functions. Negative values
       
   531 						 * are errors, positive values are used for special but normal events.
       
   532 						 */
       
   533 						Z_OK: 0,
       
   534 						Z_STREAM_END: 1,
       
   535 						Z_NEED_DICT: 2,
       
   536 						Z_ERRNO: -1,
       
   537 						Z_STREAM_ERROR: -2,
       
   538 						Z_DATA_ERROR: -3,
       
   539 						//Z_MEM_ERROR:     -4,
       
   540 						Z_BUF_ERROR: -5,
       
   541 						//Z_VERSION_ERROR: -6,
       
   542 
       
   543 						/* compression levels */
       
   544 						Z_NO_COMPRESSION: 0,
       
   545 						Z_BEST_SPEED: 1,
       
   546 						Z_BEST_COMPRESSION: 9,
       
   547 						Z_DEFAULT_COMPRESSION: -1,
       
   548 
       
   549 						Z_FILTERED: 1,
       
   550 						Z_HUFFMAN_ONLY: 2,
       
   551 						Z_RLE: 3,
       
   552 						Z_FIXED: 4,
       
   553 						Z_DEFAULT_STRATEGY: 0,
       
   554 
       
   555 						/* Possible values of the data_type field (though see inflate()) */
       
   556 						Z_BINARY: 0,
       
   557 						Z_TEXT: 1,
       
   558 						//Z_ASCII:                1, // = Z_TEXT (deprecated)
       
   559 						Z_UNKNOWN: 2,
       
   560 
       
   561 						/* The deflate compression method */
       
   562 						Z_DEFLATED: 8,
       
   563 						//Z_NULL:                 null // Use -1 or null inline, depending on var type
       
   564 					};
       
   565 				},
       
   566 				{},
       
   567 			],
       
   568 			5: [
       
   569 				function ( require, module, exports ) {
       
   570 					'use strict';
       
   571 
       
   572 					// Note: we can't get significant speed boost here.
       
   573 					// So write code to minimize size - no pregenerated tables
       
   574 					// and array tools dependencies.
       
   575 
       
   576 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
   577 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
   578 					//
       
   579 					// This software is provided 'as-is', without any express or implied
       
   580 					// warranty. In no event will the authors be held liable for any damages
       
   581 					// arising from the use of this software.
       
   582 					//
       
   583 					// Permission is granted to anyone to use this software for any purpose,
       
   584 					// including commercial applications, and to alter it and redistribute it
       
   585 					// freely, subject to the following restrictions:
       
   586 					//
       
   587 					// 1. The origin of this software must not be misrepresented; you must not
       
   588 					//   claim that you wrote the original software. If you use this software
       
   589 					//   in a product, an acknowledgment in the product documentation would be
       
   590 					//   appreciated but is not required.
       
   591 					// 2. Altered source versions must be plainly marked as such, and must not be
       
   592 					//   misrepresented as being the original software.
       
   593 					// 3. This notice may not be removed or altered from any source distribution.
       
   594 
       
   595 					// Use ordinary array, since untyped makes no boost here
       
   596 					function makeTable() {
       
   597 						var c,
       
   598 							table = [];
       
   599 
       
   600 						for ( var n = 0; n < 256; n++ ) {
       
   601 							c = n;
       
   602 							for ( var k = 0; k < 8; k++ ) {
       
   603 								c = c & 1 ? 0xedb88320 ^ ( c >>> 1 ) : c >>> 1;
       
   604 							}
       
   605 							table[ n ] = c;
       
   606 						}
       
   607 
       
   608 						return table;
       
   609 					}
       
   610 
       
   611 					// Create table on load. Just 255 signed longs. Not a problem.
       
   612 					var crcTable = makeTable();
       
   613 
       
   614 					function crc32( crc, buf, len, pos ) {
       
   615 						var t = crcTable,
       
   616 							end = pos + len;
       
   617 
       
   618 						crc ^= -1;
       
   619 
       
   620 						for ( var i = pos; i < end; i++ ) {
       
   621 							crc =
       
   622 								( crc >>> 8 ) ^ t[ ( crc ^ buf[ i ] ) & 0xff ];
       
   623 						}
       
   624 
       
   625 						return crc ^ -1; // >>> 0;
       
   626 					}
       
   627 
       
   628 					module.exports = crc32;
       
   629 				},
       
   630 				{},
       
   631 			],
       
   632 			6: [
       
   633 				function ( require, module, exports ) {
       
   634 					'use strict';
       
   635 
       
   636 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
   637 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
   638 					//
       
   639 					// This software is provided 'as-is', without any express or implied
       
   640 					// warranty. In no event will the authors be held liable for any damages
       
   641 					// arising from the use of this software.
       
   642 					//
       
   643 					// Permission is granted to anyone to use this software for any purpose,
       
   644 					// including commercial applications, and to alter it and redistribute it
       
   645 					// freely, subject to the following restrictions:
       
   646 					//
       
   647 					// 1. The origin of this software must not be misrepresented; you must not
       
   648 					//   claim that you wrote the original software. If you use this software
       
   649 					//   in a product, an acknowledgment in the product documentation would be
       
   650 					//   appreciated but is not required.
       
   651 					// 2. Altered source versions must be plainly marked as such, and must not be
       
   652 					//   misrepresented as being the original software.
       
   653 					// 3. This notice may not be removed or altered from any source distribution.
       
   654 
       
   655 					function GZheader() {
       
   656 						/* true if compressed data believed to be text */
       
   657 						this.text = 0;
       
   658 						/* modification time */
       
   659 						this.time = 0;
       
   660 						/* extra flags (not used when writing a gzip file) */
       
   661 						this.xflags = 0;
       
   662 						/* operating system */
       
   663 						this.os = 0;
       
   664 						/* pointer to extra field or Z_NULL if none */
       
   665 						this.extra = null;
       
   666 						/* extra field length (valid if extra != Z_NULL) */
       
   667 						this.extra_len = 0; // Actually, we don't need it in JS,
       
   668 						// but leave for few code modifications
       
   669 
       
   670 						//
       
   671 						// Setup limits is not necessary because in js we should not preallocate memory
       
   672 						// for inflate use constant limit in 65536 bytes
       
   673 						//
       
   674 
       
   675 						/* space at extra (only when reading header) */
       
   676 						// this.extra_max  = 0;
       
   677 						/* pointer to zero-terminated file name or Z_NULL */
       
   678 						this.name = '';
       
   679 						/* space at name (only when reading header) */
       
   680 						// this.name_max   = 0;
       
   681 						/* pointer to zero-terminated comment or Z_NULL */
       
   682 						this.comment = '';
       
   683 						/* space at comment (only when reading header) */
       
   684 						// this.comm_max   = 0;
       
   685 						/* true if there was or will be a header crc */
       
   686 						this.hcrc = 0;
       
   687 						/* true when done reading gzip header (not used when writing a gzip file) */
       
   688 						this.done = false;
       
   689 					}
       
   690 
       
   691 					module.exports = GZheader;
       
   692 				},
       
   693 				{},
       
   694 			],
       
   695 			7: [
       
   696 				function ( require, module, exports ) {
       
   697 					'use strict';
       
   698 
       
   699 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
   700 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
   701 					//
       
   702 					// This software is provided 'as-is', without any express or implied
       
   703 					// warranty. In no event will the authors be held liable for any damages
       
   704 					// arising from the use of this software.
       
   705 					//
       
   706 					// Permission is granted to anyone to use this software for any purpose,
       
   707 					// including commercial applications, and to alter it and redistribute it
       
   708 					// freely, subject to the following restrictions:
       
   709 					//
       
   710 					// 1. The origin of this software must not be misrepresented; you must not
       
   711 					//   claim that you wrote the original software. If you use this software
       
   712 					//   in a product, an acknowledgment in the product documentation would be
       
   713 					//   appreciated but is not required.
       
   714 					// 2. Altered source versions must be plainly marked as such, and must not be
       
   715 					//   misrepresented as being the original software.
       
   716 					// 3. This notice may not be removed or altered from any source distribution.
       
   717 
       
   718 					// See state defs from inflate.js
       
   719 					var BAD = 30; /* got a data error -- remain here until reset */
       
   720 					var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
       
   721 
       
   722 					/*
       
   723      Decode literal, length, and distance codes and write out the resulting
       
   724      literal and match bytes until either not enough input or output is
       
   725      available, an end-of-block is encountered, or a data error is encountered.
       
   726      When large enough input and output buffers are supplied to inflate(), for
       
   727      example, a 16K input buffer and a 64K output buffer, more than 95% of the
       
   728      inflate execution time is spent in this routine.
       
   729 
       
   730      Entry assumptions:
       
   731 
       
   732           state.mode === LEN
       
   733           strm.avail_in >= 6
       
   734           strm.avail_out >= 258
       
   735           start >= strm.avail_out
       
   736           state.bits < 8
       
   737 
       
   738      On return, state.mode is one of:
       
   739 
       
   740           LEN -- ran out of enough output space or enough available input
       
   741           TYPE -- reached end of block code, inflate() to interpret next block
       
   742           BAD -- error in block data
       
   743 
       
   744      Notes:
       
   745 
       
   746       - The maximum input bits used by a length/distance pair is 15 bits for the
       
   747         length code, 5 bits for the length extra, 15 bits for the distance code,
       
   748         and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
       
   749         Therefore if strm.avail_in >= 6, then there is enough input to avoid
       
   750         checking for available input while decoding.
       
   751 
       
   752       - The maximum bytes that a single length/distance pair can output is 258
       
   753         bytes, which is the maximum length that can be coded.  inflate_fast()
       
   754         requires strm.avail_out >= 258 for each loop to avoid checking for
       
   755         output space.
       
   756    */
       
   757 					module.exports = function inflate_fast( strm, start ) {
       
   758 						var state;
       
   759 						var _in; /* local strm.input */
       
   760 						var last; /* have enough input while in < last */
       
   761 						var _out; /* local strm.output */
       
   762 						var beg; /* inflate()'s initial strm.output */
       
   763 						var end; /* while out < end, enough space available */
       
   764 						//#ifdef INFLATE_STRICT
       
   765 						var dmax; /* maximum distance from zlib header */
       
   766 						//#endif
       
   767 						var wsize; /* window size or zero if not using window */
       
   768 						var whave; /* valid bytes in the window */
       
   769 						var wnext; /* window write index */
       
   770 						// Use `s_window` instead `window`, avoid conflict with instrumentation tools
       
   771 						var s_window; /* allocated sliding window, if wsize != 0 */
       
   772 						var hold; /* local strm.hold */
       
   773 						var bits; /* local strm.bits */
       
   774 						var lcode; /* local strm.lencode */
       
   775 						var dcode; /* local strm.distcode */
       
   776 						var lmask; /* mask for first level of length codes */
       
   777 						var dmask; /* mask for first level of distance codes */
       
   778 						var here; /* retrieved table entry */
       
   779 						var op; /* code bits, operation, extra bits, or */
       
   780 						/*  window position, window bytes to copy */
       
   781 						var len; /* match length, unused bytes */
       
   782 						var dist; /* match distance */
       
   783 						var from; /* where to copy match from */
       
   784 						var from_source;
       
   785 
       
   786 						var input, output; // JS specific, because we have no pointers
       
   787 
       
   788 						/* copy state to local variables */
       
   789 						state = strm.state;
       
   790 						//here = state.here;
       
   791 						_in = strm.next_in;
       
   792 						input = strm.input;
       
   793 						last = _in + ( strm.avail_in - 5 );
       
   794 						_out = strm.next_out;
       
   795 						output = strm.output;
       
   796 						beg = _out - ( start - strm.avail_out );
       
   797 						end = _out + ( strm.avail_out - 257 );
       
   798 						//#ifdef INFLATE_STRICT
       
   799 						dmax = state.dmax;
       
   800 						//#endif
       
   801 						wsize = state.wsize;
       
   802 						whave = state.whave;
       
   803 						wnext = state.wnext;
       
   804 						s_window = state.window;
       
   805 						hold = state.hold;
       
   806 						bits = state.bits;
       
   807 						lcode = state.lencode;
       
   808 						dcode = state.distcode;
       
   809 						lmask = ( 1 << state.lenbits ) - 1;
       
   810 						dmask = ( 1 << state.distbits ) - 1;
       
   811 
       
   812 						/* decode literals and length/distances until end-of-block or not enough
       
   813        input data or output space */
       
   814 
       
   815 						top: do {
       
   816 							if ( bits < 15 ) {
       
   817 								hold += input[ _in++ ] << bits;
       
   818 								bits += 8;
       
   819 								hold += input[ _in++ ] << bits;
       
   820 								bits += 8;
       
   821 							}
       
   822 
       
   823 							here = lcode[ hold & lmask ];
       
   824 
       
   825 							dolen: for (;;) {
       
   826 								// Goto emulation
       
   827 								op = here >>> 24 /*here.bits*/;
       
   828 								hold >>>= op;
       
   829 								bits -= op;
       
   830 								op = ( here >>> 16 ) & 0xff /*here.op*/;
       
   831 								if ( op === 0 ) {
       
   832 									/* literal */
       
   833 									//Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
       
   834 									//        "inflate:         literal '%c'\n" :
       
   835 									//        "inflate:         literal 0x%02x\n", here.val));
       
   836 									output[ _out++ ] =
       
   837 										here & 0xffff /*here.val*/;
       
   838 								} else if ( op & 16 ) {
       
   839 									/* length base */
       
   840 									len = here & 0xffff /*here.val*/;
       
   841 									op &= 15; /* number of extra bits */
       
   842 									if ( op ) {
       
   843 										if ( bits < op ) {
       
   844 											hold += input[ _in++ ] << bits;
       
   845 											bits += 8;
       
   846 										}
       
   847 										len += hold & ( ( 1 << op ) - 1 );
       
   848 										hold >>>= op;
       
   849 										bits -= op;
       
   850 									}
       
   851 									//Tracevv((stderr, "inflate:         length %u\n", len));
       
   852 									if ( bits < 15 ) {
       
   853 										hold += input[ _in++ ] << bits;
       
   854 										bits += 8;
       
   855 										hold += input[ _in++ ] << bits;
       
   856 										bits += 8;
       
   857 									}
       
   858 									here = dcode[ hold & dmask ];
       
   859 
       
   860 									dodist: for (;;) {
       
   861 										// goto emulation
       
   862 										op = here >>> 24 /*here.bits*/;
       
   863 										hold >>>= op;
       
   864 										bits -= op;
       
   865 										op = ( here >>> 16 ) & 0xff /*here.op*/;
       
   866 
       
   867 										if ( op & 16 ) {
       
   868 											/* distance base */
       
   869 											dist = here & 0xffff /*here.val*/;
       
   870 											op &= 15; /* number of extra bits */
       
   871 											if ( bits < op ) {
       
   872 												hold += input[ _in++ ] << bits;
       
   873 												bits += 8;
       
   874 												if ( bits < op ) {
       
   875 													hold +=
       
   876 														input[ _in++ ] << bits;
       
   877 													bits += 8;
       
   878 												}
       
   879 											}
       
   880 											dist += hold & ( ( 1 << op ) - 1 );
       
   881 											//#ifdef INFLATE_STRICT
       
   882 											if ( dist > dmax ) {
       
   883 												strm.msg =
       
   884 													'invalid distance too far back';
       
   885 												state.mode = BAD;
       
   886 												break top;
       
   887 											}
       
   888 											//#endif
       
   889 											hold >>>= op;
       
   890 											bits -= op;
       
   891 											//Tracevv((stderr, "inflate:         distance %u\n", dist));
       
   892 											op =
       
   893 												_out -
       
   894 												beg; /* max distance in output */
       
   895 											if ( dist > op ) {
       
   896 												/* see if copy from window */
       
   897 												op =
       
   898 													dist -
       
   899 													op; /* distance back in window */
       
   900 												if ( op > whave ) {
       
   901 													if ( state.sane ) {
       
   902 														strm.msg =
       
   903 															'invalid distance too far back';
       
   904 														state.mode = BAD;
       
   905 														break top;
       
   906 													}
       
   907 
       
   908 													// (!) This block is disabled in zlib defaults,
       
   909 													// don't enable it for binary compatibility
       
   910 													//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
       
   911 													//                if (len <= op - whave) {
       
   912 													//                  do {
       
   913 													//                    output[_out++] = 0;
       
   914 													//                  } while (--len);
       
   915 													//                  continue top;
       
   916 													//                }
       
   917 													//                len -= op - whave;
       
   918 													//                do {
       
   919 													//                  output[_out++] = 0;
       
   920 													//                } while (--op > whave);
       
   921 													//                if (op === 0) {
       
   922 													//                  from = _out - dist;
       
   923 													//                  do {
       
   924 													//                    output[_out++] = output[from++];
       
   925 													//                  } while (--len);
       
   926 													//                  continue top;
       
   927 													//                }
       
   928 													//#endif
       
   929 												}
       
   930 												from = 0; // window index
       
   931 												from_source = s_window;
       
   932 												if ( wnext === 0 ) {
       
   933 													/* very common case */
       
   934 													from += wsize - op;
       
   935 													if ( op < len ) {
       
   936 														/* some from window */
       
   937 														len -= op;
       
   938 														do {
       
   939 															output[ _out++ ] =
       
   940 																s_window[
       
   941 																	from++
       
   942 																];
       
   943 														} while ( --op );
       
   944 														from =
       
   945 															_out -
       
   946 															dist; /* rest from output */
       
   947 														from_source = output;
       
   948 													}
       
   949 												} else if ( wnext < op ) {
       
   950 													/* wrap around window */
       
   951 													from += wsize + wnext - op;
       
   952 													op -= wnext;
       
   953 													if ( op < len ) {
       
   954 														/* some from end of window */
       
   955 														len -= op;
       
   956 														do {
       
   957 															output[ _out++ ] =
       
   958 																s_window[
       
   959 																	from++
       
   960 																];
       
   961 														} while ( --op );
       
   962 														from = 0;
       
   963 														if ( wnext < len ) {
       
   964 															/* some from start of window */
       
   965 															op = wnext;
       
   966 															len -= op;
       
   967 															do {
       
   968 																output[
       
   969 																	_out++
       
   970 																] =
       
   971 																	s_window[
       
   972 																		from++
       
   973 																	];
       
   974 															} while ( --op );
       
   975 															from =
       
   976 																_out -
       
   977 																dist; /* rest from output */
       
   978 															from_source =
       
   979 																output;
       
   980 														}
       
   981 													}
       
   982 												} else {
       
   983 													/* contiguous in window */
       
   984 													from += wnext - op;
       
   985 													if ( op < len ) {
       
   986 														/* some from window */
       
   987 														len -= op;
       
   988 														do {
       
   989 															output[ _out++ ] =
       
   990 																s_window[
       
   991 																	from++
       
   992 																];
       
   993 														} while ( --op );
       
   994 														from =
       
   995 															_out -
       
   996 															dist; /* rest from output */
       
   997 														from_source = output;
       
   998 													}
       
   999 												}
       
  1000 												while ( len > 2 ) {
       
  1001 													output[ _out++ ] =
       
  1002 														from_source[ from++ ];
       
  1003 													output[ _out++ ] =
       
  1004 														from_source[ from++ ];
       
  1005 													output[ _out++ ] =
       
  1006 														from_source[ from++ ];
       
  1007 													len -= 3;
       
  1008 												}
       
  1009 												if ( len ) {
       
  1010 													output[ _out++ ] =
       
  1011 														from_source[ from++ ];
       
  1012 													if ( len > 1 ) {
       
  1013 														output[ _out++ ] =
       
  1014 															from_source[
       
  1015 																from++
       
  1016 															];
       
  1017 													}
       
  1018 												}
       
  1019 											} else {
       
  1020 												from =
       
  1021 													_out -
       
  1022 													dist; /* copy direct from output */
       
  1023 												do {
       
  1024 													/* minimum length is three */
       
  1025 													output[ _out++ ] =
       
  1026 														output[ from++ ];
       
  1027 													output[ _out++ ] =
       
  1028 														output[ from++ ];
       
  1029 													output[ _out++ ] =
       
  1030 														output[ from++ ];
       
  1031 													len -= 3;
       
  1032 												} while ( len > 2 );
       
  1033 												if ( len ) {
       
  1034 													output[ _out++ ] =
       
  1035 														output[ from++ ];
       
  1036 													if ( len > 1 ) {
       
  1037 														output[ _out++ ] =
       
  1038 															output[ from++ ];
       
  1039 													}
       
  1040 												}
       
  1041 											}
       
  1042 										} else if ( ( op & 64 ) === 0 ) {
       
  1043 											/* 2nd level distance code */
       
  1044 											here =
       
  1045 												dcode[
       
  1046 													( here &
       
  1047 														0xffff ) /*here.val*/ +
       
  1048 														( hold &
       
  1049 															( ( 1 << op ) -
       
  1050 																1 ) )
       
  1051 												];
       
  1052 											continue dodist;
       
  1053 										} else {
       
  1054 											strm.msg = 'invalid distance code';
       
  1055 											state.mode = BAD;
       
  1056 											break top;
       
  1057 										}
       
  1058 
       
  1059 										break; // need to emulate goto via "continue"
       
  1060 									}
       
  1061 								} else if ( ( op & 64 ) === 0 ) {
       
  1062 									/* 2nd level length code */
       
  1063 									here =
       
  1064 										lcode[
       
  1065 											( here & 0xffff ) /*here.val*/ +
       
  1066 												( hold & ( ( 1 << op ) - 1 ) )
       
  1067 										];
       
  1068 									continue dolen;
       
  1069 								} else if ( op & 32 ) {
       
  1070 									/* end-of-block */
       
  1071 									//Tracevv((stderr, "inflate:         end of block\n"));
       
  1072 									state.mode = TYPE;
       
  1073 									break top;
       
  1074 								} else {
       
  1075 									strm.msg = 'invalid literal/length code';
       
  1076 									state.mode = BAD;
       
  1077 									break top;
       
  1078 								}
       
  1079 
       
  1080 								break; // need to emulate goto via "continue"
       
  1081 							}
       
  1082 						} while ( _in < last && _out < end );
       
  1083 
       
  1084 						/* return unused bytes (on entry, bits < 8, so in won't go too far back) */
       
  1085 						len = bits >> 3;
       
  1086 						_in -= len;
       
  1087 						bits -= len << 3;
       
  1088 						hold &= ( 1 << bits ) - 1;
       
  1089 
       
  1090 						/* update state and return */
       
  1091 						strm.next_in = _in;
       
  1092 						strm.next_out = _out;
       
  1093 						strm.avail_in =
       
  1094 							_in < last
       
  1095 								? 5 + ( last - _in )
       
  1096 								: 5 - ( _in - last );
       
  1097 						strm.avail_out =
       
  1098 							_out < end
       
  1099 								? 257 + ( end - _out )
       
  1100 								: 257 - ( _out - end );
       
  1101 						state.hold = hold;
       
  1102 						state.bits = bits;
       
  1103 						return;
       
  1104 					};
       
  1105 				},
       
  1106 				{},
       
  1107 			],
       
  1108 			8: [
       
  1109 				function ( require, module, exports ) {
       
  1110 					'use strict';
       
  1111 
       
  1112 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
  1113 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
  1114 					//
       
  1115 					// This software is provided 'as-is', without any express or implied
       
  1116 					// warranty. In no event will the authors be held liable for any damages
       
  1117 					// arising from the use of this software.
       
  1118 					//
       
  1119 					// Permission is granted to anyone to use this software for any purpose,
       
  1120 					// including commercial applications, and to alter it and redistribute it
       
  1121 					// freely, subject to the following restrictions:
       
  1122 					//
       
  1123 					// 1. The origin of this software must not be misrepresented; you must not
       
  1124 					//   claim that you wrote the original software. If you use this software
       
  1125 					//   in a product, an acknowledgment in the product documentation would be
       
  1126 					//   appreciated but is not required.
       
  1127 					// 2. Altered source versions must be plainly marked as such, and must not be
       
  1128 					//   misrepresented as being the original software.
       
  1129 					// 3. This notice may not be removed or altered from any source distribution.
       
  1130 
       
  1131 					var utils = require( '../utils/common' );
       
  1132 					var adler32 = require( './adler32' );
       
  1133 					var crc32 = require( './crc32' );
       
  1134 					var inflate_fast = require( './inffast' );
       
  1135 					var inflate_table = require( './inftrees' );
       
  1136 
       
  1137 					var CODES = 0;
       
  1138 					var LENS = 1;
       
  1139 					var DISTS = 2;
       
  1140 
       
  1141 					/* Public constants ==========================================================*/
       
  1142 					/* ===========================================================================*/
       
  1143 
       
  1144 					/* Allowed flush values; see deflate() and inflate() below for details */
       
  1145 					//var Z_NO_FLUSH      = 0;
       
  1146 					//var Z_PARTIAL_FLUSH = 1;
       
  1147 					//var Z_SYNC_FLUSH    = 2;
       
  1148 					//var Z_FULL_FLUSH    = 3;
       
  1149 					var Z_FINISH = 4;
       
  1150 					var Z_BLOCK = 5;
       
  1151 					var Z_TREES = 6;
       
  1152 
       
  1153 					/* Return codes for the compression/decompression functions. Negative values
       
  1154 					 * are errors, positive values are used for special but normal events.
       
  1155 					 */
       
  1156 					var Z_OK = 0;
       
  1157 					var Z_STREAM_END = 1;
       
  1158 					var Z_NEED_DICT = 2;
       
  1159 					//var Z_ERRNO         = -1;
       
  1160 					var Z_STREAM_ERROR = -2;
       
  1161 					var Z_DATA_ERROR = -3;
       
  1162 					var Z_MEM_ERROR = -4;
       
  1163 					var Z_BUF_ERROR = -5;
       
  1164 					//var Z_VERSION_ERROR = -6;
       
  1165 
       
  1166 					/* The deflate compression method */
       
  1167 					var Z_DEFLATED = 8;
       
  1168 
       
  1169 					/* STATES ====================================================================*/
       
  1170 					/* ===========================================================================*/
       
  1171 
       
  1172 					var HEAD = 1; /* i: waiting for magic header */
       
  1173 					var FLAGS = 2; /* i: waiting for method and flags (gzip) */
       
  1174 					var TIME = 3; /* i: waiting for modification time (gzip) */
       
  1175 					var OS = 4; /* i: waiting for extra flags and operating system (gzip) */
       
  1176 					var EXLEN = 5; /* i: waiting for extra length (gzip) */
       
  1177 					var EXTRA = 6; /* i: waiting for extra bytes (gzip) */
       
  1178 					var NAME = 7; /* i: waiting for end of file name (gzip) */
       
  1179 					var COMMENT = 8; /* i: waiting for end of comment (gzip) */
       
  1180 					var HCRC = 9; /* i: waiting for header crc (gzip) */
       
  1181 					var DICTID = 10; /* i: waiting for dictionary check value */
       
  1182 					var DICT = 11; /* waiting for inflateSetDictionary() call */
       
  1183 					var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
       
  1184 					var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */
       
  1185 					var STORED = 14; /* i: waiting for stored size (length and complement) */
       
  1186 					var COPY_ = 15; /* i/o: same as COPY below, but only first time in */
       
  1187 					var COPY = 16; /* i/o: waiting for input or output to copy stored block */
       
  1188 					var TABLE = 17; /* i: waiting for dynamic block table lengths */
       
  1189 					var LENLENS = 18; /* i: waiting for code length code lengths */
       
  1190 					var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */
       
  1191 					var LEN_ = 20; /* i: same as LEN below, but only first time in */
       
  1192 					var LEN = 21; /* i: waiting for length/lit/eob code */
       
  1193 					var LENEXT = 22; /* i: waiting for length extra bits */
       
  1194 					var DIST = 23; /* i: waiting for distance code */
       
  1195 					var DISTEXT = 24; /* i: waiting for distance extra bits */
       
  1196 					var MATCH = 25; /* o: waiting for output space to copy string */
       
  1197 					var LIT = 26; /* o: waiting for output space to write literal */
       
  1198 					var CHECK = 27; /* i: waiting for 32-bit check value */
       
  1199 					var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */
       
  1200 					var DONE = 29; /* finished check, done -- remain here until reset */
       
  1201 					var BAD = 30; /* got a data error -- remain here until reset */
       
  1202 					var MEM = 31; /* got an inflate() memory error -- remain here until reset */
       
  1203 					var SYNC = 32; /* looking for synchronization bytes to restart inflate() */
       
  1204 
       
  1205 					/* ===========================================================================*/
       
  1206 
       
  1207 					var ENOUGH_LENS = 852;
       
  1208 					var ENOUGH_DISTS = 592;
       
  1209 					//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);
       
  1210 
       
  1211 					var MAX_WBITS = 15;
       
  1212 					/* 32K LZ77 window */
       
  1213 					var DEF_WBITS = MAX_WBITS;
       
  1214 
       
  1215 					function zswap32( q ) {
       
  1216 						return (
       
  1217 							( ( q >>> 24 ) & 0xff ) +
       
  1218 							( ( q >>> 8 ) & 0xff00 ) +
       
  1219 							( ( q & 0xff00 ) << 8 ) +
       
  1220 							( ( q & 0xff ) << 24 )
       
  1221 						);
       
  1222 					}
       
  1223 
       
  1224 					function InflateState() {
       
  1225 						this.mode = 0; /* current inflate mode */
       
  1226 						this.last = false; /* true if processing last block */
       
  1227 						this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
       
  1228 						this.havedict = false; /* true if dictionary provided */
       
  1229 						this.flags = 0; /* gzip header method and flags (0 if zlib) */
       
  1230 						this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
       
  1231 						this.check = 0; /* protected copy of check value */
       
  1232 						this.total = 0; /* protected copy of output count */
       
  1233 						// TODO: may be {}
       
  1234 						this.head =
       
  1235 							null; /* where to save gzip header information */
       
  1236 
       
  1237 						/* sliding window */
       
  1238 						this.wbits = 0; /* log base 2 of requested window size */
       
  1239 						this.wsize = 0; /* window size or zero if not using window */
       
  1240 						this.whave = 0; /* valid bytes in the window */
       
  1241 						this.wnext = 0; /* window write index */
       
  1242 						this.window =
       
  1243 							null; /* allocated sliding window, if needed */
       
  1244 
       
  1245 						/* bit accumulator */
       
  1246 						this.hold = 0; /* input bit accumulator */
       
  1247 						this.bits = 0; /* number of bits in "in" */
       
  1248 
       
  1249 						/* for string and stored block copying */
       
  1250 						this.length = 0; /* literal or length of data to copy */
       
  1251 						this.offset = 0; /* distance back to copy string from */
       
  1252 
       
  1253 						/* for table and code decoding */
       
  1254 						this.extra = 0; /* extra bits needed */
       
  1255 
       
  1256 						/* fixed and dynamic code tables */
       
  1257 						this.lencode =
       
  1258 							null; /* starting table for length/literal codes */
       
  1259 						this.distcode =
       
  1260 							null; /* starting table for distance codes */
       
  1261 						this.lenbits = 0; /* index bits for lencode */
       
  1262 						this.distbits = 0; /* index bits for distcode */
       
  1263 
       
  1264 						/* dynamic table building */
       
  1265 						this.ncode = 0; /* number of code length code lengths */
       
  1266 						this.nlen = 0; /* number of length code lengths */
       
  1267 						this.ndist = 0; /* number of distance code lengths */
       
  1268 						this.have = 0; /* number of code lengths in lens[] */
       
  1269 						this.next = null; /* next available space in codes[] */
       
  1270 
       
  1271 						this.lens = new utils.Buf16(
       
  1272 							320
       
  1273 						); /* temporary storage for code lengths */
       
  1274 						this.work = new utils.Buf16(
       
  1275 							288
       
  1276 						); /* work area for code table building */
       
  1277 
       
  1278 						/*
       
  1279      because we don't have pointers in js, we use lencode and distcode directly
       
  1280      as buffers so we don't need codes
       
  1281     */
       
  1282 						//this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */
       
  1283 						this.lendyn =
       
  1284 							null; /* dynamic table for length/literal codes (JS specific) */
       
  1285 						this.distdyn =
       
  1286 							null; /* dynamic table for distance codes (JS specific) */
       
  1287 						this.sane = 0; /* if false, allow invalid distance too far */
       
  1288 						this.back = 0; /* bits back of last unprocessed length/lit */
       
  1289 						this.was = 0; /* initial length of match */
       
  1290 					}
       
  1291 
       
  1292 					function inflateResetKeep( strm ) {
       
  1293 						var state;
       
  1294 
       
  1295 						if ( ! strm || ! strm.state ) {
       
  1296 							return Z_STREAM_ERROR;
       
  1297 						}
       
  1298 						state = strm.state;
       
  1299 						strm.total_in = strm.total_out = state.total = 0;
       
  1300 						strm.msg = ''; /*Z_NULL*/
       
  1301 						if ( state.wrap ) {
       
  1302 							/* to support ill-conceived Java test suite */
       
  1303 							strm.adler = state.wrap & 1;
       
  1304 						}
       
  1305 						state.mode = HEAD;
       
  1306 						state.last = 0;
       
  1307 						state.havedict = 0;
       
  1308 						state.dmax = 32768;
       
  1309 						state.head = null /*Z_NULL*/;
       
  1310 						state.hold = 0;
       
  1311 						state.bits = 0;
       
  1312 						//state.lencode = state.distcode = state.next = state.codes;
       
  1313 						state.lencode = state.lendyn = new utils.Buf32(
       
  1314 							ENOUGH_LENS
       
  1315 						);
       
  1316 						state.distcode = state.distdyn = new utils.Buf32(
       
  1317 							ENOUGH_DISTS
       
  1318 						);
       
  1319 
       
  1320 						state.sane = 1;
       
  1321 						state.back = -1;
       
  1322 						//Tracev((stderr, "inflate: reset\n"));
       
  1323 						return Z_OK;
       
  1324 					}
       
  1325 
       
  1326 					function inflateReset( strm ) {
       
  1327 						var state;
       
  1328 
       
  1329 						if ( ! strm || ! strm.state ) {
       
  1330 							return Z_STREAM_ERROR;
       
  1331 						}
       
  1332 						state = strm.state;
       
  1333 						state.wsize = 0;
       
  1334 						state.whave = 0;
       
  1335 						state.wnext = 0;
       
  1336 						return inflateResetKeep( strm );
       
  1337 					}
       
  1338 
       
  1339 					function inflateReset2( strm, windowBits ) {
       
  1340 						var wrap;
       
  1341 						var state;
       
  1342 
       
  1343 						/* get the state */
       
  1344 						if ( ! strm || ! strm.state ) {
       
  1345 							return Z_STREAM_ERROR;
       
  1346 						}
       
  1347 						state = strm.state;
       
  1348 
       
  1349 						/* extract wrap request from windowBits parameter */
       
  1350 						if ( windowBits < 0 ) {
       
  1351 							wrap = 0;
       
  1352 							windowBits = -windowBits;
       
  1353 						} else {
       
  1354 							wrap = ( windowBits >> 4 ) + 1;
       
  1355 							if ( windowBits < 48 ) {
       
  1356 								windowBits &= 15;
       
  1357 							}
       
  1358 						}
       
  1359 
       
  1360 						/* set number of window bits, free window if different */
       
  1361 						if (
       
  1362 							windowBits &&
       
  1363 							( windowBits < 8 || windowBits > 15 )
       
  1364 						) {
       
  1365 							return Z_STREAM_ERROR;
       
  1366 						}
       
  1367 						if (
       
  1368 							state.window !== null &&
       
  1369 							state.wbits !== windowBits
       
  1370 						) {
       
  1371 							state.window = null;
       
  1372 						}
       
  1373 
       
  1374 						/* update state and reset the rest of it */
       
  1375 						state.wrap = wrap;
       
  1376 						state.wbits = windowBits;
       
  1377 						return inflateReset( strm );
       
  1378 					}
       
  1379 
       
  1380 					function inflateInit2( strm, windowBits ) {
       
  1381 						var ret;
       
  1382 						var state;
       
  1383 
       
  1384 						if ( ! strm ) {
       
  1385 							return Z_STREAM_ERROR;
       
  1386 						}
       
  1387 						//strm.msg = Z_NULL;                 /* in case we return an error */
       
  1388 
       
  1389 						state = new InflateState();
       
  1390 
       
  1391 						//if (state === Z_NULL) return Z_MEM_ERROR;
       
  1392 						//Tracev((stderr, "inflate: allocated\n"));
       
  1393 						strm.state = state;
       
  1394 						state.window = null /*Z_NULL*/;
       
  1395 						ret = inflateReset2( strm, windowBits );
       
  1396 						if ( ret !== Z_OK ) {
       
  1397 							strm.state = null /*Z_NULL*/;
       
  1398 						}
       
  1399 						return ret;
       
  1400 					}
       
  1401 
       
  1402 					function inflateInit( strm ) {
       
  1403 						return inflateInit2( strm, DEF_WBITS );
       
  1404 					}
       
  1405 
       
  1406 					/*
       
  1407    Return state with length and distance decoding tables and index sizes set to
       
  1408    fixed code decoding.  Normally this returns fixed tables from inffixed.h.
       
  1409    If BUILDFIXED is defined, then instead this routine builds the tables the
       
  1410    first time it's called, and returns those tables the first time and
       
  1411    thereafter.  This reduces the size of the code by about 2K bytes, in
       
  1412    exchange for a little execution time.  However, BUILDFIXED should not be
       
  1413    used for threaded applications, since the rewriting of the tables and virgin
       
  1414    may not be thread-safe.
       
  1415    */
       
  1416 					var virgin = true;
       
  1417 
       
  1418 					var lenfix, distfix; // We have no pointers in JS, so keep tables separate
       
  1419 
       
  1420 					function fixedtables( state ) {
       
  1421 						/* build fixed huffman tables if first call (may not be thread safe) */
       
  1422 						if ( virgin ) {
       
  1423 							var sym;
       
  1424 
       
  1425 							lenfix = new utils.Buf32( 512 );
       
  1426 							distfix = new utils.Buf32( 32 );
       
  1427 
       
  1428 							/* literal/length table */
       
  1429 							sym = 0;
       
  1430 							while ( sym < 144 ) {
       
  1431 								state.lens[ sym++ ] = 8;
       
  1432 							}
       
  1433 							while ( sym < 256 ) {
       
  1434 								state.lens[ sym++ ] = 9;
       
  1435 							}
       
  1436 							while ( sym < 280 ) {
       
  1437 								state.lens[ sym++ ] = 7;
       
  1438 							}
       
  1439 							while ( sym < 288 ) {
       
  1440 								state.lens[ sym++ ] = 8;
       
  1441 							}
       
  1442 
       
  1443 							inflate_table(
       
  1444 								LENS,
       
  1445 								state.lens,
       
  1446 								0,
       
  1447 								288,
       
  1448 								lenfix,
       
  1449 								0,
       
  1450 								state.work,
       
  1451 								{ bits: 9 }
       
  1452 							);
       
  1453 
       
  1454 							/* distance table */
       
  1455 							sym = 0;
       
  1456 							while ( sym < 32 ) {
       
  1457 								state.lens[ sym++ ] = 5;
       
  1458 							}
       
  1459 
       
  1460 							inflate_table(
       
  1461 								DISTS,
       
  1462 								state.lens,
       
  1463 								0,
       
  1464 								32,
       
  1465 								distfix,
       
  1466 								0,
       
  1467 								state.work,
       
  1468 								{ bits: 5 }
       
  1469 							);
       
  1470 
       
  1471 							/* do this just once */
       
  1472 							virgin = false;
       
  1473 						}
       
  1474 
       
  1475 						state.lencode = lenfix;
       
  1476 						state.lenbits = 9;
       
  1477 						state.distcode = distfix;
       
  1478 						state.distbits = 5;
       
  1479 					}
       
  1480 
       
  1481 					/*
       
  1482    Update the window with the last wsize (normally 32K) bytes written before
       
  1483    returning.  If window does not exist yet, create it.  This is only called
       
  1484    when a window is already in use, or when output has been written during this
       
  1485    inflate call, but the end of the deflate stream has not been reached yet.
       
  1486    It is also called to create a window for dictionary data when a dictionary
       
  1487    is loaded.
       
  1488 
       
  1489    Providing output buffers larger than 32K to inflate() should provide a speed
       
  1490    advantage, since only the last 32K of output is copied to the sliding window
       
  1491    upon return from inflate(), and since all distances after the first 32K of
       
  1492    output will fall in the output data, making match copies simpler and faster.
       
  1493    The advantage may be dependent on the size of the processor's data caches.
       
  1494    */
       
  1495 					function updatewindow( strm, src, end, copy ) {
       
  1496 						var dist;
       
  1497 						var state = strm.state;
       
  1498 
       
  1499 						/* if it hasn't been done already, allocate space for the window */
       
  1500 						if ( state.window === null ) {
       
  1501 							state.wsize = 1 << state.wbits;
       
  1502 							state.wnext = 0;
       
  1503 							state.whave = 0;
       
  1504 
       
  1505 							state.window = new utils.Buf8( state.wsize );
       
  1506 						}
       
  1507 
       
  1508 						/* copy state->wsize or less output bytes into the circular window */
       
  1509 						if ( copy >= state.wsize ) {
       
  1510 							utils.arraySet(
       
  1511 								state.window,
       
  1512 								src,
       
  1513 								end - state.wsize,
       
  1514 								state.wsize,
       
  1515 								0
       
  1516 							);
       
  1517 							state.wnext = 0;
       
  1518 							state.whave = state.wsize;
       
  1519 						} else {
       
  1520 							dist = state.wsize - state.wnext;
       
  1521 							if ( dist > copy ) {
       
  1522 								dist = copy;
       
  1523 							}
       
  1524 							//zmemcpy(state->window + state->wnext, end - copy, dist);
       
  1525 							utils.arraySet(
       
  1526 								state.window,
       
  1527 								src,
       
  1528 								end - copy,
       
  1529 								dist,
       
  1530 								state.wnext
       
  1531 							);
       
  1532 							copy -= dist;
       
  1533 							if ( copy ) {
       
  1534 								//zmemcpy(state->window, end - copy, copy);
       
  1535 								utils.arraySet(
       
  1536 									state.window,
       
  1537 									src,
       
  1538 									end - copy,
       
  1539 									copy,
       
  1540 									0
       
  1541 								);
       
  1542 								state.wnext = copy;
       
  1543 								state.whave = state.wsize;
       
  1544 							} else {
       
  1545 								state.wnext += dist;
       
  1546 								if ( state.wnext === state.wsize ) {
       
  1547 									state.wnext = 0;
       
  1548 								}
       
  1549 								if ( state.whave < state.wsize ) {
       
  1550 									state.whave += dist;
       
  1551 								}
       
  1552 							}
       
  1553 						}
       
  1554 						return 0;
       
  1555 					}
       
  1556 
       
  1557 					function inflate( strm, flush ) {
       
  1558 						var state;
       
  1559 						var input, output; // input/output buffers
       
  1560 						var next; /* next input INDEX */
       
  1561 						var put; /* next output INDEX */
       
  1562 						var have, left; /* available input and output */
       
  1563 						var hold; /* bit buffer */
       
  1564 						var bits; /* bits in bit buffer */
       
  1565 						var _in,
       
  1566 							_out; /* save starting available input and output */
       
  1567 						var copy; /* number of stored or match bytes to copy */
       
  1568 						var from; /* where to copy match bytes from */
       
  1569 						var from_source;
       
  1570 						var here = 0; /* current decoding table entry */
       
  1571 						var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
       
  1572 						//var last;                   /* parent table entry */
       
  1573 						var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
       
  1574 						var len; /* length to copy for repeats, bits to drop */
       
  1575 						var ret; /* return code */
       
  1576 						var hbuf = new utils.Buf8(
       
  1577 							4
       
  1578 						); /* buffer for gzip header crc calculation */
       
  1579 						var opts;
       
  1580 
       
  1581 						var n; // temporary var for NEED_BITS
       
  1582 
       
  1583 						var order =
       
  1584 							/* permutation of code lengths */
       
  1585 							[
       
  1586 								16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3,
       
  1587 								13, 2, 14, 1, 15,
       
  1588 							];
       
  1589 
       
  1590 						if (
       
  1591 							! strm ||
       
  1592 							! strm.state ||
       
  1593 							! strm.output ||
       
  1594 							( ! strm.input && strm.avail_in !== 0 )
       
  1595 						) {
       
  1596 							return Z_STREAM_ERROR;
       
  1597 						}
       
  1598 
       
  1599 						state = strm.state;
       
  1600 						if ( state.mode === TYPE ) {
       
  1601 							state.mode = TYPEDO;
       
  1602 						} /* skip check */
       
  1603 
       
  1604 						//--- LOAD() ---
       
  1605 						put = strm.next_out;
       
  1606 						output = strm.output;
       
  1607 						left = strm.avail_out;
       
  1608 						next = strm.next_in;
       
  1609 						input = strm.input;
       
  1610 						have = strm.avail_in;
       
  1611 						hold = state.hold;
       
  1612 						bits = state.bits;
       
  1613 						//---
       
  1614 
       
  1615 						_in = have;
       
  1616 						_out = left;
       
  1617 						ret = Z_OK;
       
  1618 
       
  1619 						// goto emulation
       
  1620 						inf_leave: for (;;) {
       
  1621 							switch ( state.mode ) {
       
  1622 								case HEAD:
       
  1623 									if ( state.wrap === 0 ) {
       
  1624 										state.mode = TYPEDO;
       
  1625 										break;
       
  1626 									}
       
  1627 									//=== NEEDBITS(16);
       
  1628 									while ( bits < 16 ) {
       
  1629 										if ( have === 0 ) {
       
  1630 											break inf_leave;
       
  1631 										}
       
  1632 										have--;
       
  1633 										hold += input[ next++ ] << bits;
       
  1634 										bits += 8;
       
  1635 									}
       
  1636 									//===//
       
  1637 									if ( state.wrap & 2 && hold === 0x8b1f ) {
       
  1638 										/* gzip header */
       
  1639 										state.check = 0 /*crc32(0L, Z_NULL, 0)*/;
       
  1640 										//=== CRC2(state.check, hold);
       
  1641 										hbuf[ 0 ] = hold & 0xff;
       
  1642 										hbuf[ 1 ] = ( hold >>> 8 ) & 0xff;
       
  1643 										state.check = crc32(
       
  1644 											state.check,
       
  1645 											hbuf,
       
  1646 											2,
       
  1647 											0
       
  1648 										);
       
  1649 										//===//
       
  1650 
       
  1651 										//=== INITBITS();
       
  1652 										hold = 0;
       
  1653 										bits = 0;
       
  1654 										//===//
       
  1655 										state.mode = FLAGS;
       
  1656 										break;
       
  1657 									}
       
  1658 									state.flags = 0; /* expect zlib header */
       
  1659 									if ( state.head ) {
       
  1660 										state.head.done = false;
       
  1661 									}
       
  1662 									if (
       
  1663 										! (
       
  1664 											state.wrap & 1
       
  1665 										) /* check if zlib header allowed */ ||
       
  1666 										( ( ( hold & 0xff ) /*BITS(8)*/ << 8 ) +
       
  1667 											( hold >> 8 ) ) %
       
  1668 											31
       
  1669 									) {
       
  1670 										strm.msg = 'incorrect header check';
       
  1671 										state.mode = BAD;
       
  1672 										break;
       
  1673 									}
       
  1674 									if (
       
  1675 										( hold & 0x0f ) /*BITS(4)*/ !==
       
  1676 										Z_DEFLATED
       
  1677 									) {
       
  1678 										strm.msg = 'unknown compression method';
       
  1679 										state.mode = BAD;
       
  1680 										break;
       
  1681 									}
       
  1682 									//--- DROPBITS(4) ---//
       
  1683 									hold >>>= 4;
       
  1684 									bits -= 4;
       
  1685 									//---//
       
  1686 									len = ( hold & 0x0f ) /*BITS(4)*/ + 8;
       
  1687 									if ( state.wbits === 0 ) {
       
  1688 										state.wbits = len;
       
  1689 									} else if ( len > state.wbits ) {
       
  1690 										strm.msg = 'invalid window size';
       
  1691 										state.mode = BAD;
       
  1692 										break;
       
  1693 									}
       
  1694 									state.dmax = 1 << len;
       
  1695 									//Tracev((stderr, "inflate:   zlib header ok\n"));
       
  1696 									strm.adler =
       
  1697 										state.check = 1 /*adler32(0L, Z_NULL, 0)*/;
       
  1698 									state.mode = hold & 0x200 ? DICTID : TYPE;
       
  1699 									//=== INITBITS();
       
  1700 									hold = 0;
       
  1701 									bits = 0;
       
  1702 									//===//
       
  1703 									break;
       
  1704 								case FLAGS:
       
  1705 									//=== NEEDBITS(16); */
       
  1706 									while ( bits < 16 ) {
       
  1707 										if ( have === 0 ) {
       
  1708 											break inf_leave;
       
  1709 										}
       
  1710 										have--;
       
  1711 										hold += input[ next++ ] << bits;
       
  1712 										bits += 8;
       
  1713 									}
       
  1714 									//===//
       
  1715 									state.flags = hold;
       
  1716 									if (
       
  1717 										( state.flags & 0xff ) !==
       
  1718 										Z_DEFLATED
       
  1719 									) {
       
  1720 										strm.msg = 'unknown compression method';
       
  1721 										state.mode = BAD;
       
  1722 										break;
       
  1723 									}
       
  1724 									if ( state.flags & 0xe000 ) {
       
  1725 										strm.msg = 'unknown header flags set';
       
  1726 										state.mode = BAD;
       
  1727 										break;
       
  1728 									}
       
  1729 									if ( state.head ) {
       
  1730 										state.head.text = ( hold >> 8 ) & 1;
       
  1731 									}
       
  1732 									if ( state.flags & 0x0200 ) {
       
  1733 										//=== CRC2(state.check, hold);
       
  1734 										hbuf[ 0 ] = hold & 0xff;
       
  1735 										hbuf[ 1 ] = ( hold >>> 8 ) & 0xff;
       
  1736 										state.check = crc32(
       
  1737 											state.check,
       
  1738 											hbuf,
       
  1739 											2,
       
  1740 											0
       
  1741 										);
       
  1742 										//===//
       
  1743 									}
       
  1744 									//=== INITBITS();
       
  1745 									hold = 0;
       
  1746 									bits = 0;
       
  1747 									//===//
       
  1748 									state.mode = TIME;
       
  1749 								/* falls through */
       
  1750 								case TIME:
       
  1751 									//=== NEEDBITS(32); */
       
  1752 									while ( bits < 32 ) {
       
  1753 										if ( have === 0 ) {
       
  1754 											break inf_leave;
       
  1755 										}
       
  1756 										have--;
       
  1757 										hold += input[ next++ ] << bits;
       
  1758 										bits += 8;
       
  1759 									}
       
  1760 									//===//
       
  1761 									if ( state.head ) {
       
  1762 										state.head.time = hold;
       
  1763 									}
       
  1764 									if ( state.flags & 0x0200 ) {
       
  1765 										//=== CRC4(state.check, hold)
       
  1766 										hbuf[ 0 ] = hold & 0xff;
       
  1767 										hbuf[ 1 ] = ( hold >>> 8 ) & 0xff;
       
  1768 										hbuf[ 2 ] = ( hold >>> 16 ) & 0xff;
       
  1769 										hbuf[ 3 ] = ( hold >>> 24 ) & 0xff;
       
  1770 										state.check = crc32(
       
  1771 											state.check,
       
  1772 											hbuf,
       
  1773 											4,
       
  1774 											0
       
  1775 										);
       
  1776 										//===
       
  1777 									}
       
  1778 									//=== INITBITS();
       
  1779 									hold = 0;
       
  1780 									bits = 0;
       
  1781 									//===//
       
  1782 									state.mode = OS;
       
  1783 								/* falls through */
       
  1784 								case OS:
       
  1785 									//=== NEEDBITS(16); */
       
  1786 									while ( bits < 16 ) {
       
  1787 										if ( have === 0 ) {
       
  1788 											break inf_leave;
       
  1789 										}
       
  1790 										have--;
       
  1791 										hold += input[ next++ ] << bits;
       
  1792 										bits += 8;
       
  1793 									}
       
  1794 									//===//
       
  1795 									if ( state.head ) {
       
  1796 										state.head.xflags = hold & 0xff;
       
  1797 										state.head.os = hold >> 8;
       
  1798 									}
       
  1799 									if ( state.flags & 0x0200 ) {
       
  1800 										//=== CRC2(state.check, hold);
       
  1801 										hbuf[ 0 ] = hold & 0xff;
       
  1802 										hbuf[ 1 ] = ( hold >>> 8 ) & 0xff;
       
  1803 										state.check = crc32(
       
  1804 											state.check,
       
  1805 											hbuf,
       
  1806 											2,
       
  1807 											0
       
  1808 										);
       
  1809 										//===//
       
  1810 									}
       
  1811 									//=== INITBITS();
       
  1812 									hold = 0;
       
  1813 									bits = 0;
       
  1814 									//===//
       
  1815 									state.mode = EXLEN;
       
  1816 								/* falls through */
       
  1817 								case EXLEN:
       
  1818 									if ( state.flags & 0x0400 ) {
       
  1819 										//=== NEEDBITS(16); */
       
  1820 										while ( bits < 16 ) {
       
  1821 											if ( have === 0 ) {
       
  1822 												break inf_leave;
       
  1823 											}
       
  1824 											have--;
       
  1825 											hold += input[ next++ ] << bits;
       
  1826 											bits += 8;
       
  1827 										}
       
  1828 										//===//
       
  1829 										state.length = hold;
       
  1830 										if ( state.head ) {
       
  1831 											state.head.extra_len = hold;
       
  1832 										}
       
  1833 										if ( state.flags & 0x0200 ) {
       
  1834 											//=== CRC2(state.check, hold);
       
  1835 											hbuf[ 0 ] = hold & 0xff;
       
  1836 											hbuf[ 1 ] = ( hold >>> 8 ) & 0xff;
       
  1837 											state.check = crc32(
       
  1838 												state.check,
       
  1839 												hbuf,
       
  1840 												2,
       
  1841 												0
       
  1842 											);
       
  1843 											//===//
       
  1844 										}
       
  1845 										//=== INITBITS();
       
  1846 										hold = 0;
       
  1847 										bits = 0;
       
  1848 										//===//
       
  1849 									} else if ( state.head ) {
       
  1850 										state.head.extra = null /*Z_NULL*/;
       
  1851 									}
       
  1852 									state.mode = EXTRA;
       
  1853 								/* falls through */
       
  1854 								case EXTRA:
       
  1855 									if ( state.flags & 0x0400 ) {
       
  1856 										copy = state.length;
       
  1857 										if ( copy > have ) {
       
  1858 											copy = have;
       
  1859 										}
       
  1860 										if ( copy ) {
       
  1861 											if ( state.head ) {
       
  1862 												len =
       
  1863 													state.head.extra_len -
       
  1864 													state.length;
       
  1865 												if ( ! state.head.extra ) {
       
  1866 													// Use untyped array for more convenient processing later
       
  1867 													state.head.extra =
       
  1868 														new Array(
       
  1869 															state.head.extra_len
       
  1870 														);
       
  1871 												}
       
  1872 												utils.arraySet(
       
  1873 													state.head.extra,
       
  1874 													input,
       
  1875 													next,
       
  1876 													// extra field is limited to 65536 bytes
       
  1877 													// - no need for additional size check
       
  1878 													copy,
       
  1879 													/*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
       
  1880 													len
       
  1881 												);
       
  1882 												//zmemcpy(state.head.extra + len, next,
       
  1883 												//        len + copy > state.head.extra_max ?
       
  1884 												//        state.head.extra_max - len : copy);
       
  1885 											}
       
  1886 											if ( state.flags & 0x0200 ) {
       
  1887 												state.check = crc32(
       
  1888 													state.check,
       
  1889 													input,
       
  1890 													copy,
       
  1891 													next
       
  1892 												);
       
  1893 											}
       
  1894 											have -= copy;
       
  1895 											next += copy;
       
  1896 											state.length -= copy;
       
  1897 										}
       
  1898 										if ( state.length ) {
       
  1899 											break inf_leave;
       
  1900 										}
       
  1901 									}
       
  1902 									state.length = 0;
       
  1903 									state.mode = NAME;
       
  1904 								/* falls through */
       
  1905 								case NAME:
       
  1906 									if ( state.flags & 0x0800 ) {
       
  1907 										if ( have === 0 ) {
       
  1908 											break inf_leave;
       
  1909 										}
       
  1910 										copy = 0;
       
  1911 										do {
       
  1912 											// TODO: 2 or 1 bytes?
       
  1913 											len = input[ next + copy++ ];
       
  1914 											/* use constant limit because in js we should not preallocate memory */
       
  1915 											if (
       
  1916 												state.head &&
       
  1917 												len &&
       
  1918 												state.length <
       
  1919 													65536 /*state.head.name_max*/
       
  1920 											) {
       
  1921 												state.head.name +=
       
  1922 													String.fromCharCode( len );
       
  1923 											}
       
  1924 										} while ( len && copy < have );
       
  1925 
       
  1926 										if ( state.flags & 0x0200 ) {
       
  1927 											state.check = crc32(
       
  1928 												state.check,
       
  1929 												input,
       
  1930 												copy,
       
  1931 												next
       
  1932 											);
       
  1933 										}
       
  1934 										have -= copy;
       
  1935 										next += copy;
       
  1936 										if ( len ) {
       
  1937 											break inf_leave;
       
  1938 										}
       
  1939 									} else if ( state.head ) {
       
  1940 										state.head.name = null;
       
  1941 									}
       
  1942 									state.length = 0;
       
  1943 									state.mode = COMMENT;
       
  1944 								/* falls through */
       
  1945 								case COMMENT:
       
  1946 									if ( state.flags & 0x1000 ) {
       
  1947 										if ( have === 0 ) {
       
  1948 											break inf_leave;
       
  1949 										}
       
  1950 										copy = 0;
       
  1951 										do {
       
  1952 											len = input[ next + copy++ ];
       
  1953 											/* use constant limit because in js we should not preallocate memory */
       
  1954 											if (
       
  1955 												state.head &&
       
  1956 												len &&
       
  1957 												state.length <
       
  1958 													65536 /*state.head.comm_max*/
       
  1959 											) {
       
  1960 												state.head.comment +=
       
  1961 													String.fromCharCode( len );
       
  1962 											}
       
  1963 										} while ( len && copy < have );
       
  1964 										if ( state.flags & 0x0200 ) {
       
  1965 											state.check = crc32(
       
  1966 												state.check,
       
  1967 												input,
       
  1968 												copy,
       
  1969 												next
       
  1970 											);
       
  1971 										}
       
  1972 										have -= copy;
       
  1973 										next += copy;
       
  1974 										if ( len ) {
       
  1975 											break inf_leave;
       
  1976 										}
       
  1977 									} else if ( state.head ) {
       
  1978 										state.head.comment = null;
       
  1979 									}
       
  1980 									state.mode = HCRC;
       
  1981 								/* falls through */
       
  1982 								case HCRC:
       
  1983 									if ( state.flags & 0x0200 ) {
       
  1984 										//=== NEEDBITS(16); */
       
  1985 										while ( bits < 16 ) {
       
  1986 											if ( have === 0 ) {
       
  1987 												break inf_leave;
       
  1988 											}
       
  1989 											have--;
       
  1990 											hold += input[ next++ ] << bits;
       
  1991 											bits += 8;
       
  1992 										}
       
  1993 										//===//
       
  1994 										if (
       
  1995 											hold !==
       
  1996 											( state.check & 0xffff )
       
  1997 										) {
       
  1998 											strm.msg = 'header crc mismatch';
       
  1999 											state.mode = BAD;
       
  2000 											break;
       
  2001 										}
       
  2002 										//=== INITBITS();
       
  2003 										hold = 0;
       
  2004 										bits = 0;
       
  2005 										//===//
       
  2006 									}
       
  2007 									if ( state.head ) {
       
  2008 										state.head.hcrc =
       
  2009 											( state.flags >> 9 ) & 1;
       
  2010 										state.head.done = true;
       
  2011 									}
       
  2012 									strm.adler = state.check = 0;
       
  2013 									state.mode = TYPE;
       
  2014 									break;
       
  2015 								case DICTID:
       
  2016 									//=== NEEDBITS(32); */
       
  2017 									while ( bits < 32 ) {
       
  2018 										if ( have === 0 ) {
       
  2019 											break inf_leave;
       
  2020 										}
       
  2021 										have--;
       
  2022 										hold += input[ next++ ] << bits;
       
  2023 										bits += 8;
       
  2024 									}
       
  2025 									//===//
       
  2026 									strm.adler = state.check = zswap32( hold );
       
  2027 									//=== INITBITS();
       
  2028 									hold = 0;
       
  2029 									bits = 0;
       
  2030 									//===//
       
  2031 									state.mode = DICT;
       
  2032 								/* falls through */
       
  2033 								case DICT:
       
  2034 									if ( state.havedict === 0 ) {
       
  2035 										//--- RESTORE() ---
       
  2036 										strm.next_out = put;
       
  2037 										strm.avail_out = left;
       
  2038 										strm.next_in = next;
       
  2039 										strm.avail_in = have;
       
  2040 										state.hold = hold;
       
  2041 										state.bits = bits;
       
  2042 										//---
       
  2043 										return Z_NEED_DICT;
       
  2044 									}
       
  2045 									strm.adler =
       
  2046 										state.check = 1 /*adler32(0L, Z_NULL, 0)*/;
       
  2047 									state.mode = TYPE;
       
  2048 								/* falls through */
       
  2049 								case TYPE:
       
  2050 									if (
       
  2051 										flush === Z_BLOCK ||
       
  2052 										flush === Z_TREES
       
  2053 									) {
       
  2054 										break inf_leave;
       
  2055 									}
       
  2056 								/* falls through */
       
  2057 								case TYPEDO:
       
  2058 									if ( state.last ) {
       
  2059 										//--- BYTEBITS() ---//
       
  2060 										hold >>>= bits & 7;
       
  2061 										bits -= bits & 7;
       
  2062 										//---//
       
  2063 										state.mode = CHECK;
       
  2064 										break;
       
  2065 									}
       
  2066 									//=== NEEDBITS(3); */
       
  2067 									while ( bits < 3 ) {
       
  2068 										if ( have === 0 ) {
       
  2069 											break inf_leave;
       
  2070 										}
       
  2071 										have--;
       
  2072 										hold += input[ next++ ] << bits;
       
  2073 										bits += 8;
       
  2074 									}
       
  2075 									//===//
       
  2076 									state.last = hold & 0x01 /*BITS(1)*/;
       
  2077 									//--- DROPBITS(1) ---//
       
  2078 									hold >>>= 1;
       
  2079 									bits -= 1;
       
  2080 									//---//
       
  2081 
       
  2082 									switch ( hold & 0x03 /*BITS(2)*/ ) {
       
  2083 										case 0 /* stored block */:
       
  2084 											//Tracev((stderr, "inflate:     stored block%s\n",
       
  2085 											//        state.last ? " (last)" : ""));
       
  2086 											state.mode = STORED;
       
  2087 											break;
       
  2088 										case 1 /* fixed block */:
       
  2089 											fixedtables( state );
       
  2090 											//Tracev((stderr, "inflate:     fixed codes block%s\n",
       
  2091 											//        state.last ? " (last)" : ""));
       
  2092 											state.mode =
       
  2093 												LEN_; /* decode codes */
       
  2094 											if ( flush === Z_TREES ) {
       
  2095 												//--- DROPBITS(2) ---//
       
  2096 												hold >>>= 2;
       
  2097 												bits -= 2;
       
  2098 												//---//
       
  2099 												break inf_leave;
       
  2100 											}
       
  2101 											break;
       
  2102 										case 2 /* dynamic block */:
       
  2103 											//Tracev((stderr, "inflate:     dynamic codes block%s\n",
       
  2104 											//        state.last ? " (last)" : ""));
       
  2105 											state.mode = TABLE;
       
  2106 											break;
       
  2107 										case 3:
       
  2108 											strm.msg = 'invalid block type';
       
  2109 											state.mode = BAD;
       
  2110 									}
       
  2111 									//--- DROPBITS(2) ---//
       
  2112 									hold >>>= 2;
       
  2113 									bits -= 2;
       
  2114 									//---//
       
  2115 									break;
       
  2116 								case STORED:
       
  2117 									//--- BYTEBITS() ---// /* go to byte boundary */
       
  2118 									hold >>>= bits & 7;
       
  2119 									bits -= bits & 7;
       
  2120 									//---//
       
  2121 									//=== NEEDBITS(32); */
       
  2122 									while ( bits < 32 ) {
       
  2123 										if ( have === 0 ) {
       
  2124 											break inf_leave;
       
  2125 										}
       
  2126 										have--;
       
  2127 										hold += input[ next++ ] << bits;
       
  2128 										bits += 8;
       
  2129 									}
       
  2130 									//===//
       
  2131 									if (
       
  2132 										( hold & 0xffff ) !==
       
  2133 										( ( hold >>> 16 ) ^ 0xffff )
       
  2134 									) {
       
  2135 										strm.msg =
       
  2136 											'invalid stored block lengths';
       
  2137 										state.mode = BAD;
       
  2138 										break;
       
  2139 									}
       
  2140 									state.length = hold & 0xffff;
       
  2141 									//Tracev((stderr, "inflate:       stored length %u\n",
       
  2142 									//        state.length));
       
  2143 									//=== INITBITS();
       
  2144 									hold = 0;
       
  2145 									bits = 0;
       
  2146 									//===//
       
  2147 									state.mode = COPY_;
       
  2148 									if ( flush === Z_TREES ) {
       
  2149 										break inf_leave;
       
  2150 									}
       
  2151 								/* falls through */
       
  2152 								case COPY_:
       
  2153 									state.mode = COPY;
       
  2154 								/* falls through */
       
  2155 								case COPY:
       
  2156 									copy = state.length;
       
  2157 									if ( copy ) {
       
  2158 										if ( copy > have ) {
       
  2159 											copy = have;
       
  2160 										}
       
  2161 										if ( copy > left ) {
       
  2162 											copy = left;
       
  2163 										}
       
  2164 										if ( copy === 0 ) {
       
  2165 											break inf_leave;
       
  2166 										}
       
  2167 										//--- zmemcpy(put, next, copy); ---
       
  2168 										utils.arraySet(
       
  2169 											output,
       
  2170 											input,
       
  2171 											next,
       
  2172 											copy,
       
  2173 											put
       
  2174 										);
       
  2175 										//---//
       
  2176 										have -= copy;
       
  2177 										next += copy;
       
  2178 										left -= copy;
       
  2179 										put += copy;
       
  2180 										state.length -= copy;
       
  2181 										break;
       
  2182 									}
       
  2183 									//Tracev((stderr, "inflate:       stored end\n"));
       
  2184 									state.mode = TYPE;
       
  2185 									break;
       
  2186 								case TABLE:
       
  2187 									//=== NEEDBITS(14); */
       
  2188 									while ( bits < 14 ) {
       
  2189 										if ( have === 0 ) {
       
  2190 											break inf_leave;
       
  2191 										}
       
  2192 										have--;
       
  2193 										hold += input[ next++ ] << bits;
       
  2194 										bits += 8;
       
  2195 									}
       
  2196 									//===//
       
  2197 									state.nlen =
       
  2198 										( hold & 0x1f ) /*BITS(5)*/ + 257;
       
  2199 									//--- DROPBITS(5) ---//
       
  2200 									hold >>>= 5;
       
  2201 									bits -= 5;
       
  2202 									//---//
       
  2203 									state.ndist =
       
  2204 										( hold & 0x1f ) /*BITS(5)*/ + 1;
       
  2205 									//--- DROPBITS(5) ---//
       
  2206 									hold >>>= 5;
       
  2207 									bits -= 5;
       
  2208 									//---//
       
  2209 									state.ncode =
       
  2210 										( hold & 0x0f ) /*BITS(4)*/ + 4;
       
  2211 									//--- DROPBITS(4) ---//
       
  2212 									hold >>>= 4;
       
  2213 									bits -= 4;
       
  2214 									//---//
       
  2215 									//#ifndef PKZIP_BUG_WORKAROUND
       
  2216 									if (
       
  2217 										state.nlen > 286 ||
       
  2218 										state.ndist > 30
       
  2219 									) {
       
  2220 										strm.msg =
       
  2221 											'too many length or distance symbols';
       
  2222 										state.mode = BAD;
       
  2223 										break;
       
  2224 									}
       
  2225 									//#endif
       
  2226 									//Tracev((stderr, "inflate:       table sizes ok\n"));
       
  2227 									state.have = 0;
       
  2228 									state.mode = LENLENS;
       
  2229 								/* falls through */
       
  2230 								case LENLENS:
       
  2231 									while ( state.have < state.ncode ) {
       
  2232 										//=== NEEDBITS(3);
       
  2233 										while ( bits < 3 ) {
       
  2234 											if ( have === 0 ) {
       
  2235 												break inf_leave;
       
  2236 											}
       
  2237 											have--;
       
  2238 											hold += input[ next++ ] << bits;
       
  2239 											bits += 8;
       
  2240 										}
       
  2241 										//===//
       
  2242 										state.lens[ order[ state.have++ ] ] =
       
  2243 											hold & 0x07; //BITS(3);
       
  2244 										//--- DROPBITS(3) ---//
       
  2245 										hold >>>= 3;
       
  2246 										bits -= 3;
       
  2247 										//---//
       
  2248 									}
       
  2249 									while ( state.have < 19 ) {
       
  2250 										state.lens[ order[ state.have++ ] ] = 0;
       
  2251 									}
       
  2252 									// We have separate tables & no pointers. 2 commented lines below not needed.
       
  2253 									//state.next = state.codes;
       
  2254 									//state.lencode = state.next;
       
  2255 									// Switch to use dynamic table
       
  2256 									state.lencode = state.lendyn;
       
  2257 									state.lenbits = 7;
       
  2258 
       
  2259 									opts = { bits: state.lenbits };
       
  2260 									ret = inflate_table(
       
  2261 										CODES,
       
  2262 										state.lens,
       
  2263 										0,
       
  2264 										19,
       
  2265 										state.lencode,
       
  2266 										0,
       
  2267 										state.work,
       
  2268 										opts
       
  2269 									);
       
  2270 									state.lenbits = opts.bits;
       
  2271 
       
  2272 									if ( ret ) {
       
  2273 										strm.msg = 'invalid code lengths set';
       
  2274 										state.mode = BAD;
       
  2275 										break;
       
  2276 									}
       
  2277 									//Tracev((stderr, "inflate:       code lengths ok\n"));
       
  2278 									state.have = 0;
       
  2279 									state.mode = CODELENS;
       
  2280 								/* falls through */
       
  2281 								case CODELENS:
       
  2282 									while (
       
  2283 										state.have <
       
  2284 										state.nlen + state.ndist
       
  2285 									) {
       
  2286 										for (;;) {
       
  2287 											here =
       
  2288 												state.lencode[
       
  2289 													hold &
       
  2290 														( ( 1 <<
       
  2291 															state.lenbits ) -
       
  2292 															1 )
       
  2293 												]; /*BITS(state.lenbits)*/
       
  2294 											here_bits = here >>> 24;
       
  2295 											here_op = ( here >>> 16 ) & 0xff;
       
  2296 											here_val = here & 0xffff;
       
  2297 
       
  2298 											if ( here_bits <= bits ) {
       
  2299 												break;
       
  2300 											}
       
  2301 											//--- PULLBYTE() ---//
       
  2302 											if ( have === 0 ) {
       
  2303 												break inf_leave;
       
  2304 											}
       
  2305 											have--;
       
  2306 											hold += input[ next++ ] << bits;
       
  2307 											bits += 8;
       
  2308 											//---//
       
  2309 										}
       
  2310 										if ( here_val < 16 ) {
       
  2311 											//--- DROPBITS(here.bits) ---//
       
  2312 											hold >>>= here_bits;
       
  2313 											bits -= here_bits;
       
  2314 											//---//
       
  2315 											state.lens[ state.have++ ] =
       
  2316 												here_val;
       
  2317 										} else {
       
  2318 											if ( here_val === 16 ) {
       
  2319 												//=== NEEDBITS(here.bits + 2);
       
  2320 												n = here_bits + 2;
       
  2321 												while ( bits < n ) {
       
  2322 													if ( have === 0 ) {
       
  2323 														break inf_leave;
       
  2324 													}
       
  2325 													have--;
       
  2326 													hold +=
       
  2327 														input[ next++ ] << bits;
       
  2328 													bits += 8;
       
  2329 												}
       
  2330 												//===//
       
  2331 												//--- DROPBITS(here.bits) ---//
       
  2332 												hold >>>= here_bits;
       
  2333 												bits -= here_bits;
       
  2334 												//---//
       
  2335 												if ( state.have === 0 ) {
       
  2336 													strm.msg =
       
  2337 														'invalid bit length repeat';
       
  2338 													state.mode = BAD;
       
  2339 													break;
       
  2340 												}
       
  2341 												len =
       
  2342 													state.lens[
       
  2343 														state.have - 1
       
  2344 													];
       
  2345 												copy = 3 + ( hold & 0x03 ); //BITS(2);
       
  2346 												//--- DROPBITS(2) ---//
       
  2347 												hold >>>= 2;
       
  2348 												bits -= 2;
       
  2349 												//---//
       
  2350 											} else if ( here_val === 17 ) {
       
  2351 												//=== NEEDBITS(here.bits + 3);
       
  2352 												n = here_bits + 3;
       
  2353 												while ( bits < n ) {
       
  2354 													if ( have === 0 ) {
       
  2355 														break inf_leave;
       
  2356 													}
       
  2357 													have--;
       
  2358 													hold +=
       
  2359 														input[ next++ ] << bits;
       
  2360 													bits += 8;
       
  2361 												}
       
  2362 												//===//
       
  2363 												//--- DROPBITS(here.bits) ---//
       
  2364 												hold >>>= here_bits;
       
  2365 												bits -= here_bits;
       
  2366 												//---//
       
  2367 												len = 0;
       
  2368 												copy = 3 + ( hold & 0x07 ); //BITS(3);
       
  2369 												//--- DROPBITS(3) ---//
       
  2370 												hold >>>= 3;
       
  2371 												bits -= 3;
       
  2372 												//---//
       
  2373 											} else {
       
  2374 												//=== NEEDBITS(here.bits + 7);
       
  2375 												n = here_bits + 7;
       
  2376 												while ( bits < n ) {
       
  2377 													if ( have === 0 ) {
       
  2378 														break inf_leave;
       
  2379 													}
       
  2380 													have--;
       
  2381 													hold +=
       
  2382 														input[ next++ ] << bits;
       
  2383 													bits += 8;
       
  2384 												}
       
  2385 												//===//
       
  2386 												//--- DROPBITS(here.bits) ---//
       
  2387 												hold >>>= here_bits;
       
  2388 												bits -= here_bits;
       
  2389 												//---//
       
  2390 												len = 0;
       
  2391 												copy = 11 + ( hold & 0x7f ); //BITS(7);
       
  2392 												//--- DROPBITS(7) ---//
       
  2393 												hold >>>= 7;
       
  2394 												bits -= 7;
       
  2395 												//---//
       
  2396 											}
       
  2397 											if (
       
  2398 												state.have + copy >
       
  2399 												state.nlen + state.ndist
       
  2400 											) {
       
  2401 												strm.msg =
       
  2402 													'invalid bit length repeat';
       
  2403 												state.mode = BAD;
       
  2404 												break;
       
  2405 											}
       
  2406 											while ( copy-- ) {
       
  2407 												state.lens[ state.have++ ] =
       
  2408 													len;
       
  2409 											}
       
  2410 										}
       
  2411 									}
       
  2412 
       
  2413 									/* handle error breaks in while */
       
  2414 									if ( state.mode === BAD ) {
       
  2415 										break;
       
  2416 									}
       
  2417 
       
  2418 									/* check for end-of-block code (better have one) */
       
  2419 									if ( state.lens[ 256 ] === 0 ) {
       
  2420 										strm.msg =
       
  2421 											'invalid code -- missing end-of-block';
       
  2422 										state.mode = BAD;
       
  2423 										break;
       
  2424 									}
       
  2425 
       
  2426 									/* build code tables -- note: do not change the lenbits or distbits
       
  2427              values here (9 and 6) without reading the comments in inftrees.h
       
  2428              concerning the ENOUGH constants, which depend on those values */
       
  2429 									state.lenbits = 9;
       
  2430 
       
  2431 									opts = { bits: state.lenbits };
       
  2432 									ret = inflate_table(
       
  2433 										LENS,
       
  2434 										state.lens,
       
  2435 										0,
       
  2436 										state.nlen,
       
  2437 										state.lencode,
       
  2438 										0,
       
  2439 										state.work,
       
  2440 										opts
       
  2441 									);
       
  2442 									// We have separate tables & no pointers. 2 commented lines below not needed.
       
  2443 									// state.next_index = opts.table_index;
       
  2444 									state.lenbits = opts.bits;
       
  2445 									// state.lencode = state.next;
       
  2446 
       
  2447 									if ( ret ) {
       
  2448 										strm.msg =
       
  2449 											'invalid literal/lengths set';
       
  2450 										state.mode = BAD;
       
  2451 										break;
       
  2452 									}
       
  2453 
       
  2454 									state.distbits = 6;
       
  2455 									//state.distcode.copy(state.codes);
       
  2456 									// Switch to use dynamic table
       
  2457 									state.distcode = state.distdyn;
       
  2458 									opts = { bits: state.distbits };
       
  2459 									ret = inflate_table(
       
  2460 										DISTS,
       
  2461 										state.lens,
       
  2462 										state.nlen,
       
  2463 										state.ndist,
       
  2464 										state.distcode,
       
  2465 										0,
       
  2466 										state.work,
       
  2467 										opts
       
  2468 									);
       
  2469 									// We have separate tables & no pointers. 2 commented lines below not needed.
       
  2470 									// state.next_index = opts.table_index;
       
  2471 									state.distbits = opts.bits;
       
  2472 									// state.distcode = state.next;
       
  2473 
       
  2474 									if ( ret ) {
       
  2475 										strm.msg = 'invalid distances set';
       
  2476 										state.mode = BAD;
       
  2477 										break;
       
  2478 									}
       
  2479 									//Tracev((stderr, 'inflate:       codes ok\n'));
       
  2480 									state.mode = LEN_;
       
  2481 									if ( flush === Z_TREES ) {
       
  2482 										break inf_leave;
       
  2483 									}
       
  2484 								/* falls through */
       
  2485 								case LEN_:
       
  2486 									state.mode = LEN;
       
  2487 								/* falls through */
       
  2488 								case LEN:
       
  2489 									if ( have >= 6 && left >= 258 ) {
       
  2490 										//--- RESTORE() ---
       
  2491 										strm.next_out = put;
       
  2492 										strm.avail_out = left;
       
  2493 										strm.next_in = next;
       
  2494 										strm.avail_in = have;
       
  2495 										state.hold = hold;
       
  2496 										state.bits = bits;
       
  2497 										//---
       
  2498 										inflate_fast( strm, _out );
       
  2499 										//--- LOAD() ---
       
  2500 										put = strm.next_out;
       
  2501 										output = strm.output;
       
  2502 										left = strm.avail_out;
       
  2503 										next = strm.next_in;
       
  2504 										input = strm.input;
       
  2505 										have = strm.avail_in;
       
  2506 										hold = state.hold;
       
  2507 										bits = state.bits;
       
  2508 										//---
       
  2509 
       
  2510 										if ( state.mode === TYPE ) {
       
  2511 											state.back = -1;
       
  2512 										}
       
  2513 										break;
       
  2514 									}
       
  2515 									state.back = 0;
       
  2516 									for (;;) {
       
  2517 										here =
       
  2518 											state.lencode[
       
  2519 												hold &
       
  2520 													( ( 1 << state.lenbits ) -
       
  2521 														1 )
       
  2522 											]; /*BITS(state.lenbits)*/
       
  2523 										here_bits = here >>> 24;
       
  2524 										here_op = ( here >>> 16 ) & 0xff;
       
  2525 										here_val = here & 0xffff;
       
  2526 
       
  2527 										if ( here_bits <= bits ) {
       
  2528 											break;
       
  2529 										}
       
  2530 										//--- PULLBYTE() ---//
       
  2531 										if ( have === 0 ) {
       
  2532 											break inf_leave;
       
  2533 										}
       
  2534 										have--;
       
  2535 										hold += input[ next++ ] << bits;
       
  2536 										bits += 8;
       
  2537 										//---//
       
  2538 									}
       
  2539 									if ( here_op && ( here_op & 0xf0 ) === 0 ) {
       
  2540 										last_bits = here_bits;
       
  2541 										last_op = here_op;
       
  2542 										last_val = here_val;
       
  2543 										for (;;) {
       
  2544 											here =
       
  2545 												state.lencode[
       
  2546 													last_val +
       
  2547 														( ( hold &
       
  2548 															( ( 1 <<
       
  2549 																( last_bits +
       
  2550 																	last_op ) ) -
       
  2551 																1 ) ) /*BITS(last.bits + last.op)*/ >>
       
  2552 															last_bits )
       
  2553 												];
       
  2554 											here_bits = here >>> 24;
       
  2555 											here_op = ( here >>> 16 ) & 0xff;
       
  2556 											here_val = here & 0xffff;
       
  2557 
       
  2558 											if (
       
  2559 												last_bits + here_bits <=
       
  2560 												bits
       
  2561 											) {
       
  2562 												break;
       
  2563 											}
       
  2564 											//--- PULLBYTE() ---//
       
  2565 											if ( have === 0 ) {
       
  2566 												break inf_leave;
       
  2567 											}
       
  2568 											have--;
       
  2569 											hold += input[ next++ ] << bits;
       
  2570 											bits += 8;
       
  2571 											//---//
       
  2572 										}
       
  2573 										//--- DROPBITS(last.bits) ---//
       
  2574 										hold >>>= last_bits;
       
  2575 										bits -= last_bits;
       
  2576 										//---//
       
  2577 										state.back += last_bits;
       
  2578 									}
       
  2579 									//--- DROPBITS(here.bits) ---//
       
  2580 									hold >>>= here_bits;
       
  2581 									bits -= here_bits;
       
  2582 									//---//
       
  2583 									state.back += here_bits;
       
  2584 									state.length = here_val;
       
  2585 									if ( here_op === 0 ) {
       
  2586 										//Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
       
  2587 										//        "inflate:         literal '%c'\n" :
       
  2588 										//        "inflate:         literal 0x%02x\n", here.val));
       
  2589 										state.mode = LIT;
       
  2590 										break;
       
  2591 									}
       
  2592 									if ( here_op & 32 ) {
       
  2593 										//Tracevv((stderr, "inflate:         end of block\n"));
       
  2594 										state.back = -1;
       
  2595 										state.mode = TYPE;
       
  2596 										break;
       
  2597 									}
       
  2598 									if ( here_op & 64 ) {
       
  2599 										strm.msg =
       
  2600 											'invalid literal/length code';
       
  2601 										state.mode = BAD;
       
  2602 										break;
       
  2603 									}
       
  2604 									state.extra = here_op & 15;
       
  2605 									state.mode = LENEXT;
       
  2606 								/* falls through */
       
  2607 								case LENEXT:
       
  2608 									if ( state.extra ) {
       
  2609 										//=== NEEDBITS(state.extra);
       
  2610 										n = state.extra;
       
  2611 										while ( bits < n ) {
       
  2612 											if ( have === 0 ) {
       
  2613 												break inf_leave;
       
  2614 											}
       
  2615 											have--;
       
  2616 											hold += input[ next++ ] << bits;
       
  2617 											bits += 8;
       
  2618 										}
       
  2619 										//===//
       
  2620 										state.length +=
       
  2621 											hold &
       
  2622 											( ( 1 << state.extra ) -
       
  2623 												1 ) /*BITS(state.extra)*/;
       
  2624 										//--- DROPBITS(state.extra) ---//
       
  2625 										hold >>>= state.extra;
       
  2626 										bits -= state.extra;
       
  2627 										//---//
       
  2628 										state.back += state.extra;
       
  2629 									}
       
  2630 									//Tracevv((stderr, "inflate:         length %u\n", state.length));
       
  2631 									state.was = state.length;
       
  2632 									state.mode = DIST;
       
  2633 								/* falls through */
       
  2634 								case DIST:
       
  2635 									for (;;) {
       
  2636 										here =
       
  2637 											state.distcode[
       
  2638 												hold &
       
  2639 													( ( 1 << state.distbits ) -
       
  2640 														1 )
       
  2641 											]; /*BITS(state.distbits)*/
       
  2642 										here_bits = here >>> 24;
       
  2643 										here_op = ( here >>> 16 ) & 0xff;
       
  2644 										here_val = here & 0xffff;
       
  2645 
       
  2646 										if ( here_bits <= bits ) {
       
  2647 											break;
       
  2648 										}
       
  2649 										//--- PULLBYTE() ---//
       
  2650 										if ( have === 0 ) {
       
  2651 											break inf_leave;
       
  2652 										}
       
  2653 										have--;
       
  2654 										hold += input[ next++ ] << bits;
       
  2655 										bits += 8;
       
  2656 										//---//
       
  2657 									}
       
  2658 									if ( ( here_op & 0xf0 ) === 0 ) {
       
  2659 										last_bits = here_bits;
       
  2660 										last_op = here_op;
       
  2661 										last_val = here_val;
       
  2662 										for (;;) {
       
  2663 											here =
       
  2664 												state.distcode[
       
  2665 													last_val +
       
  2666 														( ( hold &
       
  2667 															( ( 1 <<
       
  2668 																( last_bits +
       
  2669 																	last_op ) ) -
       
  2670 																1 ) ) /*BITS(last.bits + last.op)*/ >>
       
  2671 															last_bits )
       
  2672 												];
       
  2673 											here_bits = here >>> 24;
       
  2674 											here_op = ( here >>> 16 ) & 0xff;
       
  2675 											here_val = here & 0xffff;
       
  2676 
       
  2677 											if (
       
  2678 												last_bits + here_bits <=
       
  2679 												bits
       
  2680 											) {
       
  2681 												break;
       
  2682 											}
       
  2683 											//--- PULLBYTE() ---//
       
  2684 											if ( have === 0 ) {
       
  2685 												break inf_leave;
       
  2686 											}
       
  2687 											have--;
       
  2688 											hold += input[ next++ ] << bits;
       
  2689 											bits += 8;
       
  2690 											//---//
       
  2691 										}
       
  2692 										//--- DROPBITS(last.bits) ---//
       
  2693 										hold >>>= last_bits;
       
  2694 										bits -= last_bits;
       
  2695 										//---//
       
  2696 										state.back += last_bits;
       
  2697 									}
       
  2698 									//--- DROPBITS(here.bits) ---//
       
  2699 									hold >>>= here_bits;
       
  2700 									bits -= here_bits;
       
  2701 									//---//
       
  2702 									state.back += here_bits;
       
  2703 									if ( here_op & 64 ) {
       
  2704 										strm.msg = 'invalid distance code';
       
  2705 										state.mode = BAD;
       
  2706 										break;
       
  2707 									}
       
  2708 									state.offset = here_val;
       
  2709 									state.extra = here_op & 15;
       
  2710 									state.mode = DISTEXT;
       
  2711 								/* falls through */
       
  2712 								case DISTEXT:
       
  2713 									if ( state.extra ) {
       
  2714 										//=== NEEDBITS(state.extra);
       
  2715 										n = state.extra;
       
  2716 										while ( bits < n ) {
       
  2717 											if ( have === 0 ) {
       
  2718 												break inf_leave;
       
  2719 											}
       
  2720 											have--;
       
  2721 											hold += input[ next++ ] << bits;
       
  2722 											bits += 8;
       
  2723 										}
       
  2724 										//===//
       
  2725 										state.offset +=
       
  2726 											hold &
       
  2727 											( ( 1 << state.extra ) -
       
  2728 												1 ) /*BITS(state.extra)*/;
       
  2729 										//--- DROPBITS(state.extra) ---//
       
  2730 										hold >>>= state.extra;
       
  2731 										bits -= state.extra;
       
  2732 										//---//
       
  2733 										state.back += state.extra;
       
  2734 									}
       
  2735 									//#ifdef INFLATE_STRICT
       
  2736 									if ( state.offset > state.dmax ) {
       
  2737 										strm.msg =
       
  2738 											'invalid distance too far back';
       
  2739 										state.mode = BAD;
       
  2740 										break;
       
  2741 									}
       
  2742 									//#endif
       
  2743 									//Tracevv((stderr, "inflate:         distance %u\n", state.offset));
       
  2744 									state.mode = MATCH;
       
  2745 								/* falls through */
       
  2746 								case MATCH:
       
  2747 									if ( left === 0 ) {
       
  2748 										break inf_leave;
       
  2749 									}
       
  2750 									copy = _out - left;
       
  2751 									if ( state.offset > copy ) {
       
  2752 										/* copy from window */
       
  2753 										copy = state.offset - copy;
       
  2754 										if ( copy > state.whave ) {
       
  2755 											if ( state.sane ) {
       
  2756 												strm.msg =
       
  2757 													'invalid distance too far back';
       
  2758 												state.mode = BAD;
       
  2759 												break;
       
  2760 											}
       
  2761 											// (!) This block is disabled in zlib defaults,
       
  2762 											// don't enable it for binary compatibility
       
  2763 											//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
       
  2764 											//          Trace((stderr, "inflate.c too far\n"));
       
  2765 											//          copy -= state.whave;
       
  2766 											//          if (copy > state.length) { copy = state.length; }
       
  2767 											//          if (copy > left) { copy = left; }
       
  2768 											//          left -= copy;
       
  2769 											//          state.length -= copy;
       
  2770 											//          do {
       
  2771 											//            output[put++] = 0;
       
  2772 											//          } while (--copy);
       
  2773 											//          if (state.length === 0) { state.mode = LEN; }
       
  2774 											//          break;
       
  2775 											//#endif
       
  2776 										}
       
  2777 										if ( copy > state.wnext ) {
       
  2778 											copy -= state.wnext;
       
  2779 											from = state.wsize - copy;
       
  2780 										} else {
       
  2781 											from = state.wnext - copy;
       
  2782 										}
       
  2783 										if ( copy > state.length ) {
       
  2784 											copy = state.length;
       
  2785 										}
       
  2786 										from_source = state.window;
       
  2787 									} else {
       
  2788 										/* copy from output */
       
  2789 										from_source = output;
       
  2790 										from = put - state.offset;
       
  2791 										copy = state.length;
       
  2792 									}
       
  2793 									if ( copy > left ) {
       
  2794 										copy = left;
       
  2795 									}
       
  2796 									left -= copy;
       
  2797 									state.length -= copy;
       
  2798 									do {
       
  2799 										output[ put++ ] = from_source[ from++ ];
       
  2800 									} while ( --copy );
       
  2801 									if ( state.length === 0 ) {
       
  2802 										state.mode = LEN;
       
  2803 									}
       
  2804 									break;
       
  2805 								case LIT:
       
  2806 									if ( left === 0 ) {
       
  2807 										break inf_leave;
       
  2808 									}
       
  2809 									output[ put++ ] = state.length;
       
  2810 									left--;
       
  2811 									state.mode = LEN;
       
  2812 									break;
       
  2813 								case CHECK:
       
  2814 									if ( state.wrap ) {
       
  2815 										//=== NEEDBITS(32);
       
  2816 										while ( bits < 32 ) {
       
  2817 											if ( have === 0 ) {
       
  2818 												break inf_leave;
       
  2819 											}
       
  2820 											have--;
       
  2821 											// Use '|' instead of '+' to make sure that result is signed
       
  2822 											hold |= input[ next++ ] << bits;
       
  2823 											bits += 8;
       
  2824 										}
       
  2825 										//===//
       
  2826 										_out -= left;
       
  2827 										strm.total_out += _out;
       
  2828 										state.total += _out;
       
  2829 										if ( _out ) {
       
  2830 											strm.adler = state.check =
       
  2831 												/*UPDATE(state.check, put - _out, _out);*/
       
  2832 												state.flags
       
  2833 													? crc32(
       
  2834 															state.check,
       
  2835 															output,
       
  2836 															_out,
       
  2837 															put - _out
       
  2838 													  )
       
  2839 													: adler32(
       
  2840 															state.check,
       
  2841 															output,
       
  2842 															_out,
       
  2843 															put - _out
       
  2844 													  );
       
  2845 										}
       
  2846 										_out = left;
       
  2847 										// NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
       
  2848 										if (
       
  2849 											( state.flags
       
  2850 												? hold
       
  2851 												: zswap32( hold ) ) !==
       
  2852 											state.check
       
  2853 										) {
       
  2854 											strm.msg = 'incorrect data check';
       
  2855 											state.mode = BAD;
       
  2856 											break;
       
  2857 										}
       
  2858 										//=== INITBITS();
       
  2859 										hold = 0;
       
  2860 										bits = 0;
       
  2861 										//===//
       
  2862 										//Tracev((stderr, "inflate:   check matches trailer\n"));
       
  2863 									}
       
  2864 									state.mode = LENGTH;
       
  2865 								/* falls through */
       
  2866 								case LENGTH:
       
  2867 									if ( state.wrap && state.flags ) {
       
  2868 										//=== NEEDBITS(32);
       
  2869 										while ( bits < 32 ) {
       
  2870 											if ( have === 0 ) {
       
  2871 												break inf_leave;
       
  2872 											}
       
  2873 											have--;
       
  2874 											hold += input[ next++ ] << bits;
       
  2875 											bits += 8;
       
  2876 										}
       
  2877 										//===//
       
  2878 										if (
       
  2879 											hold !==
       
  2880 											( state.total & 0xffffffff )
       
  2881 										) {
       
  2882 											strm.msg = 'incorrect length check';
       
  2883 											state.mode = BAD;
       
  2884 											break;
       
  2885 										}
       
  2886 										//=== INITBITS();
       
  2887 										hold = 0;
       
  2888 										bits = 0;
       
  2889 										//===//
       
  2890 										//Tracev((stderr, "inflate:   length matches trailer\n"));
       
  2891 									}
       
  2892 									state.mode = DONE;
       
  2893 								/* falls through */
       
  2894 								case DONE:
       
  2895 									ret = Z_STREAM_END;
       
  2896 									break inf_leave;
       
  2897 								case BAD:
       
  2898 									ret = Z_DATA_ERROR;
       
  2899 									break inf_leave;
       
  2900 								case MEM:
       
  2901 									return Z_MEM_ERROR;
       
  2902 								case SYNC:
       
  2903 								/* falls through */
       
  2904 								default:
       
  2905 									return Z_STREAM_ERROR;
       
  2906 							}
       
  2907 						}
       
  2908 
       
  2909 						// inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
       
  2910 
       
  2911 						/*
       
  2912        Return from inflate(), updating the total counts and the check value.
       
  2913        If there was no progress during the inflate() call, return a buffer
       
  2914        error.  Call updatewindow() to create and/or update the window state.
       
  2915        Note: a memory error from inflate() is non-recoverable.
       
  2916      */
       
  2917 
       
  2918 						//--- RESTORE() ---
       
  2919 						strm.next_out = put;
       
  2920 						strm.avail_out = left;
       
  2921 						strm.next_in = next;
       
  2922 						strm.avail_in = have;
       
  2923 						state.hold = hold;
       
  2924 						state.bits = bits;
       
  2925 						//---
       
  2926 
       
  2927 						if (
       
  2928 							state.wsize ||
       
  2929 							( _out !== strm.avail_out &&
       
  2930 								state.mode < BAD &&
       
  2931 								( state.mode < CHECK || flush !== Z_FINISH ) )
       
  2932 						) {
       
  2933 							if (
       
  2934 								updatewindow(
       
  2935 									strm,
       
  2936 									strm.output,
       
  2937 									strm.next_out,
       
  2938 									_out - strm.avail_out
       
  2939 								)
       
  2940 							) {
       
  2941 								state.mode = MEM;
       
  2942 								return Z_MEM_ERROR;
       
  2943 							}
       
  2944 						}
       
  2945 						_in -= strm.avail_in;
       
  2946 						_out -= strm.avail_out;
       
  2947 						strm.total_in += _in;
       
  2948 						strm.total_out += _out;
       
  2949 						state.total += _out;
       
  2950 						if ( state.wrap && _out ) {
       
  2951 							strm.adler = state.check =
       
  2952 								/*UPDATE(state.check, strm.next_out - _out, _out);*/
       
  2953 								state.flags
       
  2954 									? crc32(
       
  2955 											state.check,
       
  2956 											output,
       
  2957 											_out,
       
  2958 											strm.next_out - _out
       
  2959 									  )
       
  2960 									: adler32(
       
  2961 											state.check,
       
  2962 											output,
       
  2963 											_out,
       
  2964 											strm.next_out - _out
       
  2965 									  );
       
  2966 						}
       
  2967 						strm.data_type =
       
  2968 							state.bits +
       
  2969 							( state.last ? 64 : 0 ) +
       
  2970 							( state.mode === TYPE ? 128 : 0 ) +
       
  2971 							( state.mode === LEN_ || state.mode === COPY_
       
  2972 								? 256
       
  2973 								: 0 );
       
  2974 						if (
       
  2975 							( ( _in === 0 && _out === 0 ) ||
       
  2976 								flush === Z_FINISH ) &&
       
  2977 							ret === Z_OK
       
  2978 						) {
       
  2979 							ret = Z_BUF_ERROR;
       
  2980 						}
       
  2981 						return ret;
       
  2982 					}
       
  2983 
       
  2984 					function inflateEnd( strm ) {
       
  2985 						if (
       
  2986 							! strm ||
       
  2987 							! strm.state /*|| strm->zfree == (free_func)0*/
       
  2988 						) {
       
  2989 							return Z_STREAM_ERROR;
       
  2990 						}
       
  2991 
       
  2992 						var state = strm.state;
       
  2993 						if ( state.window ) {
       
  2994 							state.window = null;
       
  2995 						}
       
  2996 						strm.state = null;
       
  2997 						return Z_OK;
       
  2998 					}
       
  2999 
       
  3000 					function inflateGetHeader( strm, head ) {
       
  3001 						var state;
       
  3002 
       
  3003 						/* check state */
       
  3004 						if ( ! strm || ! strm.state ) {
       
  3005 							return Z_STREAM_ERROR;
       
  3006 						}
       
  3007 						state = strm.state;
       
  3008 						if ( ( state.wrap & 2 ) === 0 ) {
       
  3009 							return Z_STREAM_ERROR;
       
  3010 						}
       
  3011 
       
  3012 						/* save header structure */
       
  3013 						state.head = head;
       
  3014 						head.done = false;
       
  3015 						return Z_OK;
       
  3016 					}
       
  3017 
       
  3018 					function inflateSetDictionary( strm, dictionary ) {
       
  3019 						var dictLength = dictionary.length;
       
  3020 
       
  3021 						var state;
       
  3022 						var dictid;
       
  3023 						var ret;
       
  3024 
       
  3025 						/* check state */
       
  3026 						if (
       
  3027 							! strm /* == Z_NULL */ ||
       
  3028 							! strm.state /* == Z_NULL */
       
  3029 						) {
       
  3030 							return Z_STREAM_ERROR;
       
  3031 						}
       
  3032 						state = strm.state;
       
  3033 
       
  3034 						if ( state.wrap !== 0 && state.mode !== DICT ) {
       
  3035 							return Z_STREAM_ERROR;
       
  3036 						}
       
  3037 
       
  3038 						/* check for correct dictionary identifier */
       
  3039 						if ( state.mode === DICT ) {
       
  3040 							dictid = 1; /* adler32(0, null, 0)*/
       
  3041 							/* dictid = adler32(dictid, dictionary, dictLength); */
       
  3042 							dictid = adler32(
       
  3043 								dictid,
       
  3044 								dictionary,
       
  3045 								dictLength,
       
  3046 								0
       
  3047 							);
       
  3048 							if ( dictid !== state.check ) {
       
  3049 								return Z_DATA_ERROR;
       
  3050 							}
       
  3051 						}
       
  3052 						/* copy dictionary to window using updatewindow(), which will amend the
       
  3053      existing dictionary if appropriate */
       
  3054 						ret = updatewindow(
       
  3055 							strm,
       
  3056 							dictionary,
       
  3057 							dictLength,
       
  3058 							dictLength
       
  3059 						);
       
  3060 						if ( ret ) {
       
  3061 							state.mode = MEM;
       
  3062 							return Z_MEM_ERROR;
       
  3063 						}
       
  3064 						state.havedict = 1;
       
  3065 						// Tracev((stderr, "inflate:   dictionary set\n"));
       
  3066 						return Z_OK;
       
  3067 					}
       
  3068 
       
  3069 					exports.inflateReset = inflateReset;
       
  3070 					exports.inflateReset2 = inflateReset2;
       
  3071 					exports.inflateResetKeep = inflateResetKeep;
       
  3072 					exports.inflateInit = inflateInit;
       
  3073 					exports.inflateInit2 = inflateInit2;
       
  3074 					exports.inflate = inflate;
       
  3075 					exports.inflateEnd = inflateEnd;
       
  3076 					exports.inflateGetHeader = inflateGetHeader;
       
  3077 					exports.inflateSetDictionary = inflateSetDictionary;
       
  3078 					exports.inflateInfo = 'pako inflate (from Nodeca project)';
       
  3079 
       
  3080 					/* Not implemented
       
  3081   exports.inflateCopy = inflateCopy;
       
  3082   exports.inflateGetDictionary = inflateGetDictionary;
       
  3083   exports.inflateMark = inflateMark;
       
  3084   exports.inflatePrime = inflatePrime;
       
  3085   exports.inflateSync = inflateSync;
       
  3086   exports.inflateSyncPoint = inflateSyncPoint;
       
  3087   exports.inflateUndermine = inflateUndermine;
       
  3088   */
       
  3089 				},
       
  3090 				{
       
  3091 					'../utils/common': 1,
       
  3092 					'./adler32': 3,
       
  3093 					'./crc32': 5,
       
  3094 					'./inffast': 7,
       
  3095 					'./inftrees': 9,
       
  3096 				},
       
  3097 			],
       
  3098 			9: [
       
  3099 				function ( require, module, exports ) {
       
  3100 					'use strict';
       
  3101 
       
  3102 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
  3103 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
  3104 					//
       
  3105 					// This software is provided 'as-is', without any express or implied
       
  3106 					// warranty. In no event will the authors be held liable for any damages
       
  3107 					// arising from the use of this software.
       
  3108 					//
       
  3109 					// Permission is granted to anyone to use this software for any purpose,
       
  3110 					// including commercial applications, and to alter it and redistribute it
       
  3111 					// freely, subject to the following restrictions:
       
  3112 					//
       
  3113 					// 1. The origin of this software must not be misrepresented; you must not
       
  3114 					//   claim that you wrote the original software. If you use this software
       
  3115 					//   in a product, an acknowledgment in the product documentation would be
       
  3116 					//   appreciated but is not required.
       
  3117 					// 2. Altered source versions must be plainly marked as such, and must not be
       
  3118 					//   misrepresented as being the original software.
       
  3119 					// 3. This notice may not be removed or altered from any source distribution.
       
  3120 
       
  3121 					var utils = require( '../utils/common' );
       
  3122 
       
  3123 					var MAXBITS = 15;
       
  3124 					var ENOUGH_LENS = 852;
       
  3125 					var ENOUGH_DISTS = 592;
       
  3126 					//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
       
  3127 
       
  3128 					var CODES = 0;
       
  3129 					var LENS = 1;
       
  3130 					var DISTS = 2;
       
  3131 
       
  3132 					var lbase = [
       
  3133 						/* Length codes 257..285 base */ 3, 4, 5, 6, 7, 8, 9,
       
  3134 						10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67,
       
  3135 						83, 99, 115, 131, 163, 195, 227, 258, 0, 0,
       
  3136 					];
       
  3137 
       
  3138 					var lext = [
       
  3139 						/* Length codes 257..285 extra */ 16, 16, 16, 16, 16,
       
  3140 						16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19,
       
  3141 						19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78,
       
  3142 					];
       
  3143 
       
  3144 					var dbase = [
       
  3145 						/* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13,
       
  3146 						17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769,
       
  3147 						1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385,
       
  3148 						24577, 0, 0,
       
  3149 					];
       
  3150 
       
  3151 					var dext = [
       
  3152 						/* Distance codes 0..29 extra */ 16, 16, 16, 16, 17, 17,
       
  3153 						18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24,
       
  3154 						25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64,
       
  3155 					];
       
  3156 
       
  3157 					module.exports = function inflate_table(
       
  3158 						type,
       
  3159 						lens,
       
  3160 						lens_index,
       
  3161 						codes,
       
  3162 						table,
       
  3163 						table_index,
       
  3164 						work,
       
  3165 						opts
       
  3166 					) {
       
  3167 						var bits = opts.bits;
       
  3168 						//here = opts.here; /* table entry for duplication */
       
  3169 
       
  3170 						var len = 0; /* a code's length in bits */
       
  3171 						var sym = 0; /* index of code symbols */
       
  3172 						var min = 0,
       
  3173 							max = 0; /* minimum and maximum code lengths */
       
  3174 						var root = 0; /* number of index bits for root table */
       
  3175 						var curr = 0; /* number of index bits for current table */
       
  3176 						var drop = 0; /* code bits to drop for sub-table */
       
  3177 						var left = 0; /* number of prefix codes available */
       
  3178 						var used = 0; /* code entries in table used */
       
  3179 						var huff = 0; /* Huffman code */
       
  3180 						var incr; /* for incrementing code, index */
       
  3181 						var fill; /* index for replicating entries */
       
  3182 						var low; /* low bits for current root entry */
       
  3183 						var mask; /* mask for low root bits */
       
  3184 						var next; /* next available space in table */
       
  3185 						var base = null; /* base value table to use */
       
  3186 						var base_index = 0;
       
  3187 						//  var shoextra;    /* extra bits table to use */
       
  3188 						var end; /* use base and extra for symbol > end */
       
  3189 						var count = new utils.Buf16( MAXBITS + 1 ); //[MAXBITS+1];    /* number of codes of each length */
       
  3190 						var offs = new utils.Buf16( MAXBITS + 1 ); //[MAXBITS+1];     /* offsets in table for each length */
       
  3191 						var extra = null;
       
  3192 						var extra_index = 0;
       
  3193 
       
  3194 						var here_bits, here_op, here_val;
       
  3195 
       
  3196 						/*
       
  3197      Process a set of code lengths to create a canonical Huffman code.  The
       
  3198      code lengths are lens[0..codes-1].  Each length corresponds to the
       
  3199      symbols 0..codes-1.  The Huffman code is generated by first sorting the
       
  3200      symbols by length from short to long, and retaining the symbol order
       
  3201      for codes with equal lengths.  Then the code starts with all zero bits
       
  3202      for the first code of the shortest length, and the codes are integer
       
  3203      increments for the same length, and zeros are appended as the length
       
  3204      increases.  For the deflate format, these bits are stored backwards
       
  3205      from their more natural integer increment ordering, and so when the
       
  3206      decoding tables are built in the large loop below, the integer codes
       
  3207      are incremented backwards.
       
  3208 
       
  3209      This routine assumes, but does not check, that all of the entries in
       
  3210      lens[] are in the range 0..MAXBITS.  The caller must assure this.
       
  3211      1..MAXBITS is interpreted as that code length.  zero means that that
       
  3212      symbol does not occur in this code.
       
  3213 
       
  3214      The codes are sorted by computing a count of codes for each length,
       
  3215      creating from that a table of starting indices for each length in the
       
  3216      sorted table, and then entering the symbols in order in the sorted
       
  3217      table.  The sorted table is work[], with that space being provided by
       
  3218      the caller.
       
  3219 
       
  3220      The length counts are used for other purposes as well, i.e. finding
       
  3221      the minimum and maximum length codes, determining if there are any
       
  3222      codes at all, checking for a valid set of lengths, and looking ahead
       
  3223      at length counts to determine sub-table sizes when building the
       
  3224      decoding tables.
       
  3225      */
       
  3226 
       
  3227 						/* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
       
  3228 						for ( len = 0; len <= MAXBITS; len++ ) {
       
  3229 							count[ len ] = 0;
       
  3230 						}
       
  3231 						for ( sym = 0; sym < codes; sym++ ) {
       
  3232 							count[ lens[ lens_index + sym ] ]++;
       
  3233 						}
       
  3234 
       
  3235 						/* bound code lengths, force root to be within code lengths */
       
  3236 						root = bits;
       
  3237 						for ( max = MAXBITS; max >= 1; max-- ) {
       
  3238 							if ( count[ max ] !== 0 ) {
       
  3239 								break;
       
  3240 							}
       
  3241 						}
       
  3242 						if ( root > max ) {
       
  3243 							root = max;
       
  3244 						}
       
  3245 						if ( max === 0 ) {
       
  3246 							/* no symbols to code at all */
       
  3247 							//table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */
       
  3248 							//table.bits[opts.table_index] = 1;   //here.bits = (var char)1;
       
  3249 							//table.val[opts.table_index++] = 0;   //here.val = (var short)0;
       
  3250 							table[ table_index++ ] =
       
  3251 								( 1 << 24 ) | ( 64 << 16 ) | 0;
       
  3252 
       
  3253 							//table.op[opts.table_index] = 64;
       
  3254 							//table.bits[opts.table_index] = 1;
       
  3255 							//table.val[opts.table_index++] = 0;
       
  3256 							table[ table_index++ ] =
       
  3257 								( 1 << 24 ) | ( 64 << 16 ) | 0;
       
  3258 
       
  3259 							opts.bits = 1;
       
  3260 							return 0; /* no symbols, but wait for decoding to report error */
       
  3261 						}
       
  3262 						for ( min = 1; min < max; min++ ) {
       
  3263 							if ( count[ min ] !== 0 ) {
       
  3264 								break;
       
  3265 							}
       
  3266 						}
       
  3267 						if ( root < min ) {
       
  3268 							root = min;
       
  3269 						}
       
  3270 
       
  3271 						/* check for an over-subscribed or incomplete set of lengths */
       
  3272 						left = 1;
       
  3273 						for ( len = 1; len <= MAXBITS; len++ ) {
       
  3274 							left <<= 1;
       
  3275 							left -= count[ len ];
       
  3276 							if ( left < 0 ) {
       
  3277 								return -1;
       
  3278 							} /* over-subscribed */
       
  3279 						}
       
  3280 						if ( left > 0 && ( type === CODES || max !== 1 ) ) {
       
  3281 							return -1; /* incomplete set */
       
  3282 						}
       
  3283 
       
  3284 						/* generate offsets into symbol table for each length for sorting */
       
  3285 						offs[ 1 ] = 0;
       
  3286 						for ( len = 1; len < MAXBITS; len++ ) {
       
  3287 							offs[ len + 1 ] = offs[ len ] + count[ len ];
       
  3288 						}
       
  3289 
       
  3290 						/* sort symbols by length, by symbol order within each length */
       
  3291 						for ( sym = 0; sym < codes; sym++ ) {
       
  3292 							if ( lens[ lens_index + sym ] !== 0 ) {
       
  3293 								work[ offs[ lens[ lens_index + sym ] ]++ ] =
       
  3294 									sym;
       
  3295 							}
       
  3296 						}
       
  3297 
       
  3298 						/*
       
  3299      Create and fill in decoding tables.  In this loop, the table being
       
  3300      filled is at next and has curr index bits.  The code being used is huff
       
  3301      with length len.  That code is converted to an index by dropping drop
       
  3302      bits off of the bottom.  For codes where len is less than drop + curr,
       
  3303      those top drop + curr - len bits are incremented through all values to
       
  3304      fill the table with replicated entries.
       
  3305 
       
  3306      root is the number of index bits for the root table.  When len exceeds
       
  3307      root, sub-tables are created pointed to by the root entry with an index
       
  3308      of the low root bits of huff.  This is saved in low to check for when a
       
  3309      new sub-table should be started.  drop is zero when the root table is
       
  3310      being filled, and drop is root when sub-tables are being filled.
       
  3311 
       
  3312      When a new sub-table is needed, it is necessary to look ahead in the
       
  3313      code lengths to determine what size sub-table is needed.  The length
       
  3314      counts are used for this, and so count[] is decremented as codes are
       
  3315      entered in the tables.
       
  3316 
       
  3317      used keeps track of how many table entries have been allocated from the
       
  3318      provided *table space.  It is checked for LENS and DIST tables against
       
  3319      the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
       
  3320      the initial root table size constants.  See the comments in inftrees.h
       
  3321      for more information.
       
  3322 
       
  3323      sym increments through all symbols, and the loop terminates when
       
  3324      all codes of length max, i.e. all codes, have been processed.  This
       
  3325      routine permits incomplete codes, so another loop after this one fills
       
  3326      in the rest of the decoding tables with invalid code markers.
       
  3327      */
       
  3328 
       
  3329 						/* set up for code type */
       
  3330 						// poor man optimization - use if-else instead of switch,
       
  3331 						// to avoid deopts in old v8
       
  3332 						if ( type === CODES ) {
       
  3333 							base = extra = work; /* dummy value--not used */
       
  3334 							end = 19;
       
  3335 						} else if ( type === LENS ) {
       
  3336 							base = lbase;
       
  3337 							base_index -= 257;
       
  3338 							extra = lext;
       
  3339 							extra_index -= 257;
       
  3340 							end = 256;
       
  3341 						} else {
       
  3342 							/* DISTS */
       
  3343 							base = dbase;
       
  3344 							extra = dext;
       
  3345 							end = -1;
       
  3346 						}
       
  3347 
       
  3348 						/* initialize opts for loop */
       
  3349 						huff = 0; /* starting code */
       
  3350 						sym = 0; /* starting code symbol */
       
  3351 						len = min; /* starting code length */
       
  3352 						next = table_index; /* current table to fill in */
       
  3353 						curr = root; /* current table index bits */
       
  3354 						drop = 0; /* current bits to drop from code for index */
       
  3355 						low = -1; /* trigger new sub-table when len > root */
       
  3356 						used = 1 << root; /* use root table entries */
       
  3357 						mask = used - 1; /* mask for comparing low */
       
  3358 
       
  3359 						/* check available table space */
       
  3360 						if (
       
  3361 							( type === LENS && used > ENOUGH_LENS ) ||
       
  3362 							( type === DISTS && used > ENOUGH_DISTS )
       
  3363 						) {
       
  3364 							return 1;
       
  3365 						}
       
  3366 
       
  3367 						/* process all codes and make table entries */
       
  3368 						for (;;) {
       
  3369 							/* create table entry */
       
  3370 							here_bits = len - drop;
       
  3371 							if ( work[ sym ] < end ) {
       
  3372 								here_op = 0;
       
  3373 								here_val = work[ sym ];
       
  3374 							} else if ( work[ sym ] > end ) {
       
  3375 								here_op = extra[ extra_index + work[ sym ] ];
       
  3376 								here_val = base[ base_index + work[ sym ] ];
       
  3377 							} else {
       
  3378 								here_op = 32 + 64; /* end of block */
       
  3379 								here_val = 0;
       
  3380 							}
       
  3381 
       
  3382 							/* replicate for those indices with low len bits equal to huff */
       
  3383 							incr = 1 << ( len - drop );
       
  3384 							fill = 1 << curr;
       
  3385 							min = fill; /* save offset to next table */
       
  3386 							do {
       
  3387 								fill -= incr;
       
  3388 								table[ next + ( huff >> drop ) + fill ] =
       
  3389 									( here_bits << 24 ) |
       
  3390 									( here_op << 16 ) |
       
  3391 									here_val |
       
  3392 									0;
       
  3393 							} while ( fill !== 0 );
       
  3394 
       
  3395 							/* backwards increment the len-bit code huff */
       
  3396 							incr = 1 << ( len - 1 );
       
  3397 							while ( huff & incr ) {
       
  3398 								incr >>= 1;
       
  3399 							}
       
  3400 							if ( incr !== 0 ) {
       
  3401 								huff &= incr - 1;
       
  3402 								huff += incr;
       
  3403 							} else {
       
  3404 								huff = 0;
       
  3405 							}
       
  3406 
       
  3407 							/* go to next symbol, update count, len */
       
  3408 							sym++;
       
  3409 							if ( --count[ len ] === 0 ) {
       
  3410 								if ( len === max ) {
       
  3411 									break;
       
  3412 								}
       
  3413 								len = lens[ lens_index + work[ sym ] ];
       
  3414 							}
       
  3415 
       
  3416 							/* create new sub-table if needed */
       
  3417 							if ( len > root && ( huff & mask ) !== low ) {
       
  3418 								/* if first time, transition to sub-tables */
       
  3419 								if ( drop === 0 ) {
       
  3420 									drop = root;
       
  3421 								}
       
  3422 
       
  3423 								/* increment past last table */
       
  3424 								next += min; /* here min is 1 << curr */
       
  3425 
       
  3426 								/* determine length of next table */
       
  3427 								curr = len - drop;
       
  3428 								left = 1 << curr;
       
  3429 								while ( curr + drop < max ) {
       
  3430 									left -= count[ curr + drop ];
       
  3431 									if ( left <= 0 ) {
       
  3432 										break;
       
  3433 									}
       
  3434 									curr++;
       
  3435 									left <<= 1;
       
  3436 								}
       
  3437 
       
  3438 								/* check for enough space */
       
  3439 								used += 1 << curr;
       
  3440 								if (
       
  3441 									( type === LENS && used > ENOUGH_LENS ) ||
       
  3442 									( type === DISTS && used > ENOUGH_DISTS )
       
  3443 								) {
       
  3444 									return 1;
       
  3445 								}
       
  3446 
       
  3447 								/* point entry in root table to sub-table */
       
  3448 								low = huff & mask;
       
  3449 								/*table.op[low] = curr;
       
  3450         table.bits[low] = root;
       
  3451         table.val[low] = next - opts.table_index;*/
       
  3452 								table[ low ] =
       
  3453 									( root << 24 ) |
       
  3454 									( curr << 16 ) |
       
  3455 									( next - table_index ) |
       
  3456 									0;
       
  3457 							}
       
  3458 						}
       
  3459 
       
  3460 						/* fill in remaining table entry if code is incomplete (guaranteed to have
       
  3461      at most one remaining entry, since if the code is incomplete, the
       
  3462      maximum code length that was allowed to get this far is one bit) */
       
  3463 						if ( huff !== 0 ) {
       
  3464 							//table.op[next + huff] = 64;            /* invalid code marker */
       
  3465 							//table.bits[next + huff] = len - drop;
       
  3466 							//table.val[next + huff] = 0;
       
  3467 							table[ next + huff ] =
       
  3468 								( ( len - drop ) << 24 ) | ( 64 << 16 ) | 0;
       
  3469 						}
       
  3470 
       
  3471 						/* set return parameters */
       
  3472 						//opts.table_index += used;
       
  3473 						opts.bits = root;
       
  3474 						return 0;
       
  3475 					};
       
  3476 				},
       
  3477 				{ '../utils/common': 1 },
       
  3478 			],
       
  3479 			10: [
       
  3480 				function ( require, module, exports ) {
       
  3481 					'use strict';
       
  3482 
       
  3483 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
  3484 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
  3485 					//
       
  3486 					// This software is provided 'as-is', without any express or implied
       
  3487 					// warranty. In no event will the authors be held liable for any damages
       
  3488 					// arising from the use of this software.
       
  3489 					//
       
  3490 					// Permission is granted to anyone to use this software for any purpose,
       
  3491 					// including commercial applications, and to alter it and redistribute it
       
  3492 					// freely, subject to the following restrictions:
       
  3493 					//
       
  3494 					// 1. The origin of this software must not be misrepresented; you must not
       
  3495 					//   claim that you wrote the original software. If you use this software
       
  3496 					//   in a product, an acknowledgment in the product documentation would be
       
  3497 					//   appreciated but is not required.
       
  3498 					// 2. Altered source versions must be plainly marked as such, and must not be
       
  3499 					//   misrepresented as being the original software.
       
  3500 					// 3. This notice may not be removed or altered from any source distribution.
       
  3501 
       
  3502 					module.exports = {
       
  3503 						2: 'need dictionary' /* Z_NEED_DICT       2  */,
       
  3504 						1: 'stream end' /* Z_STREAM_END      1  */,
       
  3505 						0: '' /* Z_OK              0  */,
       
  3506 						'-1': 'file error' /* Z_ERRNO         (-1) */,
       
  3507 						'-2': 'stream error' /* Z_STREAM_ERROR  (-2) */,
       
  3508 						'-3': 'data error' /* Z_DATA_ERROR    (-3) */,
       
  3509 						'-4': 'insufficient memory' /* Z_MEM_ERROR     (-4) */,
       
  3510 						'-5': 'buffer error' /* Z_BUF_ERROR     (-5) */,
       
  3511 						'-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */,
       
  3512 					};
       
  3513 				},
       
  3514 				{},
       
  3515 			],
       
  3516 			11: [
       
  3517 				function ( require, module, exports ) {
       
  3518 					'use strict';
       
  3519 
       
  3520 					// (C) 1995-2013 Jean-loup Gailly and Mark Adler
       
  3521 					// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
       
  3522 					//
       
  3523 					// This software is provided 'as-is', without any express or implied
       
  3524 					// warranty. In no event will the authors be held liable for any damages
       
  3525 					// arising from the use of this software.
       
  3526 					//
       
  3527 					// Permission is granted to anyone to use this software for any purpose,
       
  3528 					// including commercial applications, and to alter it and redistribute it
       
  3529 					// freely, subject to the following restrictions:
       
  3530 					//
       
  3531 					// 1. The origin of this software must not be misrepresented; you must not
       
  3532 					//   claim that you wrote the original software. If you use this software
       
  3533 					//   in a product, an acknowledgment in the product documentation would be
       
  3534 					//   appreciated but is not required.
       
  3535 					// 2. Altered source versions must be plainly marked as such, and must not be
       
  3536 					//   misrepresented as being the original software.
       
  3537 					// 3. This notice may not be removed or altered from any source distribution.
       
  3538 
       
  3539 					function ZStream() {
       
  3540 						/* next input byte */
       
  3541 						this.input = null; // JS specific, because we have no pointers
       
  3542 						this.next_in = 0;
       
  3543 						/* number of bytes available at input */
       
  3544 						this.avail_in = 0;
       
  3545 						/* total number of input bytes read so far */
       
  3546 						this.total_in = 0;
       
  3547 						/* next output byte should be put there */
       
  3548 						this.output = null; // JS specific, because we have no pointers
       
  3549 						this.next_out = 0;
       
  3550 						/* remaining free space at output */
       
  3551 						this.avail_out = 0;
       
  3552 						/* total number of bytes output so far */
       
  3553 						this.total_out = 0;
       
  3554 						/* last error message, NULL if no error */
       
  3555 						this.msg = '' /*Z_NULL*/;
       
  3556 						/* not visible by applications */
       
  3557 						this.state = null;
       
  3558 						/* best guess about the data type: binary or text */
       
  3559 						this.data_type = 2 /*Z_UNKNOWN*/;
       
  3560 						/* adler32 value of the uncompressed data */
       
  3561 						this.adler = 0;
       
  3562 					}
       
  3563 
       
  3564 					module.exports = ZStream;
       
  3565 				},
       
  3566 				{},
       
  3567 			],
       
  3568 			'/lib/inflate.js': [
       
  3569 				function ( require, module, exports ) {
       
  3570 					'use strict';
       
  3571 
       
  3572 					var zlib_inflate = require( './zlib/inflate' );
       
  3573 					var utils = require( './utils/common' );
       
  3574 					var strings = require( './utils/strings' );
       
  3575 					var c = require( './zlib/constants' );
       
  3576 					var msg = require( './zlib/messages' );
       
  3577 					var ZStream = require( './zlib/zstream' );
       
  3578 					var GZheader = require( './zlib/gzheader' );
       
  3579 
       
  3580 					var toString = Object.prototype.toString;
       
  3581 
       
  3582 					/**
       
  3583 					 * class Inflate
       
  3584 					 *
       
  3585 					 * Generic JS-style wrapper for zlib calls. If you don't need
       
  3586 					 * streaming behaviour - use more simple functions: [[inflate]]
       
  3587 					 * and [[inflateRaw]].
       
  3588 					 **/
       
  3589 
       
  3590 					/* internal
       
  3591 					 * inflate.chunks -> Array
       
  3592 					 *
       
  3593 					 * Chunks of output data, if [[Inflate#onData]] not overridden.
       
  3594 					 **/
       
  3595 
       
  3596 					/**
       
  3597 					 * Inflate.result -> Uint8Array|Array|String
       
  3598 					 *
       
  3599 					 * Uncompressed result, generated by default [[Inflate#onData]]
       
  3600 					 * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
       
  3601 					 * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you
       
  3602 					 * push a chunk with explicit flush (call [[Inflate#push]] with
       
  3603 					 * `Z_SYNC_FLUSH` param).
       
  3604 					 **/
       
  3605 
       
  3606 					/**
       
  3607 					 * Inflate.err -> Number
       
  3608 					 *
       
  3609 					 * Error code after inflate finished. 0 (Z_OK) on success.
       
  3610 					 * Should be checked if broken data possible.
       
  3611 					 **/
       
  3612 
       
  3613 					/**
       
  3614 					 * Inflate.msg -> String
       
  3615 					 *
       
  3616 					 * Error message, if [[Inflate.err]] != 0
       
  3617 					 **/
       
  3618 
       
  3619 					/**
       
  3620 					 * new Inflate(options)
       
  3621 					 * - options (Object): zlib inflate options.
       
  3622 					 *
       
  3623 					 * Creates new inflator instance with specified params. Throws exception
       
  3624 					 * on bad params. Supported options:
       
  3625 					 *
       
  3626 					 * - `windowBits`
       
  3627 					 * - `dictionary`
       
  3628 					 *
       
  3629 					 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
       
  3630 					 * for more information on these.
       
  3631 					 *
       
  3632 					 * Additional options, for internal needs:
       
  3633 					 *
       
  3634 					 * - `chunkSize` - size of generated data chunks (16K by default)
       
  3635 					 * - `raw` (Boolean) - do raw inflate
       
  3636 					 * - `to` (String) - if equal to 'string', then result will be converted
       
  3637 					 *   from utf8 to utf16 (javascript) string. When string output requested,
       
  3638 					 *   chunk length can differ from `chunkSize`, depending on content.
       
  3639 					 *
       
  3640 					 * By default, when no options set, autodetect deflate/gzip data format via
       
  3641 					 * wrapper header.
       
  3642 					 *
       
  3643 					 * ##### Example:
       
  3644 					 *
       
  3645 					 * ```javascript
       
  3646 					 * var pako = require('pako')
       
  3647 					 *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
       
  3648 					 *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
       
  3649 					 *
       
  3650 					 * var inflate = new pako.Inflate({ level: 3});
       
  3651 					 *
       
  3652 					 * inflate.push(chunk1, false);
       
  3653 					 * inflate.push(chunk2, true);  // true -> last chunk
       
  3654 					 *
       
  3655 					 * if (inflate.err) { throw new Error(inflate.err); }
       
  3656 					 *
       
  3657 					 * console.log(inflate.result);
       
  3658 					 * ```
       
  3659 					 **/
       
  3660 					function Inflate( options ) {
       
  3661 						if ( ! ( this instanceof Inflate ) )
       
  3662 							return new Inflate( options );
       
  3663 
       
  3664 						this.options = utils.assign(
       
  3665 							{
       
  3666 								chunkSize: 16384,
       
  3667 								windowBits: 0,
       
  3668 								to: '',
       
  3669 							},
       
  3670 							options || {}
       
  3671 						);
       
  3672 
       
  3673 						var opt = this.options;
       
  3674 
       
  3675 						// Force window size for `raw` data, if not set directly,
       
  3676 						// because we have no header for autodetect.
       
  3677 						if (
       
  3678 							opt.raw &&
       
  3679 							opt.windowBits >= 0 &&
       
  3680 							opt.windowBits < 16
       
  3681 						) {
       
  3682 							opt.windowBits = -opt.windowBits;
       
  3683 							if ( opt.windowBits === 0 ) {
       
  3684 								opt.windowBits = -15;
       
  3685 							}
       
  3686 						}
       
  3687 
       
  3688 						// If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
       
  3689 						if (
       
  3690 							opt.windowBits >= 0 &&
       
  3691 							opt.windowBits < 16 &&
       
  3692 							! ( options && options.windowBits )
       
  3693 						) {
       
  3694 							opt.windowBits += 32;
       
  3695 						}
       
  3696 
       
  3697 						// Gzip header has no info about windows size, we can do autodetect only
       
  3698 						// for deflate. So, if window size not set, force it to max when gzip possible
       
  3699 						if ( opt.windowBits > 15 && opt.windowBits < 48 ) {
       
  3700 							// bit 3 (16) -> gzipped data
       
  3701 							// bit 4 (32) -> autodetect gzip/deflate
       
  3702 							if ( ( opt.windowBits & 15 ) === 0 ) {
       
  3703 								opt.windowBits |= 15;
       
  3704 							}
       
  3705 						}
       
  3706 
       
  3707 						this.err = 0; // error code, if happens (0 = Z_OK)
       
  3708 						this.msg = ''; // error message
       
  3709 						this.ended = false; // used to avoid multiple onEnd() calls
       
  3710 						this.chunks = []; // chunks of compressed data
       
  3711 
       
  3712 						this.strm = new ZStream();
       
  3713 						this.strm.avail_out = 0;
       
  3714 
       
  3715 						var status = zlib_inflate.inflateInit2(
       
  3716 							this.strm,
       
  3717 							opt.windowBits
       
  3718 						);
       
  3719 
       
  3720 						if ( status !== c.Z_OK ) {
       
  3721 							throw new Error( msg[ status ] );
       
  3722 						}
       
  3723 
       
  3724 						this.header = new GZheader();
       
  3725 
       
  3726 						zlib_inflate.inflateGetHeader( this.strm, this.header );
       
  3727 
       
  3728 						// Setup dictionary
       
  3729 						if ( opt.dictionary ) {
       
  3730 							// Convert data if needed
       
  3731 							if ( typeof opt.dictionary === 'string' ) {
       
  3732 								opt.dictionary = strings.string2buf(
       
  3733 									opt.dictionary
       
  3734 								);
       
  3735 							} else if (
       
  3736 								toString.call( opt.dictionary ) ===
       
  3737 								'[object ArrayBuffer]'
       
  3738 							) {
       
  3739 								opt.dictionary = new Uint8Array(
       
  3740 									opt.dictionary
       
  3741 								);
       
  3742 							}
       
  3743 							if ( opt.raw ) {
       
  3744 								//In raw mode we need to set the dictionary early
       
  3745 								status = zlib_inflate.inflateSetDictionary(
       
  3746 									this.strm,
       
  3747 									opt.dictionary
       
  3748 								);
       
  3749 								if ( status !== c.Z_OK ) {
       
  3750 									throw new Error( msg[ status ] );
       
  3751 								}
       
  3752 							}
   331 						}
  3753 						}
   332 					}
  3754 					}
   333 				} else {
  3755 
   334 					classes.push(arg.toString());
  3756 					/**
       
  3757 					 * Inflate#push(data[, mode]) -> Boolean
       
  3758 					 * - data (Uint8Array|Array|ArrayBuffer|String): input data
       
  3759 					 * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
       
  3760 					 *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
       
  3761 					 *
       
  3762 					 * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
       
  3763 					 * new output chunks. Returns `true` on success. The last data block must have
       
  3764 					 * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
       
  3765 					 * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you
       
  3766 					 * can use mode Z_SYNC_FLUSH, keeping the decompression context.
       
  3767 					 *
       
  3768 					 * On fail call [[Inflate#onEnd]] with error code and return false.
       
  3769 					 *
       
  3770 					 * We strongly recommend to use `Uint8Array` on input for best speed (output
       
  3771 					 * format is detected automatically). Also, don't skip last param and always
       
  3772 					 * use the same type in your code (boolean or number). That will improve JS speed.
       
  3773 					 *
       
  3774 					 * For regular `Array`-s make sure all elements are [0..255].
       
  3775 					 *
       
  3776 					 * ##### Example
       
  3777 					 *
       
  3778 					 * ```javascript
       
  3779 					 * push(chunk, false); // push one of data chunks
       
  3780 					 * ...
       
  3781 					 * push(chunk, true);  // push last chunk
       
  3782 					 * ```
       
  3783 					 **/
       
  3784 					Inflate.prototype.push = function ( data, mode ) {
       
  3785 						var strm = this.strm;
       
  3786 						var chunkSize = this.options.chunkSize;
       
  3787 						var dictionary = this.options.dictionary;
       
  3788 						var status, _mode;
       
  3789 						var next_out_utf8, tail, utf8str;
       
  3790 
       
  3791 						// Flag to properly process Z_BUF_ERROR on testing inflate call
       
  3792 						// when we check that all output data was flushed.
       
  3793 						var allowBufError = false;
       
  3794 
       
  3795 						if ( this.ended ) {
       
  3796 							return false;
       
  3797 						}
       
  3798 						_mode =
       
  3799 							mode === ~~mode
       
  3800 								? mode
       
  3801 								: mode === true
       
  3802 								? c.Z_FINISH
       
  3803 								: c.Z_NO_FLUSH;
       
  3804 
       
  3805 						// Convert data if needed
       
  3806 						if ( typeof data === 'string' ) {
       
  3807 							// Only binary strings can be decompressed on practice
       
  3808 							strm.input = strings.binstring2buf( data );
       
  3809 						} else if (
       
  3810 							toString.call( data ) === '[object ArrayBuffer]'
       
  3811 						) {
       
  3812 							strm.input = new Uint8Array( data );
       
  3813 						} else {
       
  3814 							strm.input = data;
       
  3815 						}
       
  3816 
       
  3817 						strm.next_in = 0;
       
  3818 						strm.avail_in = strm.input.length;
       
  3819 
       
  3820 						do {
       
  3821 							if ( strm.avail_out === 0 ) {
       
  3822 								strm.output = new utils.Buf8( chunkSize );
       
  3823 								strm.next_out = 0;
       
  3824 								strm.avail_out = chunkSize;
       
  3825 							}
       
  3826 
       
  3827 							status = zlib_inflate.inflate(
       
  3828 								strm,
       
  3829 								c.Z_NO_FLUSH
       
  3830 							); /* no bad return value */
       
  3831 
       
  3832 							if ( status === c.Z_NEED_DICT && dictionary ) {
       
  3833 								status = zlib_inflate.inflateSetDictionary(
       
  3834 									this.strm,
       
  3835 									dictionary
       
  3836 								);
       
  3837 							}
       
  3838 
       
  3839 							if (
       
  3840 								status === c.Z_BUF_ERROR &&
       
  3841 								allowBufError === true
       
  3842 							) {
       
  3843 								status = c.Z_OK;
       
  3844 								allowBufError = false;
       
  3845 							}
       
  3846 
       
  3847 							if (
       
  3848 								status !== c.Z_STREAM_END &&
       
  3849 								status !== c.Z_OK
       
  3850 							) {
       
  3851 								this.onEnd( status );
       
  3852 								this.ended = true;
       
  3853 								return false;
       
  3854 							}
       
  3855 
       
  3856 							if ( strm.next_out ) {
       
  3857 								if (
       
  3858 									strm.avail_out === 0 ||
       
  3859 									status === c.Z_STREAM_END ||
       
  3860 									( strm.avail_in === 0 &&
       
  3861 										( _mode === c.Z_FINISH ||
       
  3862 											_mode === c.Z_SYNC_FLUSH ) )
       
  3863 								) {
       
  3864 									if ( this.options.to === 'string' ) {
       
  3865 										next_out_utf8 = strings.utf8border(
       
  3866 											strm.output,
       
  3867 											strm.next_out
       
  3868 										);
       
  3869 
       
  3870 										tail = strm.next_out - next_out_utf8;
       
  3871 										utf8str = strings.buf2string(
       
  3872 											strm.output,
       
  3873 											next_out_utf8
       
  3874 										);
       
  3875 
       
  3876 										// move tail
       
  3877 										strm.next_out = tail;
       
  3878 										strm.avail_out = chunkSize - tail;
       
  3879 										if ( tail ) {
       
  3880 											utils.arraySet(
       
  3881 												strm.output,
       
  3882 												strm.output,
       
  3883 												next_out_utf8,
       
  3884 												tail,
       
  3885 												0
       
  3886 											);
       
  3887 										}
       
  3888 
       
  3889 										this.onData( utf8str );
       
  3890 									} else {
       
  3891 										this.onData(
       
  3892 											utils.shrinkBuf(
       
  3893 												strm.output,
       
  3894 												strm.next_out
       
  3895 											)
       
  3896 										);
       
  3897 									}
       
  3898 								}
       
  3899 							}
       
  3900 
       
  3901 							// When no more input data, we should check that internal inflate buffers
       
  3902 							// are flushed. The only way to do it when avail_out = 0 - run one more
       
  3903 							// inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.
       
  3904 							// Here we set flag to process this error properly.
       
  3905 							//
       
  3906 							// NOTE. Deflate does not return error in this case and does not needs such
       
  3907 							// logic.
       
  3908 							if ( strm.avail_in === 0 && strm.avail_out === 0 ) {
       
  3909 								allowBufError = true;
       
  3910 							}
       
  3911 						} while (
       
  3912 							( strm.avail_in > 0 || strm.avail_out === 0 ) &&
       
  3913 							status !== c.Z_STREAM_END
       
  3914 						);
       
  3915 
       
  3916 						if ( status === c.Z_STREAM_END ) {
       
  3917 							_mode = c.Z_FINISH;
       
  3918 						}
       
  3919 
       
  3920 						// Finalize on the last chunk.
       
  3921 						if ( _mode === c.Z_FINISH ) {
       
  3922 							status = zlib_inflate.inflateEnd( this.strm );
       
  3923 							this.onEnd( status );
       
  3924 							this.ended = true;
       
  3925 							return status === c.Z_OK;
       
  3926 						}
       
  3927 
       
  3928 						// callback interim results if Z_SYNC_FLUSH.
       
  3929 						if ( _mode === c.Z_SYNC_FLUSH ) {
       
  3930 							this.onEnd( c.Z_OK );
       
  3931 							strm.avail_out = 0;
       
  3932 							return true;
       
  3933 						}
       
  3934 
       
  3935 						return true;
       
  3936 					};
       
  3937 
       
  3938 					/**
       
  3939 					 * Inflate#onData(chunk) -> Void
       
  3940 					 * - chunk (Uint8Array|Array|String): output data. Type of array depends
       
  3941 					 *   on js engine support. When string output requested, each chunk
       
  3942 					 *   will be string.
       
  3943 					 *
       
  3944 					 * By default, stores data blocks in `chunks[]` property and glue
       
  3945 					 * those in `onEnd`. Override this handler, if you need another behaviour.
       
  3946 					 **/
       
  3947 					Inflate.prototype.onData = function ( chunk ) {
       
  3948 						this.chunks.push( chunk );
       
  3949 					};
       
  3950 
       
  3951 					/**
       
  3952 					 * Inflate#onEnd(status) -> Void
       
  3953 					 * - status (Number): inflate status. 0 (Z_OK) on success,
       
  3954 					 *   other if not.
       
  3955 					 *
       
  3956 					 * Called either after you tell inflate that the input stream is
       
  3957 					 * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
       
  3958 					 * or if an error happened. By default - join collected chunks,
       
  3959 					 * free memory and fill `results` / `err` properties.
       
  3960 					 **/
       
  3961 					Inflate.prototype.onEnd = function ( status ) {
       
  3962 						// On success - join
       
  3963 						if ( status === c.Z_OK ) {
       
  3964 							if ( this.options.to === 'string' ) {
       
  3965 								// Glue & convert here, until we teach pako to send
       
  3966 								// utf8 aligned strings to onData
       
  3967 								this.result = this.chunks.join( '' );
       
  3968 							} else {
       
  3969 								this.result = utils.flattenChunks(
       
  3970 									this.chunks
       
  3971 								);
       
  3972 							}
       
  3973 						}
       
  3974 						this.chunks = [];
       
  3975 						this.err = status;
       
  3976 						this.msg = this.strm.msg;
       
  3977 					};
       
  3978 
       
  3979 					/**
       
  3980 					 * inflate(data[, options]) -> Uint8Array|Array|String
       
  3981 					 * - data (Uint8Array|Array|String): input data to decompress.
       
  3982 					 * - options (Object): zlib inflate options.
       
  3983 					 *
       
  3984 					 * Decompress `data` with inflate/ungzip and `options`. Autodetect
       
  3985 					 * format via wrapper header by default. That's why we don't provide
       
  3986 					 * separate `ungzip` method.
       
  3987 					 *
       
  3988 					 * Supported options are:
       
  3989 					 *
       
  3990 					 * - windowBits
       
  3991 					 *
       
  3992 					 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
       
  3993 					 * for more information.
       
  3994 					 *
       
  3995 					 * Sugar (options):
       
  3996 					 *
       
  3997 					 * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
       
  3998 					 *   negative windowBits implicitly.
       
  3999 					 * - `to` (String) - if equal to 'string', then result will be converted
       
  4000 					 *   from utf8 to utf16 (javascript) string. When string output requested,
       
  4001 					 *   chunk length can differ from `chunkSize`, depending on content.
       
  4002 					 *
       
  4003 					 *
       
  4004 					 * ##### Example:
       
  4005 					 *
       
  4006 					 * ```javascript
       
  4007 					 * var pako = require('pako')
       
  4008 					 *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])
       
  4009 					 *   , output;
       
  4010 					 *
       
  4011 					 * try {
       
  4012 					 *   output = pako.inflate(input);
       
  4013 					 * } catch (err)
       
  4014 					 *   console.log(err);
       
  4015 					 * }
       
  4016 					 * ```
       
  4017 					 **/
       
  4018 					function inflate( input, options ) {
       
  4019 						var inflator = new Inflate( options );
       
  4020 
       
  4021 						inflator.push( input, true );
       
  4022 
       
  4023 						// That will never happens, if you don't cheat with options :)
       
  4024 						if ( inflator.err ) {
       
  4025 							throw inflator.msg || msg[ inflator.err ];
       
  4026 						}
       
  4027 
       
  4028 						return inflator.result;
       
  4029 					}
       
  4030 
       
  4031 					/**
       
  4032 					 * inflateRaw(data[, options]) -> Uint8Array|Array|String
       
  4033 					 * - data (Uint8Array|Array|String): input data to decompress.
       
  4034 					 * - options (Object): zlib inflate options.
       
  4035 					 *
       
  4036 					 * The same as [[inflate]], but creates raw data, without wrapper
       
  4037 					 * (header and adler32 crc).
       
  4038 					 **/
       
  4039 					function inflateRaw( input, options ) {
       
  4040 						options = options || {};
       
  4041 						options.raw = true;
       
  4042 						return inflate( input, options );
       
  4043 					}
       
  4044 
       
  4045 					/**
       
  4046 					 * ungzip(data[, options]) -> Uint8Array|Array|String
       
  4047 					 * - data (Uint8Array|Array|String): input data to decompress.
       
  4048 					 * - options (Object): zlib inflate options.
       
  4049 					 *
       
  4050 					 * Just shortcut to [[inflate]], because it autodetects format
       
  4051 					 * by header.content. Done for convenience.
       
  4052 					 **/
       
  4053 
       
  4054 					exports.Inflate = Inflate;
       
  4055 					exports.inflate = inflate;
       
  4056 					exports.inflateRaw = inflateRaw;
       
  4057 					exports.ungzip = inflate;
       
  4058 				},
       
  4059 				{
       
  4060 					'./utils/common': 1,
       
  4061 					'./utils/strings': 2,
       
  4062 					'./zlib/constants': 4,
       
  4063 					'./zlib/gzheader': 6,
       
  4064 					'./zlib/inflate': 8,
       
  4065 					'./zlib/messages': 10,
       
  4066 					'./zlib/zstream': 11,
       
  4067 				},
       
  4068 			],
       
  4069 		},
       
  4070 		{},
       
  4071 		[]
       
  4072 	)( '/lib/inflate.js' );
       
  4073 } );
       
  4074 /* eslint-enable */
       
  4075 
       
  4076 
       
  4077 /***/ }),
       
  4078 
       
  4079 /***/ 8572:
       
  4080 /***/ ((module) => {
       
  4081 
       
  4082 /* eslint eslint-comments/no-unlimited-disable: 0 */
       
  4083 /* eslint-disable */
       
  4084 ( function ( f ) {
       
  4085 	if ( true ) {
       
  4086 		module.exports = f();
       
  4087 	} else { var g; }
       
  4088 } )( function () {
       
  4089 	var define, module, exports;
       
  4090 	return ( function () {
       
  4091 		function r( e, n, t ) {
       
  4092 			function o( i, f ) {
       
  4093 				if ( ! n[ i ] ) {
       
  4094 					if ( ! e[ i ] ) {
       
  4095 						var c = undefined;
       
  4096 						if ( ! f && c ) return require( i, ! 0 );
       
  4097 						if ( u ) return u( i, ! 0 );
       
  4098 						var a = new Error( "Cannot find module '" + i + "'" );
       
  4099 						throw ( ( a.code = 'MODULE_NOT_FOUND' ), a );
       
  4100 					}
       
  4101 					var p = ( n[ i ] = { exports: {} } );
       
  4102 					e[ i ][ 0 ].call(
       
  4103 						p.exports,
       
  4104 						function ( r ) {
       
  4105 							var n = e[ i ][ 1 ][ r ];
       
  4106 							return o( n || r );
       
  4107 						},
       
  4108 						p,
       
  4109 						p.exports,
       
  4110 						r,
       
  4111 						e,
       
  4112 						n,
       
  4113 						t
       
  4114 					);
   335 				}
  4115 				}
       
  4116 				return n[ i ].exports;
   336 			}
  4117 			}
       
  4118 			for (
       
  4119 				var u = undefined, i = 0;
       
  4120 				i < t.length;
       
  4121 				i++
       
  4122 			)
       
  4123 				o( t[ i ] );
       
  4124 			return o;
   337 		}
  4125 		}
   338 
  4126 		return r;
   339 		return classes.join(' ');
  4127 	} )()(
   340 	}
  4128 		{
   341 
  4129 			1: [
   342 	if ( true && module.exports) {
  4130 				function ( require, module, exports ) {
   343 		classNames.default = classNames;
  4131 					/* Copyright 2013 Google Inc. All Rights Reserved.
   344 		module.exports = classNames;
  4132 
   345 	} else if (true) {
  4133    Licensed under the Apache License, Version 2.0 (the "License");
   346 		// register as 'classnames', consistent with npm package name
  4134    you may not use this file except in compliance with the License.
   347 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  4135    You may obtain a copy of the License at
   348 			return classNames;
  4136 
   349 		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  4137    http://www.apache.org/licenses/LICENSE-2.0
   350 		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  4138 
   351 	} else {}
  4139    Unless required by applicable law or agreed to in writing, software
   352 }());
  4140    distributed under the License is distributed on an "AS IS" BASIS,
       
  4141    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
  4142    See the License for the specific language governing permissions and
       
  4143    limitations under the License.
       
  4144 
       
  4145    Bit reading helpers
       
  4146 */
       
  4147 
       
  4148 					var BROTLI_READ_SIZE = 4096;
       
  4149 					var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32;
       
  4150 					var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1;
       
  4151 
       
  4152 					var kBitMask = new Uint32Array( [
       
  4153 						0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095,
       
  4154 						8191, 16383, 32767, 65535, 131071, 262143, 524287,
       
  4155 						1048575, 2097151, 4194303, 8388607, 16777215,
       
  4156 					] );
       
  4157 
       
  4158 					/* Input byte buffer, consist of a ringbuffer and a "slack" region where */
       
  4159 					/* bytes from the start of the ringbuffer are copied. */
       
  4160 					function BrotliBitReader( input ) {
       
  4161 						this.buf_ = new Uint8Array( BROTLI_IBUF_SIZE );
       
  4162 						this.input_ = input; /* input callback */
       
  4163 
       
  4164 						this.reset();
       
  4165 					}
       
  4166 
       
  4167 					BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;
       
  4168 					BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;
       
  4169 
       
  4170 					BrotliBitReader.prototype.reset = function () {
       
  4171 						this.buf_ptr_ = 0; /* next input will write here */
       
  4172 						this.val_ = 0; /* pre-fetched bits */
       
  4173 						this.pos_ = 0; /* byte position in stream */
       
  4174 						this.bit_pos_ = 0; /* current bit-reading position in val_ */
       
  4175 						this.bit_end_pos_ = 0; /* bit-reading end position from LSB of val_ */
       
  4176 						this.eos_ = 0; /* input stream is finished */
       
  4177 
       
  4178 						this.readMoreInput();
       
  4179 						for ( var i = 0; i < 4; i++ ) {
       
  4180 							this.val_ |= this.buf_[ this.pos_ ] << ( 8 * i );
       
  4181 							++this.pos_;
       
  4182 						}
       
  4183 
       
  4184 						return this.bit_end_pos_ > 0;
       
  4185 					};
       
  4186 
       
  4187 					/* Fills up the input ringbuffer by calling the input callback.
       
  4188 
       
  4189    Does nothing if there are at least 32 bytes present after current position.
       
  4190 
       
  4191    Returns 0 if either:
       
  4192     - the input callback returned an error, or
       
  4193     - there is no more input and the position is past the end of the stream.
       
  4194 
       
  4195    After encountering the end of the input stream, 32 additional zero bytes are
       
  4196    copied to the ringbuffer, therefore it is safe to call this function after
       
  4197    every 32 bytes of input is read.
       
  4198 */
       
  4199 					BrotliBitReader.prototype.readMoreInput = function () {
       
  4200 						if ( this.bit_end_pos_ > 256 ) {
       
  4201 							return;
       
  4202 						} else if ( this.eos_ ) {
       
  4203 							if ( this.bit_pos_ > this.bit_end_pos_ )
       
  4204 								throw new Error(
       
  4205 									'Unexpected end of input ' +
       
  4206 										this.bit_pos_ +
       
  4207 										' ' +
       
  4208 										this.bit_end_pos_
       
  4209 								);
       
  4210 						} else {
       
  4211 							var dst = this.buf_ptr_;
       
  4212 							var bytes_read = this.input_.read(
       
  4213 								this.buf_,
       
  4214 								dst,
       
  4215 								BROTLI_READ_SIZE
       
  4216 							);
       
  4217 							if ( bytes_read < 0 ) {
       
  4218 								throw new Error( 'Unexpected end of input' );
       
  4219 							}
       
  4220 
       
  4221 							if ( bytes_read < BROTLI_READ_SIZE ) {
       
  4222 								this.eos_ = 1;
       
  4223 								/* Store 32 bytes of zero after the stream end. */
       
  4224 								for ( var p = 0; p < 32; p++ )
       
  4225 									this.buf_[ dst + bytes_read + p ] = 0;
       
  4226 							}
       
  4227 
       
  4228 							if ( dst === 0 ) {
       
  4229 								/* Copy the head of the ringbuffer to the slack region. */
       
  4230 								for ( var p = 0; p < 32; p++ )
       
  4231 									this.buf_[ ( BROTLI_READ_SIZE << 1 ) + p ] =
       
  4232 										this.buf_[ p ];
       
  4233 
       
  4234 								this.buf_ptr_ = BROTLI_READ_SIZE;
       
  4235 							} else {
       
  4236 								this.buf_ptr_ = 0;
       
  4237 							}
       
  4238 
       
  4239 							this.bit_end_pos_ += bytes_read << 3;
       
  4240 						}
       
  4241 					};
       
  4242 
       
  4243 					/* Guarantees that there are at least 24 bits in the buffer. */
       
  4244 					BrotliBitReader.prototype.fillBitWindow = function () {
       
  4245 						while ( this.bit_pos_ >= 8 ) {
       
  4246 							this.val_ >>>= 8;
       
  4247 							this.val_ |=
       
  4248 								this.buf_[ this.pos_ & BROTLI_IBUF_MASK ] << 24;
       
  4249 							++this.pos_;
       
  4250 							this.bit_pos_ = ( this.bit_pos_ - 8 ) >>> 0;
       
  4251 							this.bit_end_pos_ = ( this.bit_end_pos_ - 8 ) >>> 0;
       
  4252 						}
       
  4253 					};
       
  4254 
       
  4255 					/* Reads the specified number of bits from Read Buffer. */
       
  4256 					BrotliBitReader.prototype.readBits = function ( n_bits ) {
       
  4257 						if ( 32 - this.bit_pos_ < n_bits ) {
       
  4258 							this.fillBitWindow();
       
  4259 						}
       
  4260 
       
  4261 						var val =
       
  4262 							( this.val_ >>> this.bit_pos_ ) &
       
  4263 							kBitMask[ n_bits ];
       
  4264 						this.bit_pos_ += n_bits;
       
  4265 						return val;
       
  4266 					};
       
  4267 
       
  4268 					module.exports = BrotliBitReader;
       
  4269 				},
       
  4270 				{},
       
  4271 			],
       
  4272 			2: [
       
  4273 				function ( require, module, exports ) {
       
  4274 					/* Copyright 2013 Google Inc. All Rights Reserved.
       
  4275 
       
  4276    Licensed under the Apache License, Version 2.0 (the "License");
       
  4277    you may not use this file except in compliance with the License.
       
  4278    You may obtain a copy of the License at
       
  4279 
       
  4280    http://www.apache.org/licenses/LICENSE-2.0
       
  4281 
       
  4282    Unless required by applicable law or agreed to in writing, software
       
  4283    distributed under the License is distributed on an "AS IS" BASIS,
       
  4284    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
  4285    See the License for the specific language governing permissions and
       
  4286    limitations under the License.
       
  4287 
       
  4288    Lookup table to map the previous two bytes to a context id.
       
  4289 
       
  4290    There are four different context modeling modes defined here:
       
  4291      CONTEXT_LSB6: context id is the least significant 6 bits of the last byte,
       
  4292      CONTEXT_MSB6: context id is the most significant 6 bits of the last byte,
       
  4293      CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text,
       
  4294      CONTEXT_SIGNED: second-order context model tuned for signed integers.
       
  4295 
       
  4296    The context id for the UTF8 context model is calculated as follows. If p1
       
  4297    and p2 are the previous two bytes, we calcualte the context as
       
  4298 
       
  4299      context = kContextLookup[p1] | kContextLookup[p2 + 256].
       
  4300 
       
  4301    If the previous two bytes are ASCII characters (i.e. < 128), this will be
       
  4302    equivalent to
       
  4303 
       
  4304      context = 4 * context1(p1) + context2(p2),
       
  4305 
       
  4306    where context1 is based on the previous byte in the following way:
       
  4307 
       
  4308      0  : non-ASCII control
       
  4309      1  : \t, \n, \r
       
  4310      2  : space
       
  4311      3  : other punctuation
       
  4312      4  : " '
       
  4313      5  : %
       
  4314      6  : ( < [ {
       
  4315      7  : ) > ] }
       
  4316      8  : , ; :
       
  4317      9  : .
       
  4318      10 : =
       
  4319      11 : number
       
  4320      12 : upper-case vowel
       
  4321      13 : upper-case consonant
       
  4322      14 : lower-case vowel
       
  4323      15 : lower-case consonant
       
  4324 
       
  4325    and context2 is based on the second last byte:
       
  4326 
       
  4327      0 : control, space
       
  4328      1 : punctuation
       
  4329      2 : upper-case letter, number
       
  4330      3 : lower-case letter
       
  4331 
       
  4332    If the last byte is ASCII, and the second last byte is not (in a valid UTF8
       
  4333    stream it will be a continuation byte, value between 128 and 191), the
       
  4334    context is the same as if the second last byte was an ASCII control or space.
       
  4335 
       
  4336    If the last byte is a UTF8 lead byte (value >= 192), then the next byte will
       
  4337    be a continuation byte and the context id is 2 or 3 depending on the LSB of
       
  4338    the last byte and to a lesser extent on the second last byte if it is ASCII.
       
  4339 
       
  4340    If the last byte is a UTF8 continuation byte, the second last byte can be:
       
  4341      - continuation byte: the next byte is probably ASCII or lead byte (assuming
       
  4342        4-byte UTF8 characters are rare) and the context id is 0 or 1.
       
  4343      - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1
       
  4344      - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3
       
  4345 
       
  4346    The possible value combinations of the previous two bytes, the range of
       
  4347    context ids and the type of the next byte is summarized in the table below:
       
  4348 
       
  4349    |--------\-----------------------------------------------------------------|
       
  4350    |         \                         Last byte                              |
       
  4351    | Second   \---------------------------------------------------------------|
       
  4352    | last byte \    ASCII            |   cont. byte        |   lead byte      |
       
  4353    |            \   (0-127)          |   (128-191)         |   (192-)         |
       
  4354    |=============|===================|=====================|==================|
       
  4355    |  ASCII      | next: ASCII/lead  |  not valid          |  next: cont.     |
       
  4356    |  (0-127)    | context: 4 - 63   |                     |  context: 2 - 3  |
       
  4357    |-------------|-------------------|---------------------|------------------|
       
  4358    |  cont. byte | next: ASCII/lead  |  next: ASCII/lead   |  next: cont.     |
       
  4359    |  (128-191)  | context: 4 - 63   |  context: 0 - 1     |  context: 2 - 3  |
       
  4360    |-------------|-------------------|---------------------|------------------|
       
  4361    |  lead byte  | not valid         |  next: ASCII/lead   |  not valid       |
       
  4362    |  (192-207)  |                   |  context: 0 - 1     |                  |
       
  4363    |-------------|-------------------|---------------------|------------------|
       
  4364    |  lead byte  | not valid         |  next: cont.        |  not valid       |
       
  4365    |  (208-)     |                   |  context: 2 - 3     |                  |
       
  4366    |-------------|-------------------|---------------------|------------------|
       
  4367 
       
  4368    The context id for the signed context mode is calculated as:
       
  4369 
       
  4370      context = (kContextLookup[512 + p1] << 3) | kContextLookup[512 + p2].
       
  4371 
       
  4372    For any context modeling modes, the context ids can be calculated by |-ing
       
  4373    together two lookups from one table using context model dependent offsets:
       
  4374 
       
  4375      context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2].
       
  4376 
       
  4377    where offset1 and offset2 are dependent on the context mode.
       
  4378 */
       
  4379 
       
  4380 					var CONTEXT_LSB6 = 0;
       
  4381 					var CONTEXT_MSB6 = 1;
       
  4382 					var CONTEXT_UTF8 = 2;
       
  4383 					var CONTEXT_SIGNED = 3;
       
  4384 
       
  4385 					/* Common context lookup table for all context modes. */
       
  4386 					exports.lookup = new Uint8Array( [
       
  4387 						/* CONTEXT_UTF8, last byte. */
       
  4388 						/* ASCII range. */
       
  4389 						0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0, 0, 0, 0,
       
  4390 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 16, 12,
       
  4391 						12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12, 44, 44,
       
  4392 						44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12,
       
  4393 						12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52,
       
  4394 						52, 48, 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24,
       
  4395 						12, 28, 12, 12, 12, 56, 60, 60, 60, 56, 60, 60, 60, 56,
       
  4396 						60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56, 60, 60,
       
  4397 						60, 60, 60, 24, 12, 28, 12, 0,
       
  4398 						/* UTF8 continuation byte range. */
       
  4399 						0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
       
  4400 						1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
       
  4401 						0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
       
  4402 						1, 0, 1, 0, 1, 0, 1, /* UTF8 lead byte range. */
       
  4403 						2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2,
       
  4404 						3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
       
  4405 						2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2,
       
  4406 						3, 2, 3, 2, 3, 2, 3,
       
  4407 						/* CONTEXT_UTF8 second last byte. */
       
  4408 						/* ASCII range. */
       
  4409 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4410 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
       
  4411 						1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       
  4412 						2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       
  4413 						2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
       
  4414 						1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
       
  4415 						3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 0,
       
  4416 						/* UTF8 continuation byte range. */
       
  4417 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4418 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4419 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4420 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4421 						0, 0, 0, 0, /* UTF8 lead byte range. */
       
  4422 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2,
       
  4423 						2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       
  4424 						2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       
  4425 						/* CONTEXT_SIGNED, second last byte. */
       
  4426 						0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
       
  4427 						2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       
  4428 						2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       
  4429 						2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
       
  4430 						3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
       
  4431 						3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
       
  4432 						3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
       
  4433 						4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
       
  4434 						4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
       
  4435 						4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
       
  4436 						4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
       
  4437 						5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
       
  4438 						5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
       
  4439 						6, 6, 6, 6, 6, 6, 6, 6, 7,
       
  4440 						/* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
       
  4441 						0,
       
  4442 						8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16,
       
  4443 						16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
       
  4444 						16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
       
  4445 						16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
       
  4446 						16, 16, 16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
       
  4447 						24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
       
  4448 						24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
       
  4449 						24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
       
  4450 						24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 32, 32, 32,
       
  4451 						32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
       
  4452 						32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
       
  4453 						32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
       
  4454 						32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
       
  4455 						32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 40, 40, 40, 40,
       
  4456 						40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
       
  4457 						40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
       
  4458 						40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 48, 48, 48,
       
  4459 						48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56,
       
  4460 						/* CONTEXT_LSB6, last byte. */
       
  4461 						0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
       
  4462 						16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
       
  4463 						30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
       
  4464 						44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
       
  4465 						58, 59, 60, 61, 62, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
       
  4466 						10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
       
  4467 						24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
       
  4468 						38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
       
  4469 						52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 1, 2,
       
  4470 						3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
       
  4471 						19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
       
  4472 						33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
       
  4473 						47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
       
  4474 						61, 62, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
       
  4475 						13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
       
  4476 						27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
       
  4477 						41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
       
  4478 						55, 56, 57, 58, 59, 60, 61, 62, 63,
       
  4479 						/* CONTEXT_MSB6, last byte. */
       
  4480 						0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,
       
  4481 						4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9,
       
  4482 						9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12,
       
  4483 						13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16,
       
  4484 						16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19,
       
  4485 						20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23,
       
  4486 						23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26,
       
  4487 						27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30,
       
  4488 						30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 33,
       
  4489 						34, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37,
       
  4490 						37, 37, 38, 38, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40,
       
  4491 						41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44,
       
  4492 						44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47,
       
  4493 						48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51,
       
  4494 						51, 51, 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54,
       
  4495 						55, 55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57, 58, 58,
       
  4496 						58, 58, 59, 59, 59, 59, 60, 60, 60, 60, 61, 61, 61, 61,
       
  4497 						62, 62, 62, 62, 63, 63, 63, 63,
       
  4498 						/* CONTEXT_{M,L}SB6, second last byte, */
       
  4499 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4500 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4501 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4502 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4503 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4504 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4505 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4506 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4507 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4508 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4509 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4510 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4511 						0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4512 						0, 0, 0, 0, 0, 0, 0, 0, 0,
       
  4513 					] );
       
  4514 
       
  4515 					exports.lookupOffsets = new Uint16Array( [
       
  4516 						/* CONTEXT_LSB6 */
       
  4517 						1024, 1536, /* CONTEXT_MSB6 */
       
  4518 						1280, 1536, /* CONTEXT_UTF8 */
       
  4519 						0, 256, /* CONTEXT_SIGNED */
       
  4520 						768, 512,
       
  4521 					] );
       
  4522 				},
       
  4523 				{},
       
  4524 			],
       
  4525 			3: [
       
  4526 				function ( require, module, exports ) {
       
  4527 					/* Copyright 2013 Google Inc. All Rights Reserved.
       
  4528 
       
  4529    Licensed under the Apache License, Version 2.0 (the "License");
       
  4530    you may not use this file except in compliance with the License.
       
  4531    You may obtain a copy of the License at
       
  4532 
       
  4533    http://www.apache.org/licenses/LICENSE-2.0
       
  4534 
       
  4535    Unless required by applicable law or agreed to in writing, software
       
  4536    distributed under the License is distributed on an "AS IS" BASIS,
       
  4537    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
  4538    See the License for the specific language governing permissions and
       
  4539    limitations under the License.
       
  4540 */
       
  4541 
       
  4542 					var BrotliInput = require( './streams' ).BrotliInput;
       
  4543 					var BrotliOutput = require( './streams' ).BrotliOutput;
       
  4544 					var BrotliBitReader = require( './bit_reader' );
       
  4545 					var BrotliDictionary = require( './dictionary' );
       
  4546 					var HuffmanCode = require( './huffman' ).HuffmanCode;
       
  4547 					var BrotliBuildHuffmanTable =
       
  4548 						require( './huffman' ).BrotliBuildHuffmanTable;
       
  4549 					var Context = require( './context' );
       
  4550 					var Prefix = require( './prefix' );
       
  4551 					var Transform = require( './transform' );
       
  4552 
       
  4553 					var kDefaultCodeLength = 8;
       
  4554 					var kCodeLengthRepeatCode = 16;
       
  4555 					var kNumLiteralCodes = 256;
       
  4556 					var kNumInsertAndCopyCodes = 704;
       
  4557 					var kNumBlockLengthCodes = 26;
       
  4558 					var kLiteralContextBits = 6;
       
  4559 					var kDistanceContextBits = 2;
       
  4560 
       
  4561 					var HUFFMAN_TABLE_BITS = 8;
       
  4562 					var HUFFMAN_TABLE_MASK = 0xff;
       
  4563 					/* Maximum possible Huffman table size for an alphabet size of 704, max code
       
  4564 					 * length 15 and root table bits 8. */
       
  4565 					var HUFFMAN_MAX_TABLE_SIZE = 1080;
       
  4566 
       
  4567 					var CODE_LENGTH_CODES = 18;
       
  4568 					var kCodeLengthCodeOrder = new Uint8Array( [
       
  4569 						1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13,
       
  4570 						14, 15,
       
  4571 					] );
       
  4572 
       
  4573 					var NUM_DISTANCE_SHORT_CODES = 16;
       
  4574 					var kDistanceShortCodeIndexOffset = new Uint8Array( [
       
  4575 						3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
       
  4576 					] );
       
  4577 
       
  4578 					var kDistanceShortCodeValueOffset = new Int8Array( [
       
  4579 						0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3,
       
  4580 					] );
       
  4581 
       
  4582 					var kMaxHuffmanTableSize = new Uint16Array( [
       
  4583 						256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694,
       
  4584 						726, 758, 790, 822, 854, 886, 920, 952, 984, 1016, 1048,
       
  4585 						1080,
       
  4586 					] );
       
  4587 
       
  4588 					function DecodeWindowBits( br ) {
       
  4589 						var n;
       
  4590 						if ( br.readBits( 1 ) === 0 ) {
       
  4591 							return 16;
       
  4592 						}
       
  4593 
       
  4594 						n = br.readBits( 3 );
       
  4595 						if ( n > 0 ) {
       
  4596 							return 17 + n;
       
  4597 						}
       
  4598 
       
  4599 						n = br.readBits( 3 );
       
  4600 						if ( n > 0 ) {
       
  4601 							return 8 + n;
       
  4602 						}
       
  4603 
       
  4604 						return 17;
       
  4605 					}
       
  4606 
       
  4607 					/* Decodes a number in the range [0..255], by reading 1 - 11 bits. */
       
  4608 					function DecodeVarLenUint8( br ) {
       
  4609 						if ( br.readBits( 1 ) ) {
       
  4610 							var nbits = br.readBits( 3 );
       
  4611 							if ( nbits === 0 ) {
       
  4612 								return 1;
       
  4613 							} else {
       
  4614 								return br.readBits( nbits ) + ( 1 << nbits );
       
  4615 							}
       
  4616 						}
       
  4617 						return 0;
       
  4618 					}
       
  4619 
       
  4620 					function MetaBlockLength() {
       
  4621 						this.meta_block_length = 0;
       
  4622 						this.input_end = 0;
       
  4623 						this.is_uncompressed = 0;
       
  4624 						this.is_metadata = false;
       
  4625 					}
       
  4626 
       
  4627 					function DecodeMetaBlockLength( br ) {
       
  4628 						var out = new MetaBlockLength();
       
  4629 						var size_nibbles;
       
  4630 						var size_bytes;
       
  4631 						var i;
       
  4632 
       
  4633 						out.input_end = br.readBits( 1 );
       
  4634 						if ( out.input_end && br.readBits( 1 ) ) {
       
  4635 							return out;
       
  4636 						}
       
  4637 
       
  4638 						size_nibbles = br.readBits( 2 ) + 4;
       
  4639 						if ( size_nibbles === 7 ) {
       
  4640 							out.is_metadata = true;
       
  4641 
       
  4642 							if ( br.readBits( 1 ) !== 0 )
       
  4643 								throw new Error( 'Invalid reserved bit' );
       
  4644 
       
  4645 							size_bytes = br.readBits( 2 );
       
  4646 							if ( size_bytes === 0 ) return out;
       
  4647 
       
  4648 							for ( i = 0; i < size_bytes; i++ ) {
       
  4649 								var next_byte = br.readBits( 8 );
       
  4650 								if (
       
  4651 									i + 1 === size_bytes &&
       
  4652 									size_bytes > 1 &&
       
  4653 									next_byte === 0
       
  4654 								)
       
  4655 									throw new Error( 'Invalid size byte' );
       
  4656 
       
  4657 								out.meta_block_length |= next_byte << ( i * 8 );
       
  4658 							}
       
  4659 						} else {
       
  4660 							for ( i = 0; i < size_nibbles; ++i ) {
       
  4661 								var next_nibble = br.readBits( 4 );
       
  4662 								if (
       
  4663 									i + 1 === size_nibbles &&
       
  4664 									size_nibbles > 4 &&
       
  4665 									next_nibble === 0
       
  4666 								)
       
  4667 									throw new Error( 'Invalid size nibble' );
       
  4668 
       
  4669 								out.meta_block_length |=
       
  4670 									next_nibble << ( i * 4 );
       
  4671 							}
       
  4672 						}
       
  4673 
       
  4674 						++out.meta_block_length;
       
  4675 
       
  4676 						if ( ! out.input_end && ! out.is_metadata ) {
       
  4677 							out.is_uncompressed = br.readBits( 1 );
       
  4678 						}
       
  4679 
       
  4680 						return out;
       
  4681 					}
       
  4682 
       
  4683 					/* Decodes the next Huffman code from bit-stream. */
       
  4684 					function ReadSymbol( table, index, br ) {
       
  4685 						var start_index = index;
       
  4686 
       
  4687 						var nbits;
       
  4688 						br.fillBitWindow();
       
  4689 						index +=
       
  4690 							( br.val_ >>> br.bit_pos_ ) & HUFFMAN_TABLE_MASK;
       
  4691 						nbits = table[ index ].bits - HUFFMAN_TABLE_BITS;
       
  4692 						if ( nbits > 0 ) {
       
  4693 							br.bit_pos_ += HUFFMAN_TABLE_BITS;
       
  4694 							index += table[ index ].value;
       
  4695 							index +=
       
  4696 								( br.val_ >>> br.bit_pos_ ) &
       
  4697 								( ( 1 << nbits ) - 1 );
       
  4698 						}
       
  4699 						br.bit_pos_ += table[ index ].bits;
       
  4700 						return table[ index ].value;
       
  4701 					}
       
  4702 
       
  4703 					function ReadHuffmanCodeLengths(
       
  4704 						code_length_code_lengths,
       
  4705 						num_symbols,
       
  4706 						code_lengths,
       
  4707 						br
       
  4708 					) {
       
  4709 						var symbol = 0;
       
  4710 						var prev_code_len = kDefaultCodeLength;
       
  4711 						var repeat = 0;
       
  4712 						var repeat_code_len = 0;
       
  4713 						var space = 32768;
       
  4714 
       
  4715 						var table = [];
       
  4716 						for ( var i = 0; i < 32; i++ )
       
  4717 							table.push( new HuffmanCode( 0, 0 ) );
       
  4718 
       
  4719 						BrotliBuildHuffmanTable(
       
  4720 							table,
       
  4721 							0,
       
  4722 							5,
       
  4723 							code_length_code_lengths,
       
  4724 							CODE_LENGTH_CODES
       
  4725 						);
       
  4726 
       
  4727 						while ( symbol < num_symbols && space > 0 ) {
       
  4728 							var p = 0;
       
  4729 							var code_len;
       
  4730 
       
  4731 							br.readMoreInput();
       
  4732 							br.fillBitWindow();
       
  4733 							p += ( br.val_ >>> br.bit_pos_ ) & 31;
       
  4734 							br.bit_pos_ += table[ p ].bits;
       
  4735 							code_len = table[ p ].value & 0xff;
       
  4736 							if ( code_len < kCodeLengthRepeatCode ) {
       
  4737 								repeat = 0;
       
  4738 								code_lengths[ symbol++ ] = code_len;
       
  4739 								if ( code_len !== 0 ) {
       
  4740 									prev_code_len = code_len;
       
  4741 									space -= 32768 >> code_len;
       
  4742 								}
       
  4743 							} else {
       
  4744 								var extra_bits = code_len - 14;
       
  4745 								var old_repeat;
       
  4746 								var repeat_delta;
       
  4747 								var new_len = 0;
       
  4748 								if ( code_len === kCodeLengthRepeatCode ) {
       
  4749 									new_len = prev_code_len;
       
  4750 								}
       
  4751 								if ( repeat_code_len !== new_len ) {
       
  4752 									repeat = 0;
       
  4753 									repeat_code_len = new_len;
       
  4754 								}
       
  4755 								old_repeat = repeat;
       
  4756 								if ( repeat > 0 ) {
       
  4757 									repeat -= 2;
       
  4758 									repeat <<= extra_bits;
       
  4759 								}
       
  4760 								repeat += br.readBits( extra_bits ) + 3;
       
  4761 								repeat_delta = repeat - old_repeat;
       
  4762 								if ( symbol + repeat_delta > num_symbols ) {
       
  4763 									throw new Error(
       
  4764 										'[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols'
       
  4765 									);
       
  4766 								}
       
  4767 
       
  4768 								for ( var x = 0; x < repeat_delta; x++ )
       
  4769 									code_lengths[ symbol + x ] =
       
  4770 										repeat_code_len;
       
  4771 
       
  4772 								symbol += repeat_delta;
       
  4773 
       
  4774 								if ( repeat_code_len !== 0 ) {
       
  4775 									space -=
       
  4776 										repeat_delta <<
       
  4777 										( 15 - repeat_code_len );
       
  4778 								}
       
  4779 							}
       
  4780 						}
       
  4781 						if ( space !== 0 ) {
       
  4782 							throw new Error(
       
  4783 								'[ReadHuffmanCodeLengths] space = ' + space
       
  4784 							);
       
  4785 						}
       
  4786 
       
  4787 						for ( ; symbol < num_symbols; symbol++ )
       
  4788 							code_lengths[ symbol ] = 0;
       
  4789 					}
       
  4790 
       
  4791 					function ReadHuffmanCode(
       
  4792 						alphabet_size,
       
  4793 						tables,
       
  4794 						table,
       
  4795 						br
       
  4796 					) {
       
  4797 						var table_size = 0;
       
  4798 						var simple_code_or_skip;
       
  4799 						var code_lengths = new Uint8Array( alphabet_size );
       
  4800 
       
  4801 						br.readMoreInput();
       
  4802 
       
  4803 						/* simple_code_or_skip is used as follows:
       
  4804      1 for simple code;
       
  4805      0 for no skipping, 2 skips 2 code lengths, 3 skips 3 code lengths */
       
  4806 						simple_code_or_skip = br.readBits( 2 );
       
  4807 						if ( simple_code_or_skip === 1 ) {
       
  4808 							/* Read symbols, codes & code lengths directly. */
       
  4809 							var i;
       
  4810 							var max_bits_counter = alphabet_size - 1;
       
  4811 							var max_bits = 0;
       
  4812 							var symbols = new Int32Array( 4 );
       
  4813 							var num_symbols = br.readBits( 2 ) + 1;
       
  4814 							while ( max_bits_counter ) {
       
  4815 								max_bits_counter >>= 1;
       
  4816 								++max_bits;
       
  4817 							}
       
  4818 
       
  4819 							for ( i = 0; i < num_symbols; ++i ) {
       
  4820 								symbols[ i ] =
       
  4821 									br.readBits( max_bits ) % alphabet_size;
       
  4822 								code_lengths[ symbols[ i ] ] = 2;
       
  4823 							}
       
  4824 							code_lengths[ symbols[ 0 ] ] = 1;
       
  4825 							switch ( num_symbols ) {
       
  4826 								case 1:
       
  4827 									break;
       
  4828 								case 3:
       
  4829 									if (
       
  4830 										symbols[ 0 ] === symbols[ 1 ] ||
       
  4831 										symbols[ 0 ] === symbols[ 2 ] ||
       
  4832 										symbols[ 1 ] === symbols[ 2 ]
       
  4833 									) {
       
  4834 										throw new Error(
       
  4835 											'[ReadHuffmanCode] invalid symbols'
       
  4836 										);
       
  4837 									}
       
  4838 									break;
       
  4839 								case 2:
       
  4840 									if ( symbols[ 0 ] === symbols[ 1 ] ) {
       
  4841 										throw new Error(
       
  4842 											'[ReadHuffmanCode] invalid symbols'
       
  4843 										);
       
  4844 									}
       
  4845 
       
  4846 									code_lengths[ symbols[ 1 ] ] = 1;
       
  4847 									break;
       
  4848 								case 4:
       
  4849 									if (
       
  4850 										symbols[ 0 ] === symbols[ 1 ] ||
       
  4851 										symbols[ 0 ] === symbols[ 2 ] ||
       
  4852 										symbols[ 0 ] === symbols[ 3 ] ||
       
  4853 										symbols[ 1 ] === symbols[ 2 ] ||
       
  4854 										symbols[ 1 ] === symbols[ 3 ] ||
       
  4855 										symbols[ 2 ] === symbols[ 3 ]
       
  4856 									) {
       
  4857 										throw new Error(
       
  4858 											'[ReadHuffmanCode] invalid symbols'
       
  4859 										);
       
  4860 									}
       
  4861 
       
  4862 									if ( br.readBits( 1 ) ) {
       
  4863 										code_lengths[ symbols[ 2 ] ] = 3;
       
  4864 										code_lengths[ symbols[ 3 ] ] = 3;
       
  4865 									} else {
       
  4866 										code_lengths[ symbols[ 0 ] ] = 2;
       
  4867 									}
       
  4868 									break;
       
  4869 							}
       
  4870 						} else {
       
  4871 							/* Decode Huffman-coded code lengths. */
       
  4872 							var i;
       
  4873 							var code_length_code_lengths = new Uint8Array(
       
  4874 								CODE_LENGTH_CODES
       
  4875 							);
       
  4876 							var space = 32;
       
  4877 							var num_codes = 0;
       
  4878 							/* Static Huffman code for the code length code lengths */
       
  4879 							var huff = [
       
  4880 								new HuffmanCode( 2, 0 ),
       
  4881 								new HuffmanCode( 2, 4 ),
       
  4882 								new HuffmanCode( 2, 3 ),
       
  4883 								new HuffmanCode( 3, 2 ),
       
  4884 								new HuffmanCode( 2, 0 ),
       
  4885 								new HuffmanCode( 2, 4 ),
       
  4886 								new HuffmanCode( 2, 3 ),
       
  4887 								new HuffmanCode( 4, 1 ),
       
  4888 								new HuffmanCode( 2, 0 ),
       
  4889 								new HuffmanCode( 2, 4 ),
       
  4890 								new HuffmanCode( 2, 3 ),
       
  4891 								new HuffmanCode( 3, 2 ),
       
  4892 								new HuffmanCode( 2, 0 ),
       
  4893 								new HuffmanCode( 2, 4 ),
       
  4894 								new HuffmanCode( 2, 3 ),
       
  4895 								new HuffmanCode( 4, 5 ),
       
  4896 							];
       
  4897 							for (
       
  4898 								i = simple_code_or_skip;
       
  4899 								i < CODE_LENGTH_CODES && space > 0;
       
  4900 								++i
       
  4901 							) {
       
  4902 								var code_len_idx = kCodeLengthCodeOrder[ i ];
       
  4903 								var p = 0;
       
  4904 								var v;
       
  4905 								br.fillBitWindow();
       
  4906 								p += ( br.val_ >>> br.bit_pos_ ) & 15;
       
  4907 								br.bit_pos_ += huff[ p ].bits;
       
  4908 								v = huff[ p ].value;
       
  4909 								code_length_code_lengths[ code_len_idx ] = v;
       
  4910 								if ( v !== 0 ) {
       
  4911 									space -= 32 >> v;
       
  4912 									++num_codes;
       
  4913 								}
       
  4914 							}
       
  4915 
       
  4916 							if ( ! ( num_codes === 1 || space === 0 ) )
       
  4917 								throw new Error(
       
  4918 									'[ReadHuffmanCode] invalid num_codes or space'
       
  4919 								);
       
  4920 
       
  4921 							ReadHuffmanCodeLengths(
       
  4922 								code_length_code_lengths,
       
  4923 								alphabet_size,
       
  4924 								code_lengths,
       
  4925 								br
       
  4926 							);
       
  4927 						}
       
  4928 
       
  4929 						table_size = BrotliBuildHuffmanTable(
       
  4930 							tables,
       
  4931 							table,
       
  4932 							HUFFMAN_TABLE_BITS,
       
  4933 							code_lengths,
       
  4934 							alphabet_size
       
  4935 						);
       
  4936 
       
  4937 						if ( table_size === 0 ) {
       
  4938 							throw new Error(
       
  4939 								'[ReadHuffmanCode] BuildHuffmanTable failed: '
       
  4940 							);
       
  4941 						}
       
  4942 
       
  4943 						return table_size;
       
  4944 					}
       
  4945 
       
  4946 					function ReadBlockLength( table, index, br ) {
       
  4947 						var code;
       
  4948 						var nbits;
       
  4949 						code = ReadSymbol( table, index, br );
       
  4950 						nbits = Prefix.kBlockLengthPrefixCode[ code ].nbits;
       
  4951 						return (
       
  4952 							Prefix.kBlockLengthPrefixCode[ code ].offset +
       
  4953 							br.readBits( nbits )
       
  4954 						);
       
  4955 					}
       
  4956 
       
  4957 					function TranslateShortCodes( code, ringbuffer, index ) {
       
  4958 						var val;
       
  4959 						if ( code < NUM_DISTANCE_SHORT_CODES ) {
       
  4960 							index += kDistanceShortCodeIndexOffset[ code ];
       
  4961 							index &= 3;
       
  4962 							val =
       
  4963 								ringbuffer[ index ] +
       
  4964 								kDistanceShortCodeValueOffset[ code ];
       
  4965 						} else {
       
  4966 							val = code - NUM_DISTANCE_SHORT_CODES + 1;
       
  4967 						}
       
  4968 						return val;
       
  4969 					}
       
  4970 
       
  4971 					function MoveToFront( v, index ) {
       
  4972 						var value = v[ index ];
       
  4973 						var i = index;
       
  4974 						for ( ; i; --i ) v[ i ] = v[ i - 1 ];
       
  4975 						v[ 0 ] = value;
       
  4976 					}
       
  4977 
       
  4978 					function InverseMoveToFrontTransform( v, v_len ) {
       
  4979 						var mtf = new Uint8Array( 256 );
       
  4980 						var i;
       
  4981 						for ( i = 0; i < 256; ++i ) {
       
  4982 							mtf[ i ] = i;
       
  4983 						}
       
  4984 						for ( i = 0; i < v_len; ++i ) {
       
  4985 							var index = v[ i ];
       
  4986 							v[ i ] = mtf[ index ];
       
  4987 							if ( index ) MoveToFront( mtf, index );
       
  4988 						}
       
  4989 					}
       
  4990 
       
  4991 					/* Contains a collection of huffman trees with the same alphabet size. */
       
  4992 					function HuffmanTreeGroup( alphabet_size, num_htrees ) {
       
  4993 						this.alphabet_size = alphabet_size;
       
  4994 						this.num_htrees = num_htrees;
       
  4995 						this.codes = new Array(
       
  4996 							num_htrees +
       
  4997 								num_htrees *
       
  4998 									kMaxHuffmanTableSize[
       
  4999 										( alphabet_size + 31 ) >>> 5
       
  5000 									]
       
  5001 						);
       
  5002 						this.htrees = new Uint32Array( num_htrees );
       
  5003 					}
       
  5004 
       
  5005 					HuffmanTreeGroup.prototype.decode = function ( br ) {
       
  5006 						var i;
       
  5007 						var table_size;
       
  5008 						var next = 0;
       
  5009 						for ( i = 0; i < this.num_htrees; ++i ) {
       
  5010 							this.htrees[ i ] = next;
       
  5011 							table_size = ReadHuffmanCode(
       
  5012 								this.alphabet_size,
       
  5013 								this.codes,
       
  5014 								next,
       
  5015 								br
       
  5016 							);
       
  5017 							next += table_size;
       
  5018 						}
       
  5019 					};
       
  5020 
       
  5021 					function DecodeContextMap( context_map_size, br ) {
       
  5022 						var out = { num_htrees: null, context_map: null };
       
  5023 						var use_rle_for_zeros;
       
  5024 						var max_run_length_prefix = 0;
       
  5025 						var table;
       
  5026 						var i;
       
  5027 
       
  5028 						br.readMoreInput();
       
  5029 						var num_htrees = ( out.num_htrees =
       
  5030 							DecodeVarLenUint8( br ) + 1 );
       
  5031 
       
  5032 						var context_map = ( out.context_map = new Uint8Array(
       
  5033 							context_map_size
       
  5034 						) );
       
  5035 						if ( num_htrees <= 1 ) {
       
  5036 							return out;
       
  5037 						}
       
  5038 
       
  5039 						use_rle_for_zeros = br.readBits( 1 );
       
  5040 						if ( use_rle_for_zeros ) {
       
  5041 							max_run_length_prefix = br.readBits( 4 ) + 1;
       
  5042 						}
       
  5043 
       
  5044 						table = [];
       
  5045 						for ( i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++ ) {
       
  5046 							table[ i ] = new HuffmanCode( 0, 0 );
       
  5047 						}
       
  5048 
       
  5049 						ReadHuffmanCode(
       
  5050 							num_htrees + max_run_length_prefix,
       
  5051 							table,
       
  5052 							0,
       
  5053 							br
       
  5054 						);
       
  5055 
       
  5056 						for ( i = 0; i < context_map_size;  ) {
       
  5057 							var code;
       
  5058 
       
  5059 							br.readMoreInput();
       
  5060 							code = ReadSymbol( table, 0, br );
       
  5061 							if ( code === 0 ) {
       
  5062 								context_map[ i ] = 0;
       
  5063 								++i;
       
  5064 							} else if ( code <= max_run_length_prefix ) {
       
  5065 								var reps =
       
  5066 									1 + ( 1 << code ) + br.readBits( code );
       
  5067 								while ( --reps ) {
       
  5068 									if ( i >= context_map_size ) {
       
  5069 										throw new Error(
       
  5070 											'[DecodeContextMap] i >= context_map_size'
       
  5071 										);
       
  5072 									}
       
  5073 									context_map[ i ] = 0;
       
  5074 									++i;
       
  5075 								}
       
  5076 							} else {
       
  5077 								context_map[ i ] = code - max_run_length_prefix;
       
  5078 								++i;
       
  5079 							}
       
  5080 						}
       
  5081 						if ( br.readBits( 1 ) ) {
       
  5082 							InverseMoveToFrontTransform(
       
  5083 								context_map,
       
  5084 								context_map_size
       
  5085 							);
       
  5086 						}
       
  5087 
       
  5088 						return out;
       
  5089 					}
       
  5090 
       
  5091 					function DecodeBlockType(
       
  5092 						max_block_type,
       
  5093 						trees,
       
  5094 						tree_type,
       
  5095 						block_types,
       
  5096 						ringbuffers,
       
  5097 						indexes,
       
  5098 						br
       
  5099 					) {
       
  5100 						var ringbuffer = tree_type * 2;
       
  5101 						var index = tree_type;
       
  5102 						var type_code = ReadSymbol(
       
  5103 							trees,
       
  5104 							tree_type * HUFFMAN_MAX_TABLE_SIZE,
       
  5105 							br
       
  5106 						);
       
  5107 						var block_type;
       
  5108 						if ( type_code === 0 ) {
       
  5109 							block_type =
       
  5110 								ringbuffers[
       
  5111 									ringbuffer + ( indexes[ index ] & 1 )
       
  5112 								];
       
  5113 						} else if ( type_code === 1 ) {
       
  5114 							block_type =
       
  5115 								ringbuffers[
       
  5116 									ringbuffer +
       
  5117 										( ( indexes[ index ] - 1 ) & 1 )
       
  5118 								] + 1;
       
  5119 						} else {
       
  5120 							block_type = type_code - 2;
       
  5121 						}
       
  5122 						if ( block_type >= max_block_type ) {
       
  5123 							block_type -= max_block_type;
       
  5124 						}
       
  5125 						block_types[ tree_type ] = block_type;
       
  5126 						ringbuffers[ ringbuffer + ( indexes[ index ] & 1 ) ] =
       
  5127 							block_type;
       
  5128 						++indexes[ index ];
       
  5129 					}
       
  5130 
       
  5131 					function CopyUncompressedBlockToOutput(
       
  5132 						output,
       
  5133 						len,
       
  5134 						pos,
       
  5135 						ringbuffer,
       
  5136 						ringbuffer_mask,
       
  5137 						br
       
  5138 					) {
       
  5139 						var rb_size = ringbuffer_mask + 1;
       
  5140 						var rb_pos = pos & ringbuffer_mask;
       
  5141 						var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;
       
  5142 						var nbytes;
       
  5143 
       
  5144 						/* For short lengths copy byte-by-byte */
       
  5145 						if (
       
  5146 							len < 8 ||
       
  5147 							br.bit_pos_ + ( len << 3 ) < br.bit_end_pos_
       
  5148 						) {
       
  5149 							while ( len-- > 0 ) {
       
  5150 								br.readMoreInput();
       
  5151 								ringbuffer[ rb_pos++ ] = br.readBits( 8 );
       
  5152 								if ( rb_pos === rb_size ) {
       
  5153 									output.write( ringbuffer, rb_size );
       
  5154 									rb_pos = 0;
       
  5155 								}
       
  5156 							}
       
  5157 							return;
       
  5158 						}
       
  5159 
       
  5160 						if ( br.bit_end_pos_ < 32 ) {
       
  5161 							throw new Error(
       
  5162 								'[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32'
       
  5163 							);
       
  5164 						}
       
  5165 
       
  5166 						/* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */
       
  5167 						while ( br.bit_pos_ < 32 ) {
       
  5168 							ringbuffer[ rb_pos ] = br.val_ >>> br.bit_pos_;
       
  5169 							br.bit_pos_ += 8;
       
  5170 							++rb_pos;
       
  5171 							--len;
       
  5172 						}
       
  5173 
       
  5174 						/* Copy remaining bytes from br.buf_ to ringbuffer. */
       
  5175 						nbytes = ( br.bit_end_pos_ - br.bit_pos_ ) >> 3;
       
  5176 						if ( br_pos + nbytes > BrotliBitReader.IBUF_MASK ) {
       
  5177 							var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
       
  5178 							for ( var x = 0; x < tail; x++ )
       
  5179 								ringbuffer[ rb_pos + x ] =
       
  5180 									br.buf_[ br_pos + x ];
       
  5181 
       
  5182 							nbytes -= tail;
       
  5183 							rb_pos += tail;
       
  5184 							len -= tail;
       
  5185 							br_pos = 0;
       
  5186 						}
       
  5187 
       
  5188 						for ( var x = 0; x < nbytes; x++ )
       
  5189 							ringbuffer[ rb_pos + x ] = br.buf_[ br_pos + x ];
       
  5190 
       
  5191 						rb_pos += nbytes;
       
  5192 						len -= nbytes;
       
  5193 
       
  5194 						/* If we wrote past the logical end of the ringbuffer, copy the tail of the
       
  5195      ringbuffer to its beginning and flush the ringbuffer to the output. */
       
  5196 						if ( rb_pos >= rb_size ) {
       
  5197 							output.write( ringbuffer, rb_size );
       
  5198 							rb_pos -= rb_size;
       
  5199 							for ( var x = 0; x < rb_pos; x++ )
       
  5200 								ringbuffer[ x ] = ringbuffer[ rb_size + x ];
       
  5201 						}
       
  5202 
       
  5203 						/* If we have more to copy than the remaining size of the ringbuffer, then we
       
  5204      first fill the ringbuffer from the input and then flush the ringbuffer to
       
  5205      the output */
       
  5206 						while ( rb_pos + len >= rb_size ) {
       
  5207 							nbytes = rb_size - rb_pos;
       
  5208 							if (
       
  5209 								br.input_.read( ringbuffer, rb_pos, nbytes ) <
       
  5210 								nbytes
       
  5211 							) {
       
  5212 								throw new Error(
       
  5213 									'[CopyUncompressedBlockToOutput] not enough bytes'
       
  5214 								);
       
  5215 							}
       
  5216 							output.write( ringbuffer, rb_size );
       
  5217 							len -= nbytes;
       
  5218 							rb_pos = 0;
       
  5219 						}
       
  5220 
       
  5221 						/* Copy straight from the input onto the ringbuffer. The ringbuffer will be
       
  5222      flushed to the output at a later time. */
       
  5223 						if ( br.input_.read( ringbuffer, rb_pos, len ) < len ) {
       
  5224 							throw new Error(
       
  5225 								'[CopyUncompressedBlockToOutput] not enough bytes'
       
  5226 							);
       
  5227 						}
       
  5228 
       
  5229 						/* Restore the state of the bit reader. */
       
  5230 						br.reset();
       
  5231 					}
       
  5232 
       
  5233 					/* Advances the bit reader position to the next byte boundary and verifies
       
  5234    that any skipped bits are set to zero. */
       
  5235 					function JumpToByteBoundary( br ) {
       
  5236 						var new_bit_pos = ( br.bit_pos_ + 7 ) & ~7;
       
  5237 						var pad_bits = br.readBits( new_bit_pos - br.bit_pos_ );
       
  5238 						return pad_bits == 0;
       
  5239 					}
       
  5240 
       
  5241 					function BrotliDecompressedSize( buffer ) {
       
  5242 						var input = new BrotliInput( buffer );
       
  5243 						var br = new BrotliBitReader( input );
       
  5244 						DecodeWindowBits( br );
       
  5245 						var out = DecodeMetaBlockLength( br );
       
  5246 						return out.meta_block_length;
       
  5247 					}
       
  5248 
       
  5249 					exports.BrotliDecompressedSize = BrotliDecompressedSize;
       
  5250 
       
  5251 					function BrotliDecompressBuffer( buffer, output_size ) {
       
  5252 						var input = new BrotliInput( buffer );
       
  5253 
       
  5254 						if ( output_size == null ) {
       
  5255 							output_size = BrotliDecompressedSize( buffer );
       
  5256 						}
       
  5257 
       
  5258 						var output_buffer = new Uint8Array( output_size );
       
  5259 						var output = new BrotliOutput( output_buffer );
       
  5260 
       
  5261 						BrotliDecompress( input, output );
       
  5262 
       
  5263 						if ( output.pos < output.buffer.length ) {
       
  5264 							output.buffer = output.buffer.subarray(
       
  5265 								0,
       
  5266 								output.pos
       
  5267 							);
       
  5268 						}
       
  5269 
       
  5270 						return output.buffer;
       
  5271 					}
       
  5272 
       
  5273 					exports.BrotliDecompressBuffer = BrotliDecompressBuffer;
       
  5274 
       
  5275 					function BrotliDecompress( input, output ) {
       
  5276 						var i;
       
  5277 						var pos = 0;
       
  5278 						var input_end = 0;
       
  5279 						var window_bits = 0;
       
  5280 						var max_backward_distance;
       
  5281 						var max_distance = 0;
       
  5282 						var ringbuffer_size;
       
  5283 						var ringbuffer_mask;
       
  5284 						var ringbuffer;
       
  5285 						var ringbuffer_end;
       
  5286 						/* This ring buffer holds a few past copy distances that will be used by */
       
  5287 						/* some special distance codes. */
       
  5288 						var dist_rb = [ 16, 15, 11, 4 ];
       
  5289 						var dist_rb_idx = 0;
       
  5290 						/* The previous 2 bytes used for context. */
       
  5291 						var prev_byte1 = 0;
       
  5292 						var prev_byte2 = 0;
       
  5293 						var hgroup = [
       
  5294 							new HuffmanTreeGroup( 0, 0 ),
       
  5295 							new HuffmanTreeGroup( 0, 0 ),
       
  5296 							new HuffmanTreeGroup( 0, 0 ),
       
  5297 						];
       
  5298 						var block_type_trees;
       
  5299 						var block_len_trees;
       
  5300 						var br;
       
  5301 
       
  5302 						/* We need the slack region for the following reasons:
       
  5303        - always doing two 8-byte copies for fast backward copying
       
  5304        - transforms
       
  5305        - flushing the input ringbuffer when decoding uncompressed blocks */
       
  5306 						var kRingBufferWriteAheadSlack =
       
  5307 							128 + BrotliBitReader.READ_SIZE;
       
  5308 
       
  5309 						br = new BrotliBitReader( input );
       
  5310 
       
  5311 						/* Decode window size. */
       
  5312 						window_bits = DecodeWindowBits( br );
       
  5313 						max_backward_distance = ( 1 << window_bits ) - 16;
       
  5314 
       
  5315 						ringbuffer_size = 1 << window_bits;
       
  5316 						ringbuffer_mask = ringbuffer_size - 1;
       
  5317 						ringbuffer = new Uint8Array(
       
  5318 							ringbuffer_size +
       
  5319 								kRingBufferWriteAheadSlack +
       
  5320 								BrotliDictionary.maxDictionaryWordLength
       
  5321 						);
       
  5322 						ringbuffer_end = ringbuffer_size;
       
  5323 
       
  5324 						block_type_trees = [];
       
  5325 						block_len_trees = [];
       
  5326 						for ( var x = 0; x < 3 * HUFFMAN_MAX_TABLE_SIZE; x++ ) {
       
  5327 							block_type_trees[ x ] = new HuffmanCode( 0, 0 );
       
  5328 							block_len_trees[ x ] = new HuffmanCode( 0, 0 );
       
  5329 						}
       
  5330 
       
  5331 						while ( ! input_end ) {
       
  5332 							var meta_block_remaining_len = 0;
       
  5333 							var is_uncompressed;
       
  5334 							var block_length = [ 1 << 28, 1 << 28, 1 << 28 ];
       
  5335 							var block_type = [ 0 ];
       
  5336 							var num_block_types = [ 1, 1, 1 ];
       
  5337 							var block_type_rb = [ 0, 1, 0, 1, 0, 1 ];
       
  5338 							var block_type_rb_index = [ 0 ];
       
  5339 							var distance_postfix_bits;
       
  5340 							var num_direct_distance_codes;
       
  5341 							var distance_postfix_mask;
       
  5342 							var num_distance_codes;
       
  5343 							var context_map = null;
       
  5344 							var context_modes = null;
       
  5345 							var num_literal_htrees;
       
  5346 							var dist_context_map = null;
       
  5347 							var num_dist_htrees;
       
  5348 							var context_offset = 0;
       
  5349 							var context_map_slice = null;
       
  5350 							var literal_htree_index = 0;
       
  5351 							var dist_context_offset = 0;
       
  5352 							var dist_context_map_slice = null;
       
  5353 							var dist_htree_index = 0;
       
  5354 							var context_lookup_offset1 = 0;
       
  5355 							var context_lookup_offset2 = 0;
       
  5356 							var context_mode;
       
  5357 							var htree_command;
       
  5358 
       
  5359 							for ( i = 0; i < 3; ++i ) {
       
  5360 								hgroup[ i ].codes = null;
       
  5361 								hgroup[ i ].htrees = null;
       
  5362 							}
       
  5363 
       
  5364 							br.readMoreInput();
       
  5365 
       
  5366 							var _out = DecodeMetaBlockLength( br );
       
  5367 							meta_block_remaining_len = _out.meta_block_length;
       
  5368 							if (
       
  5369 								pos + meta_block_remaining_len >
       
  5370 								output.buffer.length
       
  5371 							) {
       
  5372 								/* We need to grow the output buffer to fit the additional data. */
       
  5373 								var tmp = new Uint8Array(
       
  5374 									pos + meta_block_remaining_len
       
  5375 								);
       
  5376 								tmp.set( output.buffer );
       
  5377 								output.buffer = tmp;
       
  5378 							}
       
  5379 							input_end = _out.input_end;
       
  5380 							is_uncompressed = _out.is_uncompressed;
       
  5381 
       
  5382 							if ( _out.is_metadata ) {
       
  5383 								JumpToByteBoundary( br );
       
  5384 
       
  5385 								for (
       
  5386 									;
       
  5387 									meta_block_remaining_len > 0;
       
  5388 									--meta_block_remaining_len
       
  5389 								) {
       
  5390 									br.readMoreInput();
       
  5391 									/* Read one byte and ignore it. */
       
  5392 									br.readBits( 8 );
       
  5393 								}
       
  5394 
       
  5395 								continue;
       
  5396 							}
       
  5397 
       
  5398 							if ( meta_block_remaining_len === 0 ) {
       
  5399 								continue;
       
  5400 							}
       
  5401 
       
  5402 							if ( is_uncompressed ) {
       
  5403 								br.bit_pos_ = ( br.bit_pos_ + 7 ) & ~7;
       
  5404 								CopyUncompressedBlockToOutput(
       
  5405 									output,
       
  5406 									meta_block_remaining_len,
       
  5407 									pos,
       
  5408 									ringbuffer,
       
  5409 									ringbuffer_mask,
       
  5410 									br
       
  5411 								);
       
  5412 								pos += meta_block_remaining_len;
       
  5413 								continue;
       
  5414 							}
       
  5415 
       
  5416 							for ( i = 0; i < 3; ++i ) {
       
  5417 								num_block_types[ i ] =
       
  5418 									DecodeVarLenUint8( br ) + 1;
       
  5419 								if ( num_block_types[ i ] >= 2 ) {
       
  5420 									ReadHuffmanCode(
       
  5421 										num_block_types[ i ] + 2,
       
  5422 										block_type_trees,
       
  5423 										i * HUFFMAN_MAX_TABLE_SIZE,
       
  5424 										br
       
  5425 									);
       
  5426 									ReadHuffmanCode(
       
  5427 										kNumBlockLengthCodes,
       
  5428 										block_len_trees,
       
  5429 										i * HUFFMAN_MAX_TABLE_SIZE,
       
  5430 										br
       
  5431 									);
       
  5432 									block_length[ i ] = ReadBlockLength(
       
  5433 										block_len_trees,
       
  5434 										i * HUFFMAN_MAX_TABLE_SIZE,
       
  5435 										br
       
  5436 									);
       
  5437 									block_type_rb_index[ i ] = 1;
       
  5438 								}
       
  5439 							}
       
  5440 
       
  5441 							br.readMoreInput();
       
  5442 
       
  5443 							distance_postfix_bits = br.readBits( 2 );
       
  5444 							num_direct_distance_codes =
       
  5445 								NUM_DISTANCE_SHORT_CODES +
       
  5446 								( br.readBits( 4 ) << distance_postfix_bits );
       
  5447 							distance_postfix_mask =
       
  5448 								( 1 << distance_postfix_bits ) - 1;
       
  5449 							num_distance_codes =
       
  5450 								num_direct_distance_codes +
       
  5451 								( 48 << distance_postfix_bits );
       
  5452 							context_modes = new Uint8Array(
       
  5453 								num_block_types[ 0 ]
       
  5454 							);
       
  5455 
       
  5456 							for ( i = 0; i < num_block_types[ 0 ]; ++i ) {
       
  5457 								br.readMoreInput();
       
  5458 								context_modes[ i ] = br.readBits( 2 ) << 1;
       
  5459 							}
       
  5460 
       
  5461 							var _o1 = DecodeContextMap(
       
  5462 								num_block_types[ 0 ] << kLiteralContextBits,
       
  5463 								br
       
  5464 							);
       
  5465 							num_literal_htrees = _o1.num_htrees;
       
  5466 							context_map = _o1.context_map;
       
  5467 
       
  5468 							var _o2 = DecodeContextMap(
       
  5469 								num_block_types[ 2 ] << kDistanceContextBits,
       
  5470 								br
       
  5471 							);
       
  5472 							num_dist_htrees = _o2.num_htrees;
       
  5473 							dist_context_map = _o2.context_map;
       
  5474 
       
  5475 							hgroup[ 0 ] = new HuffmanTreeGroup(
       
  5476 								kNumLiteralCodes,
       
  5477 								num_literal_htrees
       
  5478 							);
       
  5479 							hgroup[ 1 ] = new HuffmanTreeGroup(
       
  5480 								kNumInsertAndCopyCodes,
       
  5481 								num_block_types[ 1 ]
       
  5482 							);
       
  5483 							hgroup[ 2 ] = new HuffmanTreeGroup(
       
  5484 								num_distance_codes,
       
  5485 								num_dist_htrees
       
  5486 							);
       
  5487 
       
  5488 							for ( i = 0; i < 3; ++i ) {
       
  5489 								hgroup[ i ].decode( br );
       
  5490 							}
       
  5491 
       
  5492 							context_map_slice = 0;
       
  5493 							dist_context_map_slice = 0;
       
  5494 							context_mode = context_modes[ block_type[ 0 ] ];
       
  5495 							context_lookup_offset1 =
       
  5496 								Context.lookupOffsets[ context_mode ];
       
  5497 							context_lookup_offset2 =
       
  5498 								Context.lookupOffsets[ context_mode + 1 ];
       
  5499 							htree_command = hgroup[ 1 ].htrees[ 0 ];
       
  5500 
       
  5501 							while ( meta_block_remaining_len > 0 ) {
       
  5502 								var cmd_code;
       
  5503 								var range_idx;
       
  5504 								var insert_code;
       
  5505 								var copy_code;
       
  5506 								var insert_length;
       
  5507 								var copy_length;
       
  5508 								var distance_code;
       
  5509 								var distance;
       
  5510 								var context;
       
  5511 								var j;
       
  5512 								var copy_dst;
       
  5513 
       
  5514 								br.readMoreInput();
       
  5515 
       
  5516 								if ( block_length[ 1 ] === 0 ) {
       
  5517 									DecodeBlockType(
       
  5518 										num_block_types[ 1 ],
       
  5519 										block_type_trees,
       
  5520 										1,
       
  5521 										block_type,
       
  5522 										block_type_rb,
       
  5523 										block_type_rb_index,
       
  5524 										br
       
  5525 									);
       
  5526 									block_length[ 1 ] = ReadBlockLength(
       
  5527 										block_len_trees,
       
  5528 										HUFFMAN_MAX_TABLE_SIZE,
       
  5529 										br
       
  5530 									);
       
  5531 									htree_command =
       
  5532 										hgroup[ 1 ].htrees[ block_type[ 1 ] ];
       
  5533 								}
       
  5534 								--block_length[ 1 ];
       
  5535 								cmd_code = ReadSymbol(
       
  5536 									hgroup[ 1 ].codes,
       
  5537 									htree_command,
       
  5538 									br
       
  5539 								);
       
  5540 								range_idx = cmd_code >> 6;
       
  5541 								if ( range_idx >= 2 ) {
       
  5542 									range_idx -= 2;
       
  5543 									distance_code = -1;
       
  5544 								} else {
       
  5545 									distance_code = 0;
       
  5546 								}
       
  5547 								insert_code =
       
  5548 									Prefix.kInsertRangeLut[ range_idx ] +
       
  5549 									( ( cmd_code >> 3 ) & 7 );
       
  5550 								copy_code =
       
  5551 									Prefix.kCopyRangeLut[ range_idx ] +
       
  5552 									( cmd_code & 7 );
       
  5553 								insert_length =
       
  5554 									Prefix.kInsertLengthPrefixCode[
       
  5555 										insert_code
       
  5556 									].offset +
       
  5557 									br.readBits(
       
  5558 										Prefix.kInsertLengthPrefixCode[
       
  5559 											insert_code
       
  5560 										].nbits
       
  5561 									);
       
  5562 								copy_length =
       
  5563 									Prefix.kCopyLengthPrefixCode[ copy_code ]
       
  5564 										.offset +
       
  5565 									br.readBits(
       
  5566 										Prefix.kCopyLengthPrefixCode[
       
  5567 											copy_code
       
  5568 										].nbits
       
  5569 									);
       
  5570 								prev_byte1 =
       
  5571 									ringbuffer[ ( pos - 1 ) & ringbuffer_mask ];
       
  5572 								prev_byte2 =
       
  5573 									ringbuffer[ ( pos - 2 ) & ringbuffer_mask ];
       
  5574 								for ( j = 0; j < insert_length; ++j ) {
       
  5575 									br.readMoreInput();
       
  5576 
       
  5577 									if ( block_length[ 0 ] === 0 ) {
       
  5578 										DecodeBlockType(
       
  5579 											num_block_types[ 0 ],
       
  5580 											block_type_trees,
       
  5581 											0,
       
  5582 											block_type,
       
  5583 											block_type_rb,
       
  5584 											block_type_rb_index,
       
  5585 											br
       
  5586 										);
       
  5587 										block_length[ 0 ] = ReadBlockLength(
       
  5588 											block_len_trees,
       
  5589 											0,
       
  5590 											br
       
  5591 										);
       
  5592 										context_offset =
       
  5593 											block_type[ 0 ] <<
       
  5594 											kLiteralContextBits;
       
  5595 										context_map_slice = context_offset;
       
  5596 										context_mode =
       
  5597 											context_modes[ block_type[ 0 ] ];
       
  5598 										context_lookup_offset1 =
       
  5599 											Context.lookupOffsets[
       
  5600 												context_mode
       
  5601 											];
       
  5602 										context_lookup_offset2 =
       
  5603 											Context.lookupOffsets[
       
  5604 												context_mode + 1
       
  5605 											];
       
  5606 									}
       
  5607 									context =
       
  5608 										Context.lookup[
       
  5609 											context_lookup_offset1 + prev_byte1
       
  5610 										] |
       
  5611 										Context.lookup[
       
  5612 											context_lookup_offset2 + prev_byte2
       
  5613 										];
       
  5614 									literal_htree_index =
       
  5615 										context_map[
       
  5616 											context_map_slice + context
       
  5617 										];
       
  5618 									--block_length[ 0 ];
       
  5619 									prev_byte2 = prev_byte1;
       
  5620 									prev_byte1 = ReadSymbol(
       
  5621 										hgroup[ 0 ].codes,
       
  5622 										hgroup[ 0 ].htrees[
       
  5623 											literal_htree_index
       
  5624 										],
       
  5625 										br
       
  5626 									);
       
  5627 									ringbuffer[ pos & ringbuffer_mask ] =
       
  5628 										prev_byte1;
       
  5629 									if (
       
  5630 										( pos & ringbuffer_mask ) ===
       
  5631 										ringbuffer_mask
       
  5632 									) {
       
  5633 										output.write(
       
  5634 											ringbuffer,
       
  5635 											ringbuffer_size
       
  5636 										);
       
  5637 									}
       
  5638 									++pos;
       
  5639 								}
       
  5640 								meta_block_remaining_len -= insert_length;
       
  5641 								if ( meta_block_remaining_len <= 0 ) break;
       
  5642 
       
  5643 								if ( distance_code < 0 ) {
       
  5644 									var context;
       
  5645 
       
  5646 									br.readMoreInput();
       
  5647 									if ( block_length[ 2 ] === 0 ) {
       
  5648 										DecodeBlockType(
       
  5649 											num_block_types[ 2 ],
       
  5650 											block_type_trees,
       
  5651 											2,
       
  5652 											block_type,
       
  5653 											block_type_rb,
       
  5654 											block_type_rb_index,
       
  5655 											br
       
  5656 										);
       
  5657 										block_length[ 2 ] = ReadBlockLength(
       
  5658 											block_len_trees,
       
  5659 											2 * HUFFMAN_MAX_TABLE_SIZE,
       
  5660 											br
       
  5661 										);
       
  5662 										dist_context_offset =
       
  5663 											block_type[ 2 ] <<
       
  5664 											kDistanceContextBits;
       
  5665 										dist_context_map_slice =
       
  5666 											dist_context_offset;
       
  5667 									}
       
  5668 									--block_length[ 2 ];
       
  5669 									context =
       
  5670 										( copy_length > 4
       
  5671 											? 3
       
  5672 											: copy_length - 2 ) & 0xff;
       
  5673 									dist_htree_index =
       
  5674 										dist_context_map[
       
  5675 											dist_context_map_slice + context
       
  5676 										];
       
  5677 									distance_code = ReadSymbol(
       
  5678 										hgroup[ 2 ].codes,
       
  5679 										hgroup[ 2 ].htrees[ dist_htree_index ],
       
  5680 										br
       
  5681 									);
       
  5682 									if (
       
  5683 										distance_code >=
       
  5684 										num_direct_distance_codes
       
  5685 									) {
       
  5686 										var nbits;
       
  5687 										var postfix;
       
  5688 										var offset;
       
  5689 										distance_code -=
       
  5690 											num_direct_distance_codes;
       
  5691 										postfix =
       
  5692 											distance_code &
       
  5693 											distance_postfix_mask;
       
  5694 										distance_code >>= distance_postfix_bits;
       
  5695 										nbits = ( distance_code >> 1 ) + 1;
       
  5696 										offset =
       
  5697 											( ( 2 + ( distance_code & 1 ) ) <<
       
  5698 												nbits ) -
       
  5699 											4;
       
  5700 										distance_code =
       
  5701 											num_direct_distance_codes +
       
  5702 											( ( offset +
       
  5703 												br.readBits( nbits ) ) <<
       
  5704 												distance_postfix_bits ) +
       
  5705 											postfix;
       
  5706 									}
       
  5707 								}
       
  5708 
       
  5709 								/* Convert the distance code to the actual distance by possibly looking */
       
  5710 								/* up past distnaces from the ringbuffer. */
       
  5711 								distance = TranslateShortCodes(
       
  5712 									distance_code,
       
  5713 									dist_rb,
       
  5714 									dist_rb_idx
       
  5715 								);
       
  5716 								if ( distance < 0 ) {
       
  5717 									throw new Error(
       
  5718 										'[BrotliDecompress] invalid distance'
       
  5719 									);
       
  5720 								}
       
  5721 
       
  5722 								if (
       
  5723 									pos < max_backward_distance &&
       
  5724 									max_distance !== max_backward_distance
       
  5725 								) {
       
  5726 									max_distance = pos;
       
  5727 								} else {
       
  5728 									max_distance = max_backward_distance;
       
  5729 								}
       
  5730 
       
  5731 								copy_dst = pos & ringbuffer_mask;
       
  5732 
       
  5733 								if ( distance > max_distance ) {
       
  5734 									if (
       
  5735 										copy_length >=
       
  5736 											BrotliDictionary.minDictionaryWordLength &&
       
  5737 										copy_length <=
       
  5738 											BrotliDictionary.maxDictionaryWordLength
       
  5739 									) {
       
  5740 										var offset =
       
  5741 											BrotliDictionary.offsetsByLength[
       
  5742 												copy_length
       
  5743 											];
       
  5744 										var word_id =
       
  5745 											distance - max_distance - 1;
       
  5746 										var shift =
       
  5747 											BrotliDictionary.sizeBitsByLength[
       
  5748 												copy_length
       
  5749 											];
       
  5750 										var mask = ( 1 << shift ) - 1;
       
  5751 										var word_idx = word_id & mask;
       
  5752 										var transform_idx = word_id >> shift;
       
  5753 										offset += word_idx * copy_length;
       
  5754 										if (
       
  5755 											transform_idx <
       
  5756 											Transform.kNumTransforms
       
  5757 										) {
       
  5758 											var len =
       
  5759 												Transform.transformDictionaryWord(
       
  5760 													ringbuffer,
       
  5761 													copy_dst,
       
  5762 													offset,
       
  5763 													copy_length,
       
  5764 													transform_idx
       
  5765 												);
       
  5766 											copy_dst += len;
       
  5767 											pos += len;
       
  5768 											meta_block_remaining_len -= len;
       
  5769 											if ( copy_dst >= ringbuffer_end ) {
       
  5770 												output.write(
       
  5771 													ringbuffer,
       
  5772 													ringbuffer_size
       
  5773 												);
       
  5774 
       
  5775 												for (
       
  5776 													var _x = 0;
       
  5777 													_x <
       
  5778 													copy_dst - ringbuffer_end;
       
  5779 													_x++
       
  5780 												)
       
  5781 													ringbuffer[ _x ] =
       
  5782 														ringbuffer[
       
  5783 															ringbuffer_end + _x
       
  5784 														];
       
  5785 											}
       
  5786 										} else {
       
  5787 											throw new Error(
       
  5788 												'Invalid backward reference. pos: ' +
       
  5789 													pos +
       
  5790 													' distance: ' +
       
  5791 													distance +
       
  5792 													' len: ' +
       
  5793 													copy_length +
       
  5794 													' bytes left: ' +
       
  5795 													meta_block_remaining_len
       
  5796 											);
       
  5797 										}
       
  5798 									} else {
       
  5799 										throw new Error(
       
  5800 											'Invalid backward reference. pos: ' +
       
  5801 												pos +
       
  5802 												' distance: ' +
       
  5803 												distance +
       
  5804 												' len: ' +
       
  5805 												copy_length +
       
  5806 												' bytes left: ' +
       
  5807 												meta_block_remaining_len
       
  5808 										);
       
  5809 									}
       
  5810 								} else {
       
  5811 									if ( distance_code > 0 ) {
       
  5812 										dist_rb[ dist_rb_idx & 3 ] = distance;
       
  5813 										++dist_rb_idx;
       
  5814 									}
       
  5815 
       
  5816 									if (
       
  5817 										copy_length > meta_block_remaining_len
       
  5818 									) {
       
  5819 										throw new Error(
       
  5820 											'Invalid backward reference. pos: ' +
       
  5821 												pos +
       
  5822 												' distance: ' +
       
  5823 												distance +
       
  5824 												' len: ' +
       
  5825 												copy_length +
       
  5826 												' bytes left: ' +
       
  5827 												meta_block_remaining_len
       
  5828 										);
       
  5829 									}
       
  5830 
       
  5831 									for ( j = 0; j < copy_length; ++j ) {
       
  5832 										ringbuffer[ pos & ringbuffer_mask ] =
       
  5833 											ringbuffer[
       
  5834 												( pos - distance ) &
       
  5835 													ringbuffer_mask
       
  5836 											];
       
  5837 										if (
       
  5838 											( pos & ringbuffer_mask ) ===
       
  5839 											ringbuffer_mask
       
  5840 										) {
       
  5841 											output.write(
       
  5842 												ringbuffer,
       
  5843 												ringbuffer_size
       
  5844 											);
       
  5845 										}
       
  5846 										++pos;
       
  5847 										--meta_block_remaining_len;
       
  5848 									}
       
  5849 								}
       
  5850 
       
  5851 								/* When we get here, we must have inserted at least one literal and */
       
  5852 								/* made a copy of at least length two, therefore accessing the last 2 */
       
  5853 								/* bytes is valid. */
       
  5854 								prev_byte1 =
       
  5855 									ringbuffer[ ( pos - 1 ) & ringbuffer_mask ];
       
  5856 								prev_byte2 =
       
  5857 									ringbuffer[ ( pos - 2 ) & ringbuffer_mask ];
       
  5858 							}
       
  5859 
       
  5860 							/* Protect pos from overflow, wrap it around at every GB of input data */
       
  5861 							pos &= 0x3fffffff;
       
  5862 						}
       
  5863 
       
  5864 						output.write( ringbuffer, pos & ringbuffer_mask );
       
  5865 					}
       
  5866 
       
  5867 					exports.BrotliDecompress = BrotliDecompress;
       
  5868 
       
  5869 					BrotliDictionary.init();
       
  5870 				},
       
  5871 				{
       
  5872 					'./bit_reader': 1,
       
  5873 					'./context': 2,
       
  5874 					'./dictionary': 6,
       
  5875 					'./huffman': 7,
       
  5876 					'./prefix': 9,
       
  5877 					'./streams': 10,
       
  5878 					'./transform': 11,
       
  5879 				},
       
  5880 			],
       
  5881 			4: [
       
  5882 				function ( require, module, exports ) {
       
  5883 					var base64 = require( 'base64-js' );
       
  5884 					//var fs = require('fs');
       
  5885 
       
  5886 					/**
       
  5887 					 * The normal dictionary-data.js is quite large, which makes it
       
  5888 					 * unsuitable for browser usage. In order to make it smaller,
       
  5889 					 * we read dictionary.bin, which is a compressed version of
       
  5890 					 * the dictionary, and on initial load, Brotli decompresses
       
  5891 					 * it's own dictionary. 😜
       
  5892 					 */
       
  5893 					exports.init = function () {
       
  5894 						var BrotliDecompressBuffer =
       
  5895 							require( './decode' ).BrotliDecompressBuffer;
       
  5896 						var compressed = base64.toByteArray(
       
  5897 							require( './dictionary.bin.js' )
       
  5898 						);
       
  5899 						return BrotliDecompressBuffer( compressed );
       
  5900 					};
       
  5901 				},
       
  5902 				{ './decode': 3, './dictionary.bin.js': 5, 'base64-js': 8 },
       
  5903 			],
       
  5904 			5: [
       
  5905 				function ( require, module, exports ) {
       
  5906 					module.exports =
       
  5907 						'W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg=';
       
  5908 				},
       
  5909 				{},
       
  5910 			],
       
  5911 			6: [
       
  5912 				function ( require, module, exports ) {
       
  5913 					/* Copyright 2013 Google Inc. All Rights Reserved.
       
  5914 
       
  5915    Licensed under the Apache License, Version 2.0 (the "License");
       
  5916    you may not use this file except in compliance with the License.
       
  5917    You may obtain a copy of the License at
       
  5918 
       
  5919    http://www.apache.org/licenses/LICENSE-2.0
       
  5920 
       
  5921    Unless required by applicable law or agreed to in writing, software
       
  5922    distributed under the License is distributed on an "AS IS" BASIS,
       
  5923    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
  5924    See the License for the specific language governing permissions and
       
  5925    limitations under the License.
       
  5926 
       
  5927    Collection of static dictionary words.
       
  5928 */
       
  5929 
       
  5930 					var data = require( './dictionary-browser' );
       
  5931 					exports.init = function () {
       
  5932 						exports.dictionary = data.init();
       
  5933 					};
       
  5934 
       
  5935 					exports.offsetsByLength = new Uint32Array( [
       
  5936 						0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, 53248,
       
  5937 						63488, 74752, 87040, 93696, 100864, 104704, 106752,
       
  5938 						108928, 113536, 115968, 118528, 119872, 121280, 122016,
       
  5939 					] );
       
  5940 
       
  5941 					exports.sizeBitsByLength = new Uint8Array( [
       
  5942 						0, 0, 0, 0, 10, 10, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8,
       
  5943 						7, 7, 8, 7, 7, 6, 6, 5, 5,
       
  5944 					] );
       
  5945 
       
  5946 					exports.minDictionaryWordLength = 4;
       
  5947 					exports.maxDictionaryWordLength = 24;
       
  5948 				},
       
  5949 				{ './dictionary-browser': 4 },
       
  5950 			],
       
  5951 			7: [
       
  5952 				function ( require, module, exports ) {
       
  5953 					function HuffmanCode( bits, value ) {
       
  5954 						this.bits =
       
  5955 							bits; /* number of bits used for this symbol */
       
  5956 						this.value = value; /* symbol value or table offset */
       
  5957 					}
       
  5958 
       
  5959 					exports.HuffmanCode = HuffmanCode;
       
  5960 
       
  5961 					var MAX_LENGTH = 15;
       
  5962 
       
  5963 					/* Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the
       
  5964    bit-wise reversal of the len least significant bits of key. */
       
  5965 					function GetNextKey( key, len ) {
       
  5966 						var step = 1 << ( len - 1 );
       
  5967 						while ( key & step ) {
       
  5968 							step >>= 1;
       
  5969 						}
       
  5970 						return ( key & ( step - 1 ) ) + step;
       
  5971 					}
       
  5972 
       
  5973 					/* Stores code in table[0], table[step], table[2*step], ..., table[end] */
       
  5974 					/* Assumes that end is an integer multiple of step */
       
  5975 					function ReplicateValue( table, i, step, end, code ) {
       
  5976 						do {
       
  5977 							end -= step;
       
  5978 							table[ i + end ] = new HuffmanCode(
       
  5979 								code.bits,
       
  5980 								code.value
       
  5981 							);
       
  5982 						} while ( end > 0 );
       
  5983 					}
       
  5984 
       
  5985 					/* Returns the table width of the next 2nd level table. count is the histogram
       
  5986    of bit lengths for the remaining symbols, len is the code length of the next
       
  5987    processed symbol */
       
  5988 					function NextTableBitSize( count, len, root_bits ) {
       
  5989 						var left = 1 << ( len - root_bits );
       
  5990 						while ( len < MAX_LENGTH ) {
       
  5991 							left -= count[ len ];
       
  5992 							if ( left <= 0 ) break;
       
  5993 							++len;
       
  5994 							left <<= 1;
       
  5995 						}
       
  5996 						return len - root_bits;
       
  5997 					}
       
  5998 
       
  5999 					exports.BrotliBuildHuffmanTable = function (
       
  6000 						root_table,
       
  6001 						table,
       
  6002 						root_bits,
       
  6003 						code_lengths,
       
  6004 						code_lengths_size
       
  6005 					) {
       
  6006 						var start_table = table;
       
  6007 						var code; /* current table entry */
       
  6008 						var len; /* current code length */
       
  6009 						var symbol; /* symbol index in original or sorted table */
       
  6010 						var key; /* reversed prefix code */
       
  6011 						var step; /* step size to replicate values in current table */
       
  6012 						var low; /* low bits for current root entry */
       
  6013 						var mask; /* mask for low bits */
       
  6014 						var table_bits; /* key length of current table */
       
  6015 						var table_size; /* size of current table */
       
  6016 						var total_size; /* sum of root table size and 2nd level table sizes */
       
  6017 						var sorted; /* symbols sorted by code length */
       
  6018 						var count = new Int32Array(
       
  6019 							MAX_LENGTH + 1
       
  6020 						); /* number of codes of each length */
       
  6021 						var offset = new Int32Array(
       
  6022 							MAX_LENGTH + 1
       
  6023 						); /* offsets in sorted table for each length */
       
  6024 
       
  6025 						sorted = new Int32Array( code_lengths_size );
       
  6026 
       
  6027 						/* build histogram of code lengths */
       
  6028 						for (
       
  6029 							symbol = 0;
       
  6030 							symbol < code_lengths_size;
       
  6031 							symbol++
       
  6032 						) {
       
  6033 							count[ code_lengths[ symbol ] ]++;
       
  6034 						}
       
  6035 
       
  6036 						/* generate offsets into sorted symbol table by code length */
       
  6037 						offset[ 1 ] = 0;
       
  6038 						for ( len = 1; len < MAX_LENGTH; len++ ) {
       
  6039 							offset[ len + 1 ] = offset[ len ] + count[ len ];
       
  6040 						}
       
  6041 
       
  6042 						/* sort symbols by length, by symbol order within each length */
       
  6043 						for (
       
  6044 							symbol = 0;
       
  6045 							symbol < code_lengths_size;
       
  6046 							symbol++
       
  6047 						) {
       
  6048 							if ( code_lengths[ symbol ] !== 0 ) {
       
  6049 								sorted[ offset[ code_lengths[ symbol ] ]++ ] =
       
  6050 									symbol;
       
  6051 							}
       
  6052 						}
       
  6053 
       
  6054 						table_bits = root_bits;
       
  6055 						table_size = 1 << table_bits;
       
  6056 						total_size = table_size;
       
  6057 
       
  6058 						/* special case code with only one value */
       
  6059 						if ( offset[ MAX_LENGTH ] === 1 ) {
       
  6060 							for ( key = 0; key < total_size; ++key ) {
       
  6061 								root_table[ table + key ] = new HuffmanCode(
       
  6062 									0,
       
  6063 									sorted[ 0 ] & 0xffff
       
  6064 								);
       
  6065 							}
       
  6066 
       
  6067 							return total_size;
       
  6068 						}
       
  6069 
       
  6070 						/* fill in root table */
       
  6071 						key = 0;
       
  6072 						symbol = 0;
       
  6073 						for (
       
  6074 							len = 1, step = 2;
       
  6075 							len <= root_bits;
       
  6076 							++len, step <<= 1
       
  6077 						) {
       
  6078 							for ( ; count[ len ] > 0; --count[ len ] ) {
       
  6079 								code = new HuffmanCode(
       
  6080 									len & 0xff,
       
  6081 									sorted[ symbol++ ] & 0xffff
       
  6082 								);
       
  6083 								ReplicateValue(
       
  6084 									root_table,
       
  6085 									table + key,
       
  6086 									step,
       
  6087 									table_size,
       
  6088 									code
       
  6089 								);
       
  6090 								key = GetNextKey( key, len );
       
  6091 							}
       
  6092 						}
       
  6093 
       
  6094 						/* fill in 2nd level tables and add pointers to root table */
       
  6095 						mask = total_size - 1;
       
  6096 						low = -1;
       
  6097 						for (
       
  6098 							len = root_bits + 1, step = 2;
       
  6099 							len <= MAX_LENGTH;
       
  6100 							++len, step <<= 1
       
  6101 						) {
       
  6102 							for ( ; count[ len ] > 0; --count[ len ] ) {
       
  6103 								if ( ( key & mask ) !== low ) {
       
  6104 									table += table_size;
       
  6105 									table_bits = NextTableBitSize(
       
  6106 										count,
       
  6107 										len,
       
  6108 										root_bits
       
  6109 									);
       
  6110 									table_size = 1 << table_bits;
       
  6111 									total_size += table_size;
       
  6112 									low = key & mask;
       
  6113 									root_table[ start_table + low ] =
       
  6114 										new HuffmanCode(
       
  6115 											( table_bits + root_bits ) & 0xff,
       
  6116 											( table - start_table - low ) &
       
  6117 												0xffff
       
  6118 										);
       
  6119 								}
       
  6120 								code = new HuffmanCode(
       
  6121 									( len - root_bits ) & 0xff,
       
  6122 									sorted[ symbol++ ] & 0xffff
       
  6123 								);
       
  6124 								ReplicateValue(
       
  6125 									root_table,
       
  6126 									table + ( key >> root_bits ),
       
  6127 									step,
       
  6128 									table_size,
       
  6129 									code
       
  6130 								);
       
  6131 								key = GetNextKey( key, len );
       
  6132 							}
       
  6133 						}
       
  6134 
       
  6135 						return total_size;
       
  6136 					};
       
  6137 				},
       
  6138 				{},
       
  6139 			],
       
  6140 			8: [
       
  6141 				function ( require, module, exports ) {
       
  6142 					'use strict';
       
  6143 
       
  6144 					exports.byteLength = byteLength;
       
  6145 					exports.toByteArray = toByteArray;
       
  6146 					exports.fromByteArray = fromByteArray;
       
  6147 
       
  6148 					var lookup = [];
       
  6149 					var revLookup = [];
       
  6150 					var Arr =
       
  6151 						typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
       
  6152 
       
  6153 					var code =
       
  6154 						'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
       
  6155 					for ( var i = 0, len = code.length; i < len; ++i ) {
       
  6156 						lookup[ i ] = code[ i ];
       
  6157 						revLookup[ code.charCodeAt( i ) ] = i;
       
  6158 					}
       
  6159 
       
  6160 					// Support decoding URL-safe base64 strings, as Node.js does.
       
  6161 					// See: https://en.wikipedia.org/wiki/Base64#URL_applications
       
  6162 					revLookup[ '-'.charCodeAt( 0 ) ] = 62;
       
  6163 					revLookup[ '_'.charCodeAt( 0 ) ] = 63;
       
  6164 
       
  6165 					function getLens( b64 ) {
       
  6166 						var len = b64.length;
       
  6167 
       
  6168 						if ( len % 4 > 0 ) {
       
  6169 							throw new Error(
       
  6170 								'Invalid string. Length must be a multiple of 4'
       
  6171 							);
       
  6172 						}
       
  6173 
       
  6174 						// Trim off extra bytes after placeholder bytes are found
       
  6175 						// See: https://github.com/beatgammit/base64-js/issues/42
       
  6176 						var validLen = b64.indexOf( '=' );
       
  6177 						if ( validLen === -1 ) validLen = len;
       
  6178 
       
  6179 						var placeHoldersLen =
       
  6180 							validLen === len ? 0 : 4 - ( validLen % 4 );
       
  6181 
       
  6182 						return [ validLen, placeHoldersLen ];
       
  6183 					}
       
  6184 
       
  6185 					// base64 is 4/3 + up to two characters of the original data
       
  6186 					function byteLength( b64 ) {
       
  6187 						var lens = getLens( b64 );
       
  6188 						var validLen = lens[ 0 ];
       
  6189 						var placeHoldersLen = lens[ 1 ];
       
  6190 						return (
       
  6191 							( ( validLen + placeHoldersLen ) * 3 ) / 4 -
       
  6192 							placeHoldersLen
       
  6193 						);
       
  6194 					}
       
  6195 
       
  6196 					function _byteLength( b64, validLen, placeHoldersLen ) {
       
  6197 						return (
       
  6198 							( ( validLen + placeHoldersLen ) * 3 ) / 4 -
       
  6199 							placeHoldersLen
       
  6200 						);
       
  6201 					}
       
  6202 
       
  6203 					function toByteArray( b64 ) {
       
  6204 						var tmp;
       
  6205 						var lens = getLens( b64 );
       
  6206 						var validLen = lens[ 0 ];
       
  6207 						var placeHoldersLen = lens[ 1 ];
       
  6208 
       
  6209 						var arr = new Arr(
       
  6210 							_byteLength( b64, validLen, placeHoldersLen )
       
  6211 						);
       
  6212 
       
  6213 						var curByte = 0;
       
  6214 
       
  6215 						// if there are placeholders, only get up to the last complete 4 chars
       
  6216 						var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
       
  6217 
       
  6218 						for ( var i = 0; i < len; i += 4 ) {
       
  6219 							tmp =
       
  6220 								( revLookup[ b64.charCodeAt( i ) ] << 18 ) |
       
  6221 								( revLookup[ b64.charCodeAt( i + 1 ) ] << 12 ) |
       
  6222 								( revLookup[ b64.charCodeAt( i + 2 ) ] << 6 ) |
       
  6223 								revLookup[ b64.charCodeAt( i + 3 ) ];
       
  6224 							arr[ curByte++ ] = ( tmp >> 16 ) & 0xff;
       
  6225 							arr[ curByte++ ] = ( tmp >> 8 ) & 0xff;
       
  6226 							arr[ curByte++ ] = tmp & 0xff;
       
  6227 						}
       
  6228 
       
  6229 						if ( placeHoldersLen === 2 ) {
       
  6230 							tmp =
       
  6231 								( revLookup[ b64.charCodeAt( i ) ] << 2 ) |
       
  6232 								( revLookup[ b64.charCodeAt( i + 1 ) ] >> 4 );
       
  6233 							arr[ curByte++ ] = tmp & 0xff;
       
  6234 						}
       
  6235 
       
  6236 						if ( placeHoldersLen === 1 ) {
       
  6237 							tmp =
       
  6238 								( revLookup[ b64.charCodeAt( i ) ] << 10 ) |
       
  6239 								( revLookup[ b64.charCodeAt( i + 1 ) ] << 4 ) |
       
  6240 								( revLookup[ b64.charCodeAt( i + 2 ) ] >> 2 );
       
  6241 							arr[ curByte++ ] = ( tmp >> 8 ) & 0xff;
       
  6242 							arr[ curByte++ ] = tmp & 0xff;
       
  6243 						}
       
  6244 
       
  6245 						return arr;
       
  6246 					}
       
  6247 
       
  6248 					function tripletToBase64( num ) {
       
  6249 						return (
       
  6250 							lookup[ ( num >> 18 ) & 0x3f ] +
       
  6251 							lookup[ ( num >> 12 ) & 0x3f ] +
       
  6252 							lookup[ ( num >> 6 ) & 0x3f ] +
       
  6253 							lookup[ num & 0x3f ]
       
  6254 						);
       
  6255 					}
       
  6256 
       
  6257 					function encodeChunk( uint8, start, end ) {
       
  6258 						var tmp;
       
  6259 						var output = [];
       
  6260 						for ( var i = start; i < end; i += 3 ) {
       
  6261 							tmp =
       
  6262 								( ( uint8[ i ] << 16 ) & 0xff0000 ) +
       
  6263 								( ( uint8[ i + 1 ] << 8 ) & 0xff00 ) +
       
  6264 								( uint8[ i + 2 ] & 0xff );
       
  6265 							output.push( tripletToBase64( tmp ) );
       
  6266 						}
       
  6267 						return output.join( '' );
       
  6268 					}
       
  6269 
       
  6270 					function fromByteArray( uint8 ) {
       
  6271 						var tmp;
       
  6272 						var len = uint8.length;
       
  6273 						var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
       
  6274 						var parts = [];
       
  6275 						var maxChunkLength = 16383; // must be multiple of 3
       
  6276 
       
  6277 						// go through the array every three bytes, we'll deal with trailing stuff later
       
  6278 						for (
       
  6279 							var i = 0, len2 = len - extraBytes;
       
  6280 							i < len2;
       
  6281 							i += maxChunkLength
       
  6282 						) {
       
  6283 							parts.push(
       
  6284 								encodeChunk(
       
  6285 									uint8,
       
  6286 									i,
       
  6287 									i + maxChunkLength > len2
       
  6288 										? len2
       
  6289 										: i + maxChunkLength
       
  6290 								)
       
  6291 							);
       
  6292 						}
       
  6293 
       
  6294 						// pad the end with zeros, but make sure to not forget the extra bytes
       
  6295 						if ( extraBytes === 1 ) {
       
  6296 							tmp = uint8[ len - 1 ];
       
  6297 							parts.push(
       
  6298 								lookup[ tmp >> 2 ] +
       
  6299 									lookup[ ( tmp << 4 ) & 0x3f ] +
       
  6300 									'=='
       
  6301 							);
       
  6302 						} else if ( extraBytes === 2 ) {
       
  6303 							tmp = ( uint8[ len - 2 ] << 8 ) + uint8[ len - 1 ];
       
  6304 							parts.push(
       
  6305 								lookup[ tmp >> 10 ] +
       
  6306 									lookup[ ( tmp >> 4 ) & 0x3f ] +
       
  6307 									lookup[ ( tmp << 2 ) & 0x3f ] +
       
  6308 									'='
       
  6309 							);
       
  6310 						}
       
  6311 
       
  6312 						return parts.join( '' );
       
  6313 					}
       
  6314 				},
       
  6315 				{},
       
  6316 			],
       
  6317 			9: [
       
  6318 				function ( require, module, exports ) {
       
  6319 					/* Copyright 2013 Google Inc. All Rights Reserved.
       
  6320 
       
  6321    Licensed under the Apache License, Version 2.0 (the "License");
       
  6322    you may not use this file except in compliance with the License.
       
  6323    You may obtain a copy of the License at
       
  6324 
       
  6325    http://www.apache.org/licenses/LICENSE-2.0
       
  6326 
       
  6327    Unless required by applicable law or agreed to in writing, software
       
  6328    distributed under the License is distributed on an "AS IS" BASIS,
       
  6329    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
  6330    See the License for the specific language governing permissions and
       
  6331    limitations under the License.
       
  6332 
       
  6333    Lookup tables to map prefix codes to value ranges. This is used during
       
  6334    decoding of the block lengths, literal insertion lengths and copy lengths.
       
  6335 */
       
  6336 
       
  6337 					/* Represents the range of values belonging to a prefix code: */
       
  6338 					/* [offset, offset + 2^nbits) */
       
  6339 					function PrefixCodeRange( offset, nbits ) {
       
  6340 						this.offset = offset;
       
  6341 						this.nbits = nbits;
       
  6342 					}
       
  6343 
       
  6344 					exports.kBlockLengthPrefixCode = [
       
  6345 						new PrefixCodeRange( 1, 2 ),
       
  6346 						new PrefixCodeRange( 5, 2 ),
       
  6347 						new PrefixCodeRange( 9, 2 ),
       
  6348 						new PrefixCodeRange( 13, 2 ),
       
  6349 						new PrefixCodeRange( 17, 3 ),
       
  6350 						new PrefixCodeRange( 25, 3 ),
       
  6351 						new PrefixCodeRange( 33, 3 ),
       
  6352 						new PrefixCodeRange( 41, 3 ),
       
  6353 						new PrefixCodeRange( 49, 4 ),
       
  6354 						new PrefixCodeRange( 65, 4 ),
       
  6355 						new PrefixCodeRange( 81, 4 ),
       
  6356 						new PrefixCodeRange( 97, 4 ),
       
  6357 						new PrefixCodeRange( 113, 5 ),
       
  6358 						new PrefixCodeRange( 145, 5 ),
       
  6359 						new PrefixCodeRange( 177, 5 ),
       
  6360 						new PrefixCodeRange( 209, 5 ),
       
  6361 						new PrefixCodeRange( 241, 6 ),
       
  6362 						new PrefixCodeRange( 305, 6 ),
       
  6363 						new PrefixCodeRange( 369, 7 ),
       
  6364 						new PrefixCodeRange( 497, 8 ),
       
  6365 						new PrefixCodeRange( 753, 9 ),
       
  6366 						new PrefixCodeRange( 1265, 10 ),
       
  6367 						new PrefixCodeRange( 2289, 11 ),
       
  6368 						new PrefixCodeRange( 4337, 12 ),
       
  6369 						new PrefixCodeRange( 8433, 13 ),
       
  6370 						new PrefixCodeRange( 16625, 24 ),
       
  6371 					];
       
  6372 
       
  6373 					exports.kInsertLengthPrefixCode = [
       
  6374 						new PrefixCodeRange( 0, 0 ),
       
  6375 						new PrefixCodeRange( 1, 0 ),
       
  6376 						new PrefixCodeRange( 2, 0 ),
       
  6377 						new PrefixCodeRange( 3, 0 ),
       
  6378 						new PrefixCodeRange( 4, 0 ),
       
  6379 						new PrefixCodeRange( 5, 0 ),
       
  6380 						new PrefixCodeRange( 6, 1 ),
       
  6381 						new PrefixCodeRange( 8, 1 ),
       
  6382 						new PrefixCodeRange( 10, 2 ),
       
  6383 						new PrefixCodeRange( 14, 2 ),
       
  6384 						new PrefixCodeRange( 18, 3 ),
       
  6385 						new PrefixCodeRange( 26, 3 ),
       
  6386 						new PrefixCodeRange( 34, 4 ),
       
  6387 						new PrefixCodeRange( 50, 4 ),
       
  6388 						new PrefixCodeRange( 66, 5 ),
       
  6389 						new PrefixCodeRange( 98, 5 ),
       
  6390 						new PrefixCodeRange( 130, 6 ),
       
  6391 						new PrefixCodeRange( 194, 7 ),
       
  6392 						new PrefixCodeRange( 322, 8 ),
       
  6393 						new PrefixCodeRange( 578, 9 ),
       
  6394 						new PrefixCodeRange( 1090, 10 ),
       
  6395 						new PrefixCodeRange( 2114, 12 ),
       
  6396 						new PrefixCodeRange( 6210, 14 ),
       
  6397 						new PrefixCodeRange( 22594, 24 ),
       
  6398 					];
       
  6399 
       
  6400 					exports.kCopyLengthPrefixCode = [
       
  6401 						new PrefixCodeRange( 2, 0 ),
       
  6402 						new PrefixCodeRange( 3, 0 ),
       
  6403 						new PrefixCodeRange( 4, 0 ),
       
  6404 						new PrefixCodeRange( 5, 0 ),
       
  6405 						new PrefixCodeRange( 6, 0 ),
       
  6406 						new PrefixCodeRange( 7, 0 ),
       
  6407 						new PrefixCodeRange( 8, 0 ),
       
  6408 						new PrefixCodeRange( 9, 0 ),
       
  6409 						new PrefixCodeRange( 10, 1 ),
       
  6410 						new PrefixCodeRange( 12, 1 ),
       
  6411 						new PrefixCodeRange( 14, 2 ),
       
  6412 						new PrefixCodeRange( 18, 2 ),
       
  6413 						new PrefixCodeRange( 22, 3 ),
       
  6414 						new PrefixCodeRange( 30, 3 ),
       
  6415 						new PrefixCodeRange( 38, 4 ),
       
  6416 						new PrefixCodeRange( 54, 4 ),
       
  6417 						new PrefixCodeRange( 70, 5 ),
       
  6418 						new PrefixCodeRange( 102, 5 ),
       
  6419 						new PrefixCodeRange( 134, 6 ),
       
  6420 						new PrefixCodeRange( 198, 7 ),
       
  6421 						new PrefixCodeRange( 326, 8 ),
       
  6422 						new PrefixCodeRange( 582, 9 ),
       
  6423 						new PrefixCodeRange( 1094, 10 ),
       
  6424 						new PrefixCodeRange( 2118, 24 ),
       
  6425 					];
       
  6426 
       
  6427 					exports.kInsertRangeLut = [ 0, 0, 8, 8, 0, 16, 8, 16, 16 ];
       
  6428 
       
  6429 					exports.kCopyRangeLut = [ 0, 8, 0, 8, 16, 0, 16, 8, 16 ];
       
  6430 				},
       
  6431 				{},
       
  6432 			],
       
  6433 			10: [
       
  6434 				function ( require, module, exports ) {
       
  6435 					function BrotliInput( buffer ) {
       
  6436 						this.buffer = buffer;
       
  6437 						this.pos = 0;
       
  6438 					}
       
  6439 
       
  6440 					BrotliInput.prototype.read = function ( buf, i, count ) {
       
  6441 						if ( this.pos + count > this.buffer.length ) {
       
  6442 							count = this.buffer.length - this.pos;
       
  6443 						}
       
  6444 
       
  6445 						for ( var p = 0; p < count; p++ )
       
  6446 							buf[ i + p ] = this.buffer[ this.pos + p ];
       
  6447 
       
  6448 						this.pos += count;
       
  6449 						return count;
       
  6450 					};
       
  6451 
       
  6452 					exports.BrotliInput = BrotliInput;
       
  6453 
       
  6454 					function BrotliOutput( buf ) {
       
  6455 						this.buffer = buf;
       
  6456 						this.pos = 0;
       
  6457 					}
       
  6458 
       
  6459 					BrotliOutput.prototype.write = function ( buf, count ) {
       
  6460 						if ( this.pos + count > this.buffer.length )
       
  6461 							throw new Error(
       
  6462 								'Output buffer is not large enough'
       
  6463 							);
       
  6464 
       
  6465 						this.buffer.set( buf.subarray( 0, count ), this.pos );
       
  6466 						this.pos += count;
       
  6467 						return count;
       
  6468 					};
       
  6469 
       
  6470 					exports.BrotliOutput = BrotliOutput;
       
  6471 				},
       
  6472 				{},
       
  6473 			],
       
  6474 			11: [
       
  6475 				function ( require, module, exports ) {
       
  6476 					/* Copyright 2013 Google Inc. All Rights Reserved.
       
  6477 
       
  6478    Licensed under the Apache License, Version 2.0 (the "License");
       
  6479    you may not use this file except in compliance with the License.
       
  6480    You may obtain a copy of the License at
       
  6481 
       
  6482    http://www.apache.org/licenses/LICENSE-2.0
       
  6483 
       
  6484    Unless required by applicable law or agreed to in writing, software
       
  6485    distributed under the License is distributed on an "AS IS" BASIS,
       
  6486    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
  6487    See the License for the specific language governing permissions and
       
  6488    limitations under the License.
       
  6489 
       
  6490    Transformations on dictionary words.
       
  6491 */
       
  6492 
       
  6493 					var BrotliDictionary = require( './dictionary' );
       
  6494 
       
  6495 					var kIdentity = 0;
       
  6496 					var kOmitLast1 = 1;
       
  6497 					var kOmitLast2 = 2;
       
  6498 					var kOmitLast3 = 3;
       
  6499 					var kOmitLast4 = 4;
       
  6500 					var kOmitLast5 = 5;
       
  6501 					var kOmitLast6 = 6;
       
  6502 					var kOmitLast7 = 7;
       
  6503 					var kOmitLast8 = 8;
       
  6504 					var kOmitLast9 = 9;
       
  6505 					var kUppercaseFirst = 10;
       
  6506 					var kUppercaseAll = 11;
       
  6507 					var kOmitFirst1 = 12;
       
  6508 					var kOmitFirst2 = 13;
       
  6509 					var kOmitFirst3 = 14;
       
  6510 					var kOmitFirst4 = 15;
       
  6511 					var kOmitFirst5 = 16;
       
  6512 					var kOmitFirst6 = 17;
       
  6513 					var kOmitFirst7 = 18;
       
  6514 					var kOmitFirst8 = 19;
       
  6515 					var kOmitFirst9 = 20;
       
  6516 
       
  6517 					function Transform( prefix, transform, suffix ) {
       
  6518 						this.prefix = new Uint8Array( prefix.length );
       
  6519 						this.transform = transform;
       
  6520 						this.suffix = new Uint8Array( suffix.length );
       
  6521 
       
  6522 						for ( var i = 0; i < prefix.length; i++ )
       
  6523 							this.prefix[ i ] = prefix.charCodeAt( i );
       
  6524 
       
  6525 						for ( var i = 0; i < suffix.length; i++ )
       
  6526 							this.suffix[ i ] = suffix.charCodeAt( i );
       
  6527 					}
       
  6528 
       
  6529 					var kTransforms = [
       
  6530 						new Transform( '', kIdentity, '' ),
       
  6531 						new Transform( '', kIdentity, ' ' ),
       
  6532 						new Transform( ' ', kIdentity, ' ' ),
       
  6533 						new Transform( '', kOmitFirst1, '' ),
       
  6534 						new Transform( '', kUppercaseFirst, ' ' ),
       
  6535 						new Transform( '', kIdentity, ' the ' ),
       
  6536 						new Transform( ' ', kIdentity, '' ),
       
  6537 						new Transform( 's ', kIdentity, ' ' ),
       
  6538 						new Transform( '', kIdentity, ' of ' ),
       
  6539 						new Transform( '', kUppercaseFirst, '' ),
       
  6540 						new Transform( '', kIdentity, ' and ' ),
       
  6541 						new Transform( '', kOmitFirst2, '' ),
       
  6542 						new Transform( '', kOmitLast1, '' ),
       
  6543 						new Transform( ', ', kIdentity, ' ' ),
       
  6544 						new Transform( '', kIdentity, ', ' ),
       
  6545 						new Transform( ' ', kUppercaseFirst, ' ' ),
       
  6546 						new Transform( '', kIdentity, ' in ' ),
       
  6547 						new Transform( '', kIdentity, ' to ' ),
       
  6548 						new Transform( 'e ', kIdentity, ' ' ),
       
  6549 						new Transform( '', kIdentity, '"' ),
       
  6550 						new Transform( '', kIdentity, '.' ),
       
  6551 						new Transform( '', kIdentity, '">' ),
       
  6552 						new Transform( '', kIdentity, '\n' ),
       
  6553 						new Transform( '', kOmitLast3, '' ),
       
  6554 						new Transform( '', kIdentity, ']' ),
       
  6555 						new Transform( '', kIdentity, ' for ' ),
       
  6556 						new Transform( '', kOmitFirst3, '' ),
       
  6557 						new Transform( '', kOmitLast2, '' ),
       
  6558 						new Transform( '', kIdentity, ' a ' ),
       
  6559 						new Transform( '', kIdentity, ' that ' ),
       
  6560 						new Transform( ' ', kUppercaseFirst, '' ),
       
  6561 						new Transform( '', kIdentity, '. ' ),
       
  6562 						new Transform( '.', kIdentity, '' ),
       
  6563 						new Transform( ' ', kIdentity, ', ' ),
       
  6564 						new Transform( '', kOmitFirst4, '' ),
       
  6565 						new Transform( '', kIdentity, ' with ' ),
       
  6566 						new Transform( '', kIdentity, "'" ),
       
  6567 						new Transform( '', kIdentity, ' from ' ),
       
  6568 						new Transform( '', kIdentity, ' by ' ),
       
  6569 						new Transform( '', kOmitFirst5, '' ),
       
  6570 						new Transform( '', kOmitFirst6, '' ),
       
  6571 						new Transform( ' the ', kIdentity, '' ),
       
  6572 						new Transform( '', kOmitLast4, '' ),
       
  6573 						new Transform( '', kIdentity, '. The ' ),
       
  6574 						new Transform( '', kUppercaseAll, '' ),
       
  6575 						new Transform( '', kIdentity, ' on ' ),
       
  6576 						new Transform( '', kIdentity, ' as ' ),
       
  6577 						new Transform( '', kIdentity, ' is ' ),
       
  6578 						new Transform( '', kOmitLast7, '' ),
       
  6579 						new Transform( '', kOmitLast1, 'ing ' ),
       
  6580 						new Transform( '', kIdentity, '\n\t' ),
       
  6581 						new Transform( '', kIdentity, ':' ),
       
  6582 						new Transform( ' ', kIdentity, '. ' ),
       
  6583 						new Transform( '', kIdentity, 'ed ' ),
       
  6584 						new Transform( '', kOmitFirst9, '' ),
       
  6585 						new Transform( '', kOmitFirst7, '' ),
       
  6586 						new Transform( '', kOmitLast6, '' ),
       
  6587 						new Transform( '', kIdentity, '(' ),
       
  6588 						new Transform( '', kUppercaseFirst, ', ' ),
       
  6589 						new Transform( '', kOmitLast8, '' ),
       
  6590 						new Transform( '', kIdentity, ' at ' ),
       
  6591 						new Transform( '', kIdentity, 'ly ' ),
       
  6592 						new Transform( ' the ', kIdentity, ' of ' ),
       
  6593 						new Transform( '', kOmitLast5, '' ),
       
  6594 						new Transform( '', kOmitLast9, '' ),
       
  6595 						new Transform( ' ', kUppercaseFirst, ', ' ),
       
  6596 						new Transform( '', kUppercaseFirst, '"' ),
       
  6597 						new Transform( '.', kIdentity, '(' ),
       
  6598 						new Transform( '', kUppercaseAll, ' ' ),
       
  6599 						new Transform( '', kUppercaseFirst, '">' ),
       
  6600 						new Transform( '', kIdentity, '="' ),
       
  6601 						new Transform( ' ', kIdentity, '.' ),
       
  6602 						new Transform( '.com/', kIdentity, '' ),
       
  6603 						new Transform( ' the ', kIdentity, ' of the ' ),
       
  6604 						new Transform( '', kUppercaseFirst, "'" ),
       
  6605 						new Transform( '', kIdentity, '. This ' ),
       
  6606 						new Transform( '', kIdentity, ',' ),
       
  6607 						new Transform( '.', kIdentity, ' ' ),
       
  6608 						new Transform( '', kUppercaseFirst, '(' ),
       
  6609 						new Transform( '', kUppercaseFirst, '.' ),
       
  6610 						new Transform( '', kIdentity, ' not ' ),
       
  6611 						new Transform( ' ', kIdentity, '="' ),
       
  6612 						new Transform( '', kIdentity, 'er ' ),
       
  6613 						new Transform( ' ', kUppercaseAll, ' ' ),
       
  6614 						new Transform( '', kIdentity, 'al ' ),
       
  6615 						new Transform( ' ', kUppercaseAll, '' ),
       
  6616 						new Transform( '', kIdentity, "='" ),
       
  6617 						new Transform( '', kUppercaseAll, '"' ),
       
  6618 						new Transform( '', kUppercaseFirst, '. ' ),
       
  6619 						new Transform( ' ', kIdentity, '(' ),
       
  6620 						new Transform( '', kIdentity, 'ful ' ),
       
  6621 						new Transform( ' ', kUppercaseFirst, '. ' ),
       
  6622 						new Transform( '', kIdentity, 'ive ' ),
       
  6623 						new Transform( '', kIdentity, 'less ' ),
       
  6624 						new Transform( '', kUppercaseAll, "'" ),
       
  6625 						new Transform( '', kIdentity, 'est ' ),
       
  6626 						new Transform( ' ', kUppercaseFirst, '.' ),
       
  6627 						new Transform( '', kUppercaseAll, '">' ),
       
  6628 						new Transform( ' ', kIdentity, "='" ),
       
  6629 						new Transform( '', kUppercaseFirst, ',' ),
       
  6630 						new Transform( '', kIdentity, 'ize ' ),
       
  6631 						new Transform( '', kUppercaseAll, '.' ),
       
  6632 						new Transform( '\xc2\xa0', kIdentity, '' ),
       
  6633 						new Transform( ' ', kIdentity, ',' ),
       
  6634 						new Transform( '', kUppercaseFirst, '="' ),
       
  6635 						new Transform( '', kUppercaseAll, '="' ),
       
  6636 						new Transform( '', kIdentity, 'ous ' ),
       
  6637 						new Transform( '', kUppercaseAll, ', ' ),
       
  6638 						new Transform( '', kUppercaseFirst, "='" ),
       
  6639 						new Transform( ' ', kUppercaseFirst, ',' ),
       
  6640 						new Transform( ' ', kUppercaseAll, '="' ),
       
  6641 						new Transform( ' ', kUppercaseAll, ', ' ),
       
  6642 						new Transform( '', kUppercaseAll, ',' ),
       
  6643 						new Transform( '', kUppercaseAll, '(' ),
       
  6644 						new Transform( '', kUppercaseAll, '. ' ),
       
  6645 						new Transform( ' ', kUppercaseAll, '.' ),
       
  6646 						new Transform( '', kUppercaseAll, "='" ),
       
  6647 						new Transform( ' ', kUppercaseAll, '. ' ),
       
  6648 						new Transform( ' ', kUppercaseFirst, '="' ),
       
  6649 						new Transform( ' ', kUppercaseAll, "='" ),
       
  6650 						new Transform( ' ', kUppercaseFirst, "='" ),
       
  6651 					];
       
  6652 
       
  6653 					exports.kTransforms = kTransforms;
       
  6654 					exports.kNumTransforms = kTransforms.length;
       
  6655 
       
  6656 					function ToUpperCase( p, i ) {
       
  6657 						if ( p[ i ] < 0xc0 ) {
       
  6658 							if ( p[ i ] >= 97 && p[ i ] <= 122 ) {
       
  6659 								p[ i ] ^= 32;
       
  6660 							}
       
  6661 							return 1;
       
  6662 						}
       
  6663 
       
  6664 						/* An overly simplified uppercasing model for utf-8. */
       
  6665 						if ( p[ i ] < 0xe0 ) {
       
  6666 							p[ i + 1 ] ^= 32;
       
  6667 							return 2;
       
  6668 						}
       
  6669 
       
  6670 						/* An arbitrary transform for three byte characters. */
       
  6671 						p[ i + 2 ] ^= 5;
       
  6672 						return 3;
       
  6673 					}
       
  6674 
       
  6675 					exports.transformDictionaryWord = function (
       
  6676 						dst,
       
  6677 						idx,
       
  6678 						word,
       
  6679 						len,
       
  6680 						transform
       
  6681 					) {
       
  6682 						var prefix = kTransforms[ transform ].prefix;
       
  6683 						var suffix = kTransforms[ transform ].suffix;
       
  6684 						var t = kTransforms[ transform ].transform;
       
  6685 						var skip =
       
  6686 							t < kOmitFirst1 ? 0 : t - ( kOmitFirst1 - 1 );
       
  6687 						var i = 0;
       
  6688 						var start_idx = idx;
       
  6689 						var uppercase;
       
  6690 
       
  6691 						if ( skip > len ) {
       
  6692 							skip = len;
       
  6693 						}
       
  6694 
       
  6695 						var prefix_pos = 0;
       
  6696 						while ( prefix_pos < prefix.length ) {
       
  6697 							dst[ idx++ ] = prefix[ prefix_pos++ ];
       
  6698 						}
       
  6699 
       
  6700 						word += skip;
       
  6701 						len -= skip;
       
  6702 
       
  6703 						if ( t <= kOmitLast9 ) {
       
  6704 							len -= t;
       
  6705 						}
       
  6706 
       
  6707 						for ( i = 0; i < len; i++ ) {
       
  6708 							dst[ idx++ ] =
       
  6709 								BrotliDictionary.dictionary[ word + i ];
       
  6710 						}
       
  6711 
       
  6712 						uppercase = idx - len;
       
  6713 
       
  6714 						if ( t === kUppercaseFirst ) {
       
  6715 							ToUpperCase( dst, uppercase );
       
  6716 						} else if ( t === kUppercaseAll ) {
       
  6717 							while ( len > 0 ) {
       
  6718 								var step = ToUpperCase( dst, uppercase );
       
  6719 								uppercase += step;
       
  6720 								len -= step;
       
  6721 							}
       
  6722 						}
       
  6723 
       
  6724 						var suffix_pos = 0;
       
  6725 						while ( suffix_pos < suffix.length ) {
       
  6726 							dst[ idx++ ] = suffix[ suffix_pos++ ];
       
  6727 						}
       
  6728 
       
  6729 						return idx - start_idx;
       
  6730 					};
       
  6731 				},
       
  6732 				{ './dictionary': 6 },
       
  6733 			],
       
  6734 			12: [
       
  6735 				function ( require, module, exports ) {
       
  6736 					module.exports =
       
  6737 						require( './dec/decode' ).BrotliDecompressBuffer;
       
  6738 				},
       
  6739 				{ './dec/decode': 3 },
       
  6740 			],
       
  6741 		},
       
  6742 		{},
       
  6743 		[ 12 ]
       
  6744 	)( 12 );
       
  6745 } );
       
  6746 /* eslint-enable */
   353 
  6747 
   354 
  6748 
   355 /***/ }),
  6749 /***/ }),
   356 
  6750 
   357 /***/ 4827:
  6751 /***/ 9681:
   358 /***/ (function(module) {
  6752 /***/ ((module) => {
   359 
  6753 
   360 // This code has been refactored for 140 bytes
  6754 var characterMap = {
   361 // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
  6755 	"À": "A",
   362 var computedStyle = function (el, prop, getComputedStyle) {
  6756 	"Á": "A",
   363   getComputedStyle = window.getComputedStyle;
  6757 	"Â": "A",
   364 
  6758 	"Ã": "A",
   365   // In one fell swoop
  6759 	"Ä": "A",
   366   return (
  6760 	"Å": "A",
   367     // If we have getComputedStyle
  6761 	"Ấ": "A",
   368     getComputedStyle ?
  6762 	"Ắ": "A",
   369       // Query it
  6763 	"Ẳ": "A",
   370       // TODO: From CSS-Query notes, we might need (node, null) for FF
  6764 	"Ẵ": "A",
   371       getComputedStyle(el) :
  6765 	"Ặ": "A",
   372 
  6766 	"Æ": "AE",
   373     // Otherwise, we are in IE and use currentStyle
  6767 	"Ầ": "A",
   374       el.currentStyle
  6768 	"Ằ": "A",
   375   )[
  6769 	"Ȃ": "A",
   376     // Switch to camelCase for CSSOM
  6770 	"Ả": "A",
   377     // DEV: Grabbed from jQuery
  6771 	"Ạ": "A",
   378     // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
  6772 	"Ẩ": "A",
   379     // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
  6773 	"Ẫ": "A",
   380     prop.replace(/-(\w)/gi, function (word, letter) {
  6774 	"Ậ": "A",
   381       return letter.toUpperCase();
  6775 	"Ç": "C",
   382     })
  6776 	"Ḉ": "C",
   383   ];
  6777 	"È": "E",
       
  6778 	"É": "E",
       
  6779 	"Ê": "E",
       
  6780 	"Ë": "E",
       
  6781 	"Ế": "E",
       
  6782 	"Ḗ": "E",
       
  6783 	"Ề": "E",
       
  6784 	"Ḕ": "E",
       
  6785 	"Ḝ": "E",
       
  6786 	"Ȇ": "E",
       
  6787 	"Ẻ": "E",
       
  6788 	"Ẽ": "E",
       
  6789 	"Ẹ": "E",
       
  6790 	"Ể": "E",
       
  6791 	"Ễ": "E",
       
  6792 	"Ệ": "E",
       
  6793 	"Ì": "I",
       
  6794 	"Í": "I",
       
  6795 	"Î": "I",
       
  6796 	"Ï": "I",
       
  6797 	"Ḯ": "I",
       
  6798 	"Ȋ": "I",
       
  6799 	"Ỉ": "I",
       
  6800 	"Ị": "I",
       
  6801 	"Ð": "D",
       
  6802 	"Ñ": "N",
       
  6803 	"Ò": "O",
       
  6804 	"Ó": "O",
       
  6805 	"Ô": "O",
       
  6806 	"Õ": "O",
       
  6807 	"Ö": "O",
       
  6808 	"Ø": "O",
       
  6809 	"Ố": "O",
       
  6810 	"Ṍ": "O",
       
  6811 	"Ṓ": "O",
       
  6812 	"Ȏ": "O",
       
  6813 	"Ỏ": "O",
       
  6814 	"Ọ": "O",
       
  6815 	"Ổ": "O",
       
  6816 	"Ỗ": "O",
       
  6817 	"Ộ": "O",
       
  6818 	"Ờ": "O",
       
  6819 	"Ở": "O",
       
  6820 	"Ỡ": "O",
       
  6821 	"Ớ": "O",
       
  6822 	"Ợ": "O",
       
  6823 	"Ù": "U",
       
  6824 	"Ú": "U",
       
  6825 	"Û": "U",
       
  6826 	"Ü": "U",
       
  6827 	"Ủ": "U",
       
  6828 	"Ụ": "U",
       
  6829 	"Ử": "U",
       
  6830 	"Ữ": "U",
       
  6831 	"Ự": "U",
       
  6832 	"Ý": "Y",
       
  6833 	"à": "a",
       
  6834 	"á": "a",
       
  6835 	"â": "a",
       
  6836 	"ã": "a",
       
  6837 	"ä": "a",
       
  6838 	"å": "a",
       
  6839 	"ấ": "a",
       
  6840 	"ắ": "a",
       
  6841 	"ẳ": "a",
       
  6842 	"ẵ": "a",
       
  6843 	"ặ": "a",
       
  6844 	"æ": "ae",
       
  6845 	"ầ": "a",
       
  6846 	"ằ": "a",
       
  6847 	"ȃ": "a",
       
  6848 	"ả": "a",
       
  6849 	"ạ": "a",
       
  6850 	"ẩ": "a",
       
  6851 	"ẫ": "a",
       
  6852 	"ậ": "a",
       
  6853 	"ç": "c",
       
  6854 	"ḉ": "c",
       
  6855 	"è": "e",
       
  6856 	"é": "e",
       
  6857 	"ê": "e",
       
  6858 	"ë": "e",
       
  6859 	"ế": "e",
       
  6860 	"ḗ": "e",
       
  6861 	"ề": "e",
       
  6862 	"ḕ": "e",
       
  6863 	"ḝ": "e",
       
  6864 	"ȇ": "e",
       
  6865 	"ẻ": "e",
       
  6866 	"ẽ": "e",
       
  6867 	"ẹ": "e",
       
  6868 	"ể": "e",
       
  6869 	"ễ": "e",
       
  6870 	"ệ": "e",
       
  6871 	"ì": "i",
       
  6872 	"í": "i",
       
  6873 	"î": "i",
       
  6874 	"ï": "i",
       
  6875 	"ḯ": "i",
       
  6876 	"ȋ": "i",
       
  6877 	"ỉ": "i",
       
  6878 	"ị": "i",
       
  6879 	"ð": "d",
       
  6880 	"ñ": "n",
       
  6881 	"ò": "o",
       
  6882 	"ó": "o",
       
  6883 	"ô": "o",
       
  6884 	"õ": "o",
       
  6885 	"ö": "o",
       
  6886 	"ø": "o",
       
  6887 	"ố": "o",
       
  6888 	"ṍ": "o",
       
  6889 	"ṓ": "o",
       
  6890 	"ȏ": "o",
       
  6891 	"ỏ": "o",
       
  6892 	"ọ": "o",
       
  6893 	"ổ": "o",
       
  6894 	"ỗ": "o",
       
  6895 	"ộ": "o",
       
  6896 	"ờ": "o",
       
  6897 	"ở": "o",
       
  6898 	"ỡ": "o",
       
  6899 	"ớ": "o",
       
  6900 	"ợ": "o",
       
  6901 	"ù": "u",
       
  6902 	"ú": "u",
       
  6903 	"û": "u",
       
  6904 	"ü": "u",
       
  6905 	"ủ": "u",
       
  6906 	"ụ": "u",
       
  6907 	"ử": "u",
       
  6908 	"ữ": "u",
       
  6909 	"ự": "u",
       
  6910 	"ý": "y",
       
  6911 	"ÿ": "y",
       
  6912 	"Ā": "A",
       
  6913 	"ā": "a",
       
  6914 	"Ă": "A",
       
  6915 	"ă": "a",
       
  6916 	"Ą": "A",
       
  6917 	"ą": "a",
       
  6918 	"Ć": "C",
       
  6919 	"ć": "c",
       
  6920 	"Ĉ": "C",
       
  6921 	"ĉ": "c",
       
  6922 	"Ċ": "C",
       
  6923 	"ċ": "c",
       
  6924 	"Č": "C",
       
  6925 	"č": "c",
       
  6926 	"C̆": "C",
       
  6927 	"c̆": "c",
       
  6928 	"Ď": "D",
       
  6929 	"ď": "d",
       
  6930 	"Đ": "D",
       
  6931 	"đ": "d",
       
  6932 	"Ē": "E",
       
  6933 	"ē": "e",
       
  6934 	"Ĕ": "E",
       
  6935 	"ĕ": "e",
       
  6936 	"Ė": "E",
       
  6937 	"ė": "e",
       
  6938 	"Ę": "E",
       
  6939 	"ę": "e",
       
  6940 	"Ě": "E",
       
  6941 	"ě": "e",
       
  6942 	"Ĝ": "G",
       
  6943 	"Ǵ": "G",
       
  6944 	"ĝ": "g",
       
  6945 	"ǵ": "g",
       
  6946 	"Ğ": "G",
       
  6947 	"ğ": "g",
       
  6948 	"Ġ": "G",
       
  6949 	"ġ": "g",
       
  6950 	"Ģ": "G",
       
  6951 	"ģ": "g",
       
  6952 	"Ĥ": "H",
       
  6953 	"ĥ": "h",
       
  6954 	"Ħ": "H",
       
  6955 	"ħ": "h",
       
  6956 	"Ḫ": "H",
       
  6957 	"ḫ": "h",
       
  6958 	"Ĩ": "I",
       
  6959 	"ĩ": "i",
       
  6960 	"Ī": "I",
       
  6961 	"ī": "i",
       
  6962 	"Ĭ": "I",
       
  6963 	"ĭ": "i",
       
  6964 	"Į": "I",
       
  6965 	"į": "i",
       
  6966 	"İ": "I",
       
  6967 	"ı": "i",
       
  6968 	"IJ": "IJ",
       
  6969 	"ij": "ij",
       
  6970 	"Ĵ": "J",
       
  6971 	"ĵ": "j",
       
  6972 	"Ķ": "K",
       
  6973 	"ķ": "k",
       
  6974 	"Ḱ": "K",
       
  6975 	"ḱ": "k",
       
  6976 	"K̆": "K",
       
  6977 	"k̆": "k",
       
  6978 	"Ĺ": "L",
       
  6979 	"ĺ": "l",
       
  6980 	"Ļ": "L",
       
  6981 	"ļ": "l",
       
  6982 	"Ľ": "L",
       
  6983 	"ľ": "l",
       
  6984 	"Ŀ": "L",
       
  6985 	"ŀ": "l",
       
  6986 	"Ł": "l",
       
  6987 	"ł": "l",
       
  6988 	"Ḿ": "M",
       
  6989 	"ḿ": "m",
       
  6990 	"M̆": "M",
       
  6991 	"m̆": "m",
       
  6992 	"Ń": "N",
       
  6993 	"ń": "n",
       
  6994 	"Ņ": "N",
       
  6995 	"ņ": "n",
       
  6996 	"Ň": "N",
       
  6997 	"ň": "n",
       
  6998 	"ʼn": "n",
       
  6999 	"N̆": "N",
       
  7000 	"n̆": "n",
       
  7001 	"Ō": "O",
       
  7002 	"ō": "o",
       
  7003 	"Ŏ": "O",
       
  7004 	"ŏ": "o",
       
  7005 	"Ő": "O",
       
  7006 	"ő": "o",
       
  7007 	"Œ": "OE",
       
  7008 	"œ": "oe",
       
  7009 	"P̆": "P",
       
  7010 	"p̆": "p",
       
  7011 	"Ŕ": "R",
       
  7012 	"ŕ": "r",
       
  7013 	"Ŗ": "R",
       
  7014 	"ŗ": "r",
       
  7015 	"Ř": "R",
       
  7016 	"ř": "r",
       
  7017 	"R̆": "R",
       
  7018 	"r̆": "r",
       
  7019 	"Ȓ": "R",
       
  7020 	"ȓ": "r",
       
  7021 	"Ś": "S",
       
  7022 	"ś": "s",
       
  7023 	"Ŝ": "S",
       
  7024 	"ŝ": "s",
       
  7025 	"Ş": "S",
       
  7026 	"Ș": "S",
       
  7027 	"ș": "s",
       
  7028 	"ş": "s",
       
  7029 	"Š": "S",
       
  7030 	"š": "s",
       
  7031 	"Ţ": "T",
       
  7032 	"ţ": "t",
       
  7033 	"ț": "t",
       
  7034 	"Ț": "T",
       
  7035 	"Ť": "T",
       
  7036 	"ť": "t",
       
  7037 	"Ŧ": "T",
       
  7038 	"ŧ": "t",
       
  7039 	"T̆": "T",
       
  7040 	"t̆": "t",
       
  7041 	"Ũ": "U",
       
  7042 	"ũ": "u",
       
  7043 	"Ū": "U",
       
  7044 	"ū": "u",
       
  7045 	"Ŭ": "U",
       
  7046 	"ŭ": "u",
       
  7047 	"Ů": "U",
       
  7048 	"ů": "u",
       
  7049 	"Ű": "U",
       
  7050 	"ű": "u",
       
  7051 	"Ų": "U",
       
  7052 	"ų": "u",
       
  7053 	"Ȗ": "U",
       
  7054 	"ȗ": "u",
       
  7055 	"V̆": "V",
       
  7056 	"v̆": "v",
       
  7057 	"Ŵ": "W",
       
  7058 	"ŵ": "w",
       
  7059 	"Ẃ": "W",
       
  7060 	"ẃ": "w",
       
  7061 	"X̆": "X",
       
  7062 	"x̆": "x",
       
  7063 	"Ŷ": "Y",
       
  7064 	"ŷ": "y",
       
  7065 	"Ÿ": "Y",
       
  7066 	"Y̆": "Y",
       
  7067 	"y̆": "y",
       
  7068 	"Ź": "Z",
       
  7069 	"ź": "z",
       
  7070 	"Ż": "Z",
       
  7071 	"ż": "z",
       
  7072 	"Ž": "Z",
       
  7073 	"ž": "z",
       
  7074 	"ſ": "s",
       
  7075 	"ƒ": "f",
       
  7076 	"Ơ": "O",
       
  7077 	"ơ": "o",
       
  7078 	"Ư": "U",
       
  7079 	"ư": "u",
       
  7080 	"Ǎ": "A",
       
  7081 	"ǎ": "a",
       
  7082 	"Ǐ": "I",
       
  7083 	"ǐ": "i",
       
  7084 	"Ǒ": "O",
       
  7085 	"ǒ": "o",
       
  7086 	"Ǔ": "U",
       
  7087 	"ǔ": "u",
       
  7088 	"Ǖ": "U",
       
  7089 	"ǖ": "u",
       
  7090 	"Ǘ": "U",
       
  7091 	"ǘ": "u",
       
  7092 	"Ǚ": "U",
       
  7093 	"ǚ": "u",
       
  7094 	"Ǜ": "U",
       
  7095 	"ǜ": "u",
       
  7096 	"Ứ": "U",
       
  7097 	"ứ": "u",
       
  7098 	"Ṹ": "U",
       
  7099 	"ṹ": "u",
       
  7100 	"Ǻ": "A",
       
  7101 	"ǻ": "a",
       
  7102 	"Ǽ": "AE",
       
  7103 	"ǽ": "ae",
       
  7104 	"Ǿ": "O",
       
  7105 	"ǿ": "o",
       
  7106 	"Þ": "TH",
       
  7107 	"þ": "th",
       
  7108 	"Ṕ": "P",
       
  7109 	"ṕ": "p",
       
  7110 	"Ṥ": "S",
       
  7111 	"ṥ": "s",
       
  7112 	"X́": "X",
       
  7113 	"x́": "x",
       
  7114 	"Ѓ": "Г",
       
  7115 	"ѓ": "г",
       
  7116 	"Ќ": "К",
       
  7117 	"ќ": "к",
       
  7118 	"A̋": "A",
       
  7119 	"a̋": "a",
       
  7120 	"E̋": "E",
       
  7121 	"e̋": "e",
       
  7122 	"I̋": "I",
       
  7123 	"i̋": "i",
       
  7124 	"Ǹ": "N",
       
  7125 	"ǹ": "n",
       
  7126 	"Ồ": "O",
       
  7127 	"ồ": "o",
       
  7128 	"Ṑ": "O",
       
  7129 	"ṑ": "o",
       
  7130 	"Ừ": "U",
       
  7131 	"ừ": "u",
       
  7132 	"Ẁ": "W",
       
  7133 	"ẁ": "w",
       
  7134 	"Ỳ": "Y",
       
  7135 	"ỳ": "y",
       
  7136 	"Ȁ": "A",
       
  7137 	"ȁ": "a",
       
  7138 	"Ȅ": "E",
       
  7139 	"ȅ": "e",
       
  7140 	"Ȉ": "I",
       
  7141 	"ȉ": "i",
       
  7142 	"Ȍ": "O",
       
  7143 	"ȍ": "o",
       
  7144 	"Ȑ": "R",
       
  7145 	"ȑ": "r",
       
  7146 	"Ȕ": "U",
       
  7147 	"ȕ": "u",
       
  7148 	"B̌": "B",
       
  7149 	"b̌": "b",
       
  7150 	"Č̣": "C",
       
  7151 	"č̣": "c",
       
  7152 	"Ê̌": "E",
       
  7153 	"ê̌": "e",
       
  7154 	"F̌": "F",
       
  7155 	"f̌": "f",
       
  7156 	"Ǧ": "G",
       
  7157 	"ǧ": "g",
       
  7158 	"Ȟ": "H",
       
  7159 	"ȟ": "h",
       
  7160 	"J̌": "J",
       
  7161 	"ǰ": "j",
       
  7162 	"Ǩ": "K",
       
  7163 	"ǩ": "k",
       
  7164 	"M̌": "M",
       
  7165 	"m̌": "m",
       
  7166 	"P̌": "P",
       
  7167 	"p̌": "p",
       
  7168 	"Q̌": "Q",
       
  7169 	"q̌": "q",
       
  7170 	"Ř̩": "R",
       
  7171 	"ř̩": "r",
       
  7172 	"Ṧ": "S",
       
  7173 	"ṧ": "s",
       
  7174 	"V̌": "V",
       
  7175 	"v̌": "v",
       
  7176 	"W̌": "W",
       
  7177 	"w̌": "w",
       
  7178 	"X̌": "X",
       
  7179 	"x̌": "x",
       
  7180 	"Y̌": "Y",
       
  7181 	"y̌": "y",
       
  7182 	"A̧": "A",
       
  7183 	"a̧": "a",
       
  7184 	"B̧": "B",
       
  7185 	"b̧": "b",
       
  7186 	"Ḑ": "D",
       
  7187 	"ḑ": "d",
       
  7188 	"Ȩ": "E",
       
  7189 	"ȩ": "e",
       
  7190 	"Ɛ̧": "E",
       
  7191 	"ɛ̧": "e",
       
  7192 	"Ḩ": "H",
       
  7193 	"ḩ": "h",
       
  7194 	"I̧": "I",
       
  7195 	"i̧": "i",
       
  7196 	"Ɨ̧": "I",
       
  7197 	"ɨ̧": "i",
       
  7198 	"M̧": "M",
       
  7199 	"m̧": "m",
       
  7200 	"O̧": "O",
       
  7201 	"o̧": "o",
       
  7202 	"Q̧": "Q",
       
  7203 	"q̧": "q",
       
  7204 	"U̧": "U",
       
  7205 	"u̧": "u",
       
  7206 	"X̧": "X",
       
  7207 	"x̧": "x",
       
  7208 	"Z̧": "Z",
       
  7209 	"z̧": "z",
       
  7210 	"й":"и",
       
  7211 	"Й":"И",
       
  7212 	"ё":"е",
       
  7213 	"Ё":"Е",
   384 };
  7214 };
   385 
  7215 
   386 module.exports = computedStyle;
  7216 var chars = Object.keys(characterMap).join('|');
       
  7217 var allAccents = new RegExp(chars, 'g');
       
  7218 var firstAccent = new RegExp(chars, '');
       
  7219 
       
  7220 function matcher(match) {
       
  7221 	return characterMap[match];
       
  7222 }
       
  7223 
       
  7224 var removeAccents = function(string) {
       
  7225 	return string.replace(allAccents, matcher);
       
  7226 };
       
  7227 
       
  7228 var hasAccents = function(string) {
       
  7229 	return !!string.match(firstAccent);
       
  7230 };
       
  7231 
       
  7232 module.exports = removeAccents;
       
  7233 module.exports.has = hasAccents;
       
  7234 module.exports.remove = removeAccents;
   387 
  7235 
   388 
  7236 
   389 /***/ }),
  7237 /***/ }),
   390 
  7238 
   391 /***/ 8981:
  7239 /***/ 8477:
   392 /***/ (function(module, exports) {
  7240 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
   393 
       
   394 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage
       
   395 // v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
       
   396 // v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs
       
   397 // v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.
       
   398 // v4 adds AMD/UMD, commonJS, and plain browser support
       
   399 // v4.1 adds url download capability via solo URL argument (same domain/CORS only)
       
   400 // v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors
       
   401 // https://github.com/rndme/download
       
   402 
       
   403 (function (root, factory) {
       
   404 	if (true) {
       
   405 		// AMD. Register as an anonymous module.
       
   406 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
       
   407 		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
       
   408 		(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
       
   409 		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
       
   410 	} else {}
       
   411 }(this, function () {
       
   412 
       
   413 	return function download(data, strFileName, strMimeType) {
       
   414 
       
   415 		var self = window, // this script is only for browsers anyway...
       
   416 			defaultMime = "application/octet-stream", // this default mime also triggers iframe downloads
       
   417 			mimeType = strMimeType || defaultMime,
       
   418 			payload = data,
       
   419 			url = !strFileName && !strMimeType && payload,
       
   420 			anchor = document.createElement("a"),
       
   421 			toString = function(a){return String(a);},
       
   422 			myBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),
       
   423 			fileName = strFileName || "download",
       
   424 			blob,
       
   425 			reader;
       
   426 			myBlob= myBlob.call ? myBlob.bind(self) : Blob ;
       
   427 	  
       
   428 		if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
       
   429 			payload=[payload, mimeType];
       
   430 			mimeType=payload[0];
       
   431 			payload=payload[1];
       
   432 		}
       
   433 
       
   434 
       
   435 		if(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument
       
   436 			fileName = url.split("/").pop().split("?")[0];
       
   437 			anchor.href = url; // assign href prop to temp anchor
       
   438 		  	if(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:
       
   439         		var ajax=new XMLHttpRequest();
       
   440         		ajax.open( "GET", url, true);
       
   441         		ajax.responseType = 'blob';
       
   442         		ajax.onload= function(e){ 
       
   443 				  download(e.target.response, fileName, defaultMime);
       
   444 				};
       
   445         		setTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:
       
   446 			    return ajax;
       
   447 			} // end if valid url?
       
   448 		} // end if url?
       
   449 
       
   450 
       
   451 		//go ahead and download dataURLs right away
       
   452 		if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(payload)){
       
   453 		
       
   454 			if(payload.length > (1024*1024*1.999) && myBlob !== toString ){
       
   455 				payload=dataUrlToBlob(payload);
       
   456 				mimeType=payload.type || defaultMime;
       
   457 			}else{			
       
   458 				return navigator.msSaveBlob ?  // IE10 can't do a[download], only Blobs:
       
   459 					navigator.msSaveBlob(dataUrlToBlob(payload), fileName) :
       
   460 					saver(payload) ; // everyone else can save dataURLs un-processed
       
   461 			}
       
   462 			
       
   463 		}else{//not data url, is it a string with special needs?
       
   464 			if(/([\x80-\xff])/.test(payload)){			  
       
   465 				var i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;
       
   466 				for(i;i<mx;++i) tempUiArr[i]= payload.charCodeAt(i);
       
   467 			 	payload=new myBlob([tempUiArr], {type: mimeType});
       
   468 			}		  
       
   469 		}
       
   470 		blob = payload instanceof myBlob ?
       
   471 			payload :
       
   472 			new myBlob([payload], {type: mimeType}) ;
       
   473 
       
   474 
       
   475 		function dataUrlToBlob(strUrl) {
       
   476 			var parts= strUrl.split(/[:;,]/),
       
   477 			type= parts[1],
       
   478 			decoder= parts[2] == "base64" ? atob : decodeURIComponent,
       
   479 			binData= decoder( parts.pop() ),
       
   480 			mx= binData.length,
       
   481 			i= 0,
       
   482 			uiArr= new Uint8Array(mx);
       
   483 
       
   484 			for(i;i<mx;++i) uiArr[i]= binData.charCodeAt(i);
       
   485 
       
   486 			return new myBlob([uiArr], {type: type});
       
   487 		 }
       
   488 
       
   489 		function saver(url, winMode){
       
   490 
       
   491 			if ('download' in anchor) { //html5 A[download]
       
   492 				anchor.href = url;
       
   493 				anchor.setAttribute("download", fileName);
       
   494 				anchor.className = "download-js-link";
       
   495 				anchor.innerHTML = "downloading...";
       
   496 				anchor.style.display = "none";
       
   497 				document.body.appendChild(anchor);
       
   498 				setTimeout(function() {
       
   499 					anchor.click();
       
   500 					document.body.removeChild(anchor);
       
   501 					if(winMode===true){setTimeout(function(){ self.URL.revokeObjectURL(anchor.href);}, 250 );}
       
   502 				}, 66);
       
   503 				return true;
       
   504 			}
       
   505 
       
   506 			// handle non-a[download] safari as best we can:
       
   507 			if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent)) {
       
   508 				if(/^data:/.test(url))	url="data:"+url.replace(/^data:([\w\/\-\+]+)/, defaultMime);
       
   509 				if(!window.open(url)){ // popup blocked, offer direct download:
       
   510 					if(confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")){ location.href=url; }
       
   511 				}
       
   512 				return true;
       
   513 			}
       
   514 
       
   515 			//do iframe dataURL download (old ch+FF):
       
   516 			var f = document.createElement("iframe");
       
   517 			document.body.appendChild(f);
       
   518 
       
   519 			if(!winMode && /^data:/.test(url)){ // force a mime that will download:
       
   520 				url="data:"+url.replace(/^data:([\w\/\-\+]+)/, defaultMime);
       
   521 			}
       
   522 			f.src=url;
       
   523 			setTimeout(function(){ document.body.removeChild(f); }, 333);
       
   524 
       
   525 		}//end saver
       
   526 
       
   527 
       
   528 
       
   529 
       
   530 		if (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)
       
   531 			return navigator.msSaveBlob(blob, fileName);
       
   532 		}
       
   533 
       
   534 		if(self.URL){ // simple fast and modern way using Blob and URL:
       
   535 			saver(self.URL.createObjectURL(blob), true);
       
   536 		}else{
       
   537 			// handle non-Blob()+non-URL browsers:
       
   538 			if(typeof blob === "string" || blob.constructor===toString ){
       
   539 				try{
       
   540 					return saver( "data:" +  mimeType   + ";base64,"  +  self.btoa(blob)  );
       
   541 				}catch(y){
       
   542 					return saver( "data:" +  mimeType   + "," + encodeURIComponent(blob)  );
       
   543 				}
       
   544 			}
       
   545 
       
   546 			// Blob but not URL support:
       
   547 			reader=new FileReader();
       
   548 			reader.onload=function(e){
       
   549 				saver(this.result);
       
   550 			};
       
   551 			reader.readAsDataURL(blob);
       
   552 		}
       
   553 		return true;
       
   554 	}; /* end download() */
       
   555 }));
       
   556 
       
   557 
       
   558 /***/ }),
       
   559 
       
   560 /***/ 9894:
       
   561 /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
       
   562 
       
   563 // Load in dependencies
       
   564 var computedStyle = __webpack_require__(4827);
       
   565 
       
   566 /**
       
   567  * Calculate the `line-height` of a given node
       
   568  * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
       
   569  * @returns {Number} `line-height` of the element in pixels
       
   570  */
       
   571 function lineHeight(node) {
       
   572   // Grab the line-height via style
       
   573   var lnHeightStr = computedStyle(node, 'line-height');
       
   574   var lnHeight = parseFloat(lnHeightStr, 10);
       
   575 
       
   576   // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
       
   577   if (lnHeightStr === lnHeight + '') {
       
   578     // Save the old lineHeight style and update the em unit to the element
       
   579     var _lnHeightStyle = node.style.lineHeight;
       
   580     node.style.lineHeight = lnHeightStr + 'em';
       
   581 
       
   582     // Calculate the em based height
       
   583     lnHeightStr = computedStyle(node, 'line-height');
       
   584     lnHeight = parseFloat(lnHeightStr, 10);
       
   585 
       
   586     // Revert the lineHeight style
       
   587     if (_lnHeightStyle) {
       
   588       node.style.lineHeight = _lnHeightStyle;
       
   589     } else {
       
   590       delete node.style.lineHeight;
       
   591     }
       
   592   }
       
   593 
       
   594   // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
       
   595   // DEV: `em` units are converted to `pt` in IE6
       
   596   // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
       
   597   if (lnHeightStr.indexOf('pt') !== -1) {
       
   598     lnHeight *= 4;
       
   599     lnHeight /= 3;
       
   600   // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
       
   601   } else if (lnHeightStr.indexOf('mm') !== -1) {
       
   602     lnHeight *= 96;
       
   603     lnHeight /= 25.4;
       
   604   // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
       
   605   } else if (lnHeightStr.indexOf('cm') !== -1) {
       
   606     lnHeight *= 96;
       
   607     lnHeight /= 2.54;
       
   608   // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
       
   609   } else if (lnHeightStr.indexOf('in') !== -1) {
       
   610     lnHeight *= 96;
       
   611   // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
       
   612   } else if (lnHeightStr.indexOf('pc') !== -1) {
       
   613     lnHeight *= 16;
       
   614   }
       
   615 
       
   616   // Continue our computation
       
   617   lnHeight = Math.round(lnHeight);
       
   618 
       
   619   // If the line-height is "normal", calculate by font-size
       
   620   if (lnHeightStr === 'normal') {
       
   621     // Create a temporary node
       
   622     var nodeName = node.nodeName;
       
   623     var _node = document.createElement(nodeName);
       
   624     _node.innerHTML = '&nbsp;';
       
   625 
       
   626     // If we have a text area, reset it to only 1 row
       
   627     // https://github.com/twolfson/line-height/issues/4
       
   628     if (nodeName.toUpperCase() === 'TEXTAREA') {
       
   629       _node.setAttribute('rows', '1');
       
   630     }
       
   631 
       
   632     // Set the font-size of the element
       
   633     var fontSizeStr = computedStyle(node, 'font-size');
       
   634     _node.style.fontSize = fontSizeStr;
       
   635 
       
   636     // Remove default padding/border which can affect offset height
       
   637     // https://github.com/twolfson/line-height/issues/4
       
   638     // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
       
   639     _node.style.padding = '0px';
       
   640     _node.style.border = '0px';
       
   641 
       
   642     // Append it to the body
       
   643     var body = document.body;
       
   644     body.appendChild(_node);
       
   645 
       
   646     // Assume the line height of the element is the height
       
   647     var height = _node.offsetHeight;
       
   648     lnHeight = height;
       
   649 
       
   650     // Remove our child from the DOM
       
   651     body.removeChild(_node);
       
   652   }
       
   653 
       
   654   // Return the calculated height
       
   655   return lnHeight;
       
   656 }
       
   657 
       
   658 // Export lineHeight
       
   659 module.exports = lineHeight;
       
   660 
       
   661 
       
   662 /***/ }),
       
   663 
       
   664 /***/ 5372:
       
   665 /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
       
   666 
  7241 
   667 "use strict";
  7242 "use strict";
   668 /**
  7243 /**
   669  * Copyright (c) 2013-present, Facebook, Inc.
  7244  * @license React
       
  7245  * use-sync-external-store-shim.production.min.js
       
  7246  *
       
  7247  * Copyright (c) Facebook, Inc. and its affiliates.
   670  *
  7248  *
   671  * This source code is licensed under the MIT license found in the
  7249  * This source code is licensed under the MIT license found in the
   672  * LICENSE file in the root directory of this source tree.
  7250  * LICENSE file in the root directory of this source tree.
   673  */
  7251  */
   674 
  7252 var e=__webpack_require__(1609);function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}
   675 
  7253 function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;
   676 
       
   677 var ReactPropTypesSecret = __webpack_require__(9567);
       
   678 
       
   679 function emptyFunction() {}
       
   680 function emptyFunctionWithReset() {}
       
   681 emptyFunctionWithReset.resetWarningCache = emptyFunction;
       
   682 
       
   683 module.exports = function() {
       
   684   function shim(props, propName, componentName, location, propFullName, secret) {
       
   685     if (secret === ReactPropTypesSecret) {
       
   686       // It is still safe when called from React.
       
   687       return;
       
   688     }
       
   689     var err = new Error(
       
   690       'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
       
   691       'Use PropTypes.checkPropTypes() to call them. ' +
       
   692       'Read more at http://fb.me/use-check-prop-types'
       
   693     );
       
   694     err.name = 'Invariant Violation';
       
   695     throw err;
       
   696   };
       
   697   shim.isRequired = shim;
       
   698   function getShim() {
       
   699     return shim;
       
   700   };
       
   701   // Important!
       
   702   // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
       
   703   var ReactPropTypes = {
       
   704     array: shim,
       
   705     bigint: shim,
       
   706     bool: shim,
       
   707     func: shim,
       
   708     number: shim,
       
   709     object: shim,
       
   710     string: shim,
       
   711     symbol: shim,
       
   712 
       
   713     any: shim,
       
   714     arrayOf: getShim,
       
   715     element: shim,
       
   716     elementType: shim,
       
   717     instanceOf: getShim,
       
   718     node: shim,
       
   719     objectOf: getShim,
       
   720     oneOf: getShim,
       
   721     oneOfType: getShim,
       
   722     shape: getShim,
       
   723     exact: getShim,
       
   724 
       
   725     checkPropTypes: emptyFunctionWithReset,
       
   726     resetWarningCache: emptyFunction
       
   727   };
       
   728 
       
   729   ReactPropTypes.PropTypes = ReactPropTypes;
       
   730 
       
   731   return ReactPropTypes;
       
   732 };
       
   733 
  7254 
   734 
  7255 
   735 /***/ }),
  7256 /***/ }),
   736 
  7257 
   737 /***/ 2652:
  7258 /***/ 422:
   738 /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  7259 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
   739 
  7260 
   740 /**
  7261 "use strict";
   741  * Copyright (c) 2013-present, Facebook, Inc.
  7262 
   742  *
  7263 
   743  * This source code is licensed under the MIT license found in the
  7264 if (true) {
   744  * LICENSE file in the root directory of this source tree.
  7265   module.exports = __webpack_require__(8477);
   745  */
  7266 } else {}
   746 
       
   747 if (false) { var throwOnDirectAccess, ReactIs; } else {
       
   748   // By explicitly using `prop-types` you are opting into new production behavior.
       
   749   // http://fb.me/prop-types-in-prod
       
   750   module.exports = __webpack_require__(5372)();
       
   751 }
       
   752 
  7267 
   753 
  7268 
   754 /***/ }),
  7269 /***/ }),
   755 
  7270 
   756 /***/ 9567:
  7271 /***/ 1609:
   757 /***/ (function(module) {
  7272 /***/ ((module) => {
   758 
       
   759 "use strict";
       
   760 /**
       
   761  * Copyright (c) 2013-present, Facebook, Inc.
       
   762  *
       
   763  * This source code is licensed under the MIT license found in the
       
   764  * LICENSE file in the root directory of this source tree.
       
   765  */
       
   766 
       
   767 
       
   768 
       
   769 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
       
   770 
       
   771 module.exports = ReactPropTypesSecret;
       
   772 
       
   773 
       
   774 /***/ }),
       
   775 
       
   776 /***/ 5438:
       
   777 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
       
   778 
       
   779 "use strict";
       
   780 
       
   781 var __extends = (this && this.__extends) || (function () {
       
   782     var extendStatics = Object.setPrototypeOf ||
       
   783         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
       
   784         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
       
   785     return function (d, b) {
       
   786         extendStatics(d, b);
       
   787         function __() { this.constructor = d; }
       
   788         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
       
   789     };
       
   790 })();
       
   791 var __assign = (this && this.__assign) || Object.assign || function(t) {
       
   792     for (var s, i = 1, n = arguments.length; i < n; i++) {
       
   793         s = arguments[i];
       
   794         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
       
   795             t[p] = s[p];
       
   796     }
       
   797     return t;
       
   798 };
       
   799 var __rest = (this && this.__rest) || function (s, e) {
       
   800     var t = {};
       
   801     for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
       
   802         t[p] = s[p];
       
   803     if (s != null && typeof Object.getOwnPropertySymbols === "function")
       
   804         for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
       
   805             t[p[i]] = s[p[i]];
       
   806     return t;
       
   807 };
       
   808 exports.__esModule = true;
       
   809 var React = __webpack_require__(9196);
       
   810 var PropTypes = __webpack_require__(2652);
       
   811 var autosize = __webpack_require__(6411);
       
   812 var _getLineHeight = __webpack_require__(9894);
       
   813 var getLineHeight = _getLineHeight;
       
   814 var RESIZED = "autosize:resized";
       
   815 /**
       
   816  * A light replacement for built-in textarea component
       
   817  * which automaticaly adjusts its height to match the content
       
   818  */
       
   819 var TextareaAutosizeClass = /** @class */ (function (_super) {
       
   820     __extends(TextareaAutosizeClass, _super);
       
   821     function TextareaAutosizeClass() {
       
   822         var _this = _super !== null && _super.apply(this, arguments) || this;
       
   823         _this.state = {
       
   824             lineHeight: null
       
   825         };
       
   826         _this.textarea = null;
       
   827         _this.onResize = function (e) {
       
   828             if (_this.props.onResize) {
       
   829                 _this.props.onResize(e);
       
   830             }
       
   831         };
       
   832         _this.updateLineHeight = function () {
       
   833             if (_this.textarea) {
       
   834                 _this.setState({
       
   835                     lineHeight: getLineHeight(_this.textarea)
       
   836                 });
       
   837             }
       
   838         };
       
   839         _this.onChange = function (e) {
       
   840             var onChange = _this.props.onChange;
       
   841             _this.currentValue = e.currentTarget.value;
       
   842             onChange && onChange(e);
       
   843         };
       
   844         return _this;
       
   845     }
       
   846     TextareaAutosizeClass.prototype.componentDidMount = function () {
       
   847         var _this = this;
       
   848         var _a = this.props, maxRows = _a.maxRows, async = _a.async;
       
   849         if (typeof maxRows === "number") {
       
   850             this.updateLineHeight();
       
   851         }
       
   852         if (typeof maxRows === "number" || async) {
       
   853             /*
       
   854               the defer is needed to:
       
   855                 - force "autosize" to activate the scrollbar when this.props.maxRows is passed
       
   856                 - support StyledComponents (see #71)
       
   857             */
       
   858             setTimeout(function () { return _this.textarea && autosize(_this.textarea); });
       
   859         }
       
   860         else {
       
   861             this.textarea && autosize(this.textarea);
       
   862         }
       
   863         if (this.textarea) {
       
   864             this.textarea.addEventListener(RESIZED, this.onResize);
       
   865         }
       
   866     };
       
   867     TextareaAutosizeClass.prototype.componentWillUnmount = function () {
       
   868         if (this.textarea) {
       
   869             this.textarea.removeEventListener(RESIZED, this.onResize);
       
   870             autosize.destroy(this.textarea);
       
   871         }
       
   872     };
       
   873     TextareaAutosizeClass.prototype.render = function () {
       
   874         var _this = this;
       
   875         var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef", "children"]), lineHeight = _a.state.lineHeight;
       
   876         var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
       
   877         return (React.createElement("textarea", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {
       
   878                 _this.textarea = element;
       
   879                 if (typeof _this.props.innerRef === 'function') {
       
   880                     _this.props.innerRef(element);
       
   881                 }
       
   882                 else if (_this.props.innerRef) {
       
   883                     _this.props.innerRef.current = element;
       
   884                 }
       
   885             } }), children));
       
   886     };
       
   887     TextareaAutosizeClass.prototype.componentDidUpdate = function () {
       
   888         this.textarea && autosize.update(this.textarea);
       
   889     };
       
   890     TextareaAutosizeClass.defaultProps = {
       
   891         rows: 1,
       
   892         async: false
       
   893     };
       
   894     TextareaAutosizeClass.propTypes = {
       
   895         rows: PropTypes.number,
       
   896         maxRows: PropTypes.number,
       
   897         onResize: PropTypes.func,
       
   898         innerRef: PropTypes.any,
       
   899         async: PropTypes.bool
       
   900     };
       
   901     return TextareaAutosizeClass;
       
   902 }(React.Component));
       
   903 exports.TextareaAutosize = React.forwardRef(function (props, ref) {
       
   904     return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));
       
   905 });
       
   906 
       
   907 
       
   908 /***/ }),
       
   909 
       
   910 /***/ 773:
       
   911 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
       
   912 
       
   913 "use strict";
       
   914 var __webpack_unused_export__;
       
   915 
       
   916 __webpack_unused_export__ = true;
       
   917 var TextareaAutosize_1 = __webpack_require__(5438);
       
   918 exports.Z = TextareaAutosize_1.TextareaAutosize;
       
   919 
       
   920 
       
   921 /***/ }),
       
   922 
       
   923 /***/ 9196:
       
   924 /***/ (function(module) {
       
   925 
  7273 
   926 "use strict";
  7274 "use strict";
   927 module.exports = window["React"];
  7275 module.exports = window["React"];
   928 
  7276 
   929 /***/ })
  7277 /***/ })
   946 /******/ 			// no module.loaded needed
  7294 /******/ 			// no module.loaded needed
   947 /******/ 			exports: {}
  7295 /******/ 			exports: {}
   948 /******/ 		};
  7296 /******/ 		};
   949 /******/ 	
  7297 /******/ 	
   950 /******/ 		// Execute the module function
  7298 /******/ 		// Execute the module function
   951 /******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  7299 /******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
   952 /******/ 	
  7300 /******/ 	
   953 /******/ 		// Return the exports of the module
  7301 /******/ 		// Return the exports of the module
   954 /******/ 		return module.exports;
  7302 /******/ 		return module.exports;
   955 /******/ 	}
  7303 /******/ 	}
   956 /******/ 	
  7304 /******/ 	
   957 /************************************************************************/
  7305 /************************************************************************/
   958 /******/ 	/* webpack/runtime/compat get default export */
  7306 /******/ 	/* webpack/runtime/compat get default export */
   959 /******/ 	!function() {
  7307 /******/ 	(() => {
   960 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
  7308 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
   961 /******/ 		__webpack_require__.n = function(module) {
  7309 /******/ 		__webpack_require__.n = (module) => {
   962 /******/ 			var getter = module && module.__esModule ?
  7310 /******/ 			var getter = module && module.__esModule ?
   963 /******/ 				function() { return module['default']; } :
  7311 /******/ 				() => (module['default']) :
   964 /******/ 				function() { return module; };
  7312 /******/ 				() => (module);
   965 /******/ 			__webpack_require__.d(getter, { a: getter });
  7313 /******/ 			__webpack_require__.d(getter, { a: getter });
   966 /******/ 			return getter;
  7314 /******/ 			return getter;
   967 /******/ 		};
  7315 /******/ 		};
   968 /******/ 	}();
  7316 /******/ 	})();
       
  7317 /******/ 	
       
  7318 /******/ 	/* webpack/runtime/create fake namespace object */
       
  7319 /******/ 	(() => {
       
  7320 /******/ 		var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
       
  7321 /******/ 		var leafPrototypes;
       
  7322 /******/ 		// create a fake namespace object
       
  7323 /******/ 		// mode & 1: value is a module id, require it
       
  7324 /******/ 		// mode & 2: merge all properties of value into the ns
       
  7325 /******/ 		// mode & 4: return value when already ns object
       
  7326 /******/ 		// mode & 16: return value when it's Promise-like
       
  7327 /******/ 		// mode & 8|1: behave like require
       
  7328 /******/ 		__webpack_require__.t = function(value, mode) {
       
  7329 /******/ 			if(mode & 1) value = this(value);
       
  7330 /******/ 			if(mode & 8) return value;
       
  7331 /******/ 			if(typeof value === 'object' && value) {
       
  7332 /******/ 				if((mode & 4) && value.__esModule) return value;
       
  7333 /******/ 				if((mode & 16) && typeof value.then === 'function') return value;
       
  7334 /******/ 			}
       
  7335 /******/ 			var ns = Object.create(null);
       
  7336 /******/ 			__webpack_require__.r(ns);
       
  7337 /******/ 			var def = {};
       
  7338 /******/ 			leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
       
  7339 /******/ 			for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
       
  7340 /******/ 				Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
       
  7341 /******/ 			}
       
  7342 /******/ 			def['default'] = () => (value);
       
  7343 /******/ 			__webpack_require__.d(ns, def);
       
  7344 /******/ 			return ns;
       
  7345 /******/ 		};
       
  7346 /******/ 	})();
   969 /******/ 	
  7347 /******/ 	
   970 /******/ 	/* webpack/runtime/define property getters */
  7348 /******/ 	/* webpack/runtime/define property getters */
   971 /******/ 	!function() {
  7349 /******/ 	(() => {
   972 /******/ 		// define getter functions for harmony exports
  7350 /******/ 		// define getter functions for harmony exports
   973 /******/ 		__webpack_require__.d = function(exports, definition) {
  7351 /******/ 		__webpack_require__.d = (exports, definition) => {
   974 /******/ 			for(var key in definition) {
  7352 /******/ 			for(var key in definition) {
   975 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  7353 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
   976 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  7354 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
   977 /******/ 				}
  7355 /******/ 				}
   978 /******/ 			}
  7356 /******/ 			}
   979 /******/ 		};
  7357 /******/ 		};
   980 /******/ 	}();
  7358 /******/ 	})();
   981 /******/ 	
  7359 /******/ 	
   982 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
  7360 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
   983 /******/ 	!function() {
  7361 /******/ 	(() => {
   984 /******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  7362 /******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
   985 /******/ 	}();
  7363 /******/ 	})();
   986 /******/ 	
  7364 /******/ 	
   987 /******/ 	/* webpack/runtime/make namespace object */
  7365 /******/ 	/* webpack/runtime/make namespace object */
   988 /******/ 	!function() {
  7366 /******/ 	(() => {
   989 /******/ 		// define __esModule on exports
  7367 /******/ 		// define __esModule on exports
   990 /******/ 		__webpack_require__.r = function(exports) {
  7368 /******/ 		__webpack_require__.r = (exports) => {
   991 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  7369 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
   992 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  7370 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
   993 /******/ 			}
  7371 /******/ 			}
   994 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
  7372 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
   995 /******/ 		};
  7373 /******/ 		};
   996 /******/ 	}();
  7374 /******/ 	})();
   997 /******/ 	
  7375 /******/ 	
   998 /************************************************************************/
  7376 /************************************************************************/
   999 var __webpack_exports__ = {};
  7377 var __webpack_exports__ = {};
  1000 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  7378 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  1001 !function() {
  7379 (() => {
  1002 "use strict";
  7380 "use strict";
  1003 // ESM COMPAT FLAG
  7381 // ESM COMPAT FLAG
  1004 __webpack_require__.r(__webpack_exports__);
  7382 __webpack_require__.r(__webpack_exports__);
  1005 
  7383 
  1006 // EXPORTS
  7384 // EXPORTS
  1007 __webpack_require__.d(__webpack_exports__, {
  7385 __webpack_require__.d(__webpack_exports__, {
  1008   "PluginMoreMenuItem": function() { return /* reexport */ plugin_more_menu_item; },
  7386   PluginMoreMenuItem: () => (/* reexport */ PluginMoreMenuItem),
  1009   "PluginSidebar": function() { return /* reexport */ PluginSidebarEditSite; },
  7387   PluginSidebar: () => (/* reexport */ PluginSidebar),
  1010   "PluginSidebarMoreMenuItem": function() { return /* reexport */ PluginSidebarMoreMenuItem; },
  7388   PluginSidebarMoreMenuItem: () => (/* reexport */ PluginSidebarMoreMenuItem),
  1011   "__experimentalMainDashboardButton": function() { return /* reexport */ main_dashboard_button; },
  7389   PluginTemplateSettingPanel: () => (/* reexport */ plugin_template_setting_panel),
  1012   "__experimentalNavigationToggle": function() { return /* reexport */ navigation_toggle; },
  7390   initializeEditor: () => (/* binding */ initializeEditor),
  1013   "initializeEditor": function() { return /* binding */ initializeEditor; },
  7391   reinitializeEditor: () => (/* binding */ reinitializeEditor),
  1014   "reinitializeEditor": function() { return /* binding */ reinitializeEditor; }
  7392   store: () => (/* reexport */ store)
  1015 });
  7393 });
  1016 
  7394 
  1017 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js
  7395 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/actions.js
  1018 var actions_namespaceObject = {};
  7396 var actions_namespaceObject = {};
  1019 __webpack_require__.r(actions_namespaceObject);
  7397 __webpack_require__.r(actions_namespaceObject);
  1020 __webpack_require__.d(actions_namespaceObject, {
  7398 __webpack_require__.d(actions_namespaceObject, {
  1021   "disableComplementaryArea": function() { return disableComplementaryArea; },
  7399   __experimentalSetPreviewDeviceType: () => (__experimentalSetPreviewDeviceType),
  1022   "enableComplementaryArea": function() { return enableComplementaryArea; },
  7400   addTemplate: () => (addTemplate),
  1023   "pinItem": function() { return pinItem; },
  7401   closeGeneralSidebar: () => (closeGeneralSidebar),
  1024   "setFeatureDefaults": function() { return setFeatureDefaults; },
  7402   openGeneralSidebar: () => (openGeneralSidebar),
  1025   "setFeatureValue": function() { return setFeatureValue; },
  7403   openNavigationPanelToMenu: () => (openNavigationPanelToMenu),
  1026   "toggleFeature": function() { return toggleFeature; },
  7404   removeTemplate: () => (removeTemplate),
  1027   "unpinItem": function() { return unpinItem; }
  7405   revertTemplate: () => (revertTemplate),
       
  7406   setEditedEntity: () => (setEditedEntity),
       
  7407   setEditedPostContext: () => (setEditedPostContext),
       
  7408   setHasPageContentFocus: () => (setHasPageContentFocus),
       
  7409   setHomeTemplateId: () => (setHomeTemplateId),
       
  7410   setIsInserterOpened: () => (setIsInserterOpened),
       
  7411   setIsListViewOpened: () => (setIsListViewOpened),
       
  7412   setIsNavigationPanelOpened: () => (setIsNavigationPanelOpened),
       
  7413   setIsSaveViewOpened: () => (setIsSaveViewOpened),
       
  7414   setNavigationMenu: () => (setNavigationMenu),
       
  7415   setNavigationPanelActiveMenu: () => (setNavigationPanelActiveMenu),
       
  7416   setPage: () => (setPage),
       
  7417   setTemplate: () => (setTemplate),
       
  7418   setTemplatePart: () => (setTemplatePart),
       
  7419   switchEditorMode: () => (switchEditorMode),
       
  7420   toggleDistractionFree: () => (toggleDistractionFree),
       
  7421   toggleFeature: () => (toggleFeature),
       
  7422   updateSettings: () => (updateSettings)
  1028 });
  7423 });
  1029 
  7424 
  1030 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js
  7425 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/private-actions.js
       
  7426 var private_actions_namespaceObject = {};
       
  7427 __webpack_require__.r(private_actions_namespaceObject);
       
  7428 __webpack_require__.d(private_actions_namespaceObject, {
       
  7429   setCanvasMode: () => (setCanvasMode),
       
  7430   setEditorCanvasContainerView: () => (setEditorCanvasContainerView)
       
  7431 });
       
  7432 
       
  7433 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/selectors.js
  1031 var selectors_namespaceObject = {};
  7434 var selectors_namespaceObject = {};
  1032 __webpack_require__.r(selectors_namespaceObject);
  7435 __webpack_require__.r(selectors_namespaceObject);
  1033 __webpack_require__.d(selectors_namespaceObject, {
  7436 __webpack_require__.d(selectors_namespaceObject, {
  1034   "getActiveComplementaryArea": function() { return getActiveComplementaryArea; },
  7437   __experimentalGetInsertionPoint: () => (__experimentalGetInsertionPoint),
  1035   "isFeatureActive": function() { return isFeatureActive; },
  7438   __experimentalGetPreviewDeviceType: () => (__experimentalGetPreviewDeviceType),
  1036   "isItemPinned": function() { return isItemPinned; }
  7439   getCanUserCreateMedia: () => (getCanUserCreateMedia),
       
  7440   getCurrentTemplateNavigationPanelSubMenu: () => (getCurrentTemplateNavigationPanelSubMenu),
       
  7441   getCurrentTemplateTemplateParts: () => (getCurrentTemplateTemplateParts),
       
  7442   getEditedPostContext: () => (getEditedPostContext),
       
  7443   getEditedPostId: () => (getEditedPostId),
       
  7444   getEditedPostType: () => (getEditedPostType),
       
  7445   getEditorMode: () => (getEditorMode),
       
  7446   getHomeTemplateId: () => (getHomeTemplateId),
       
  7447   getNavigationPanelActiveMenu: () => (getNavigationPanelActiveMenu),
       
  7448   getPage: () => (getPage),
       
  7449   getReusableBlocks: () => (getReusableBlocks),
       
  7450   getSettings: () => (getSettings),
       
  7451   hasPageContentFocus: () => (hasPageContentFocus),
       
  7452   isFeatureActive: () => (isFeatureActive),
       
  7453   isInserterOpened: () => (isInserterOpened),
       
  7454   isListViewOpened: () => (isListViewOpened),
       
  7455   isNavigationOpened: () => (isNavigationOpened),
       
  7456   isPage: () => (isPage),
       
  7457   isSaveViewOpened: () => (isSaveViewOpened)
  1037 });
  7458 });
  1038 
  7459 
  1039 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/actions.js
  7460 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/private-selectors.js
  1040 var store_actions_namespaceObject = {};
  7461 var private_selectors_namespaceObject = {};
  1041 __webpack_require__.r(store_actions_namespaceObject);
  7462 __webpack_require__.r(private_selectors_namespaceObject);
  1042 __webpack_require__.d(store_actions_namespaceObject, {
  7463 __webpack_require__.d(private_selectors_namespaceObject, {
  1043   "__experimentalSetPreviewDeviceType": function() { return __experimentalSetPreviewDeviceType; },
  7464   getCanvasMode: () => (getCanvasMode),
  1044   "addTemplate": function() { return addTemplate; },
  7465   getEditorCanvasContainerView: () => (getEditorCanvasContainerView)
  1045   "closeGeneralSidebar": function() { return closeGeneralSidebar; },
       
  1046   "openGeneralSidebar": function() { return openGeneralSidebar; },
       
  1047   "openNavigationPanelToMenu": function() { return openNavigationPanelToMenu; },
       
  1048   "removeTemplate": function() { return removeTemplate; },
       
  1049   "revertTemplate": function() { return revertTemplate; },
       
  1050   "setHomeTemplateId": function() { return setHomeTemplateId; },
       
  1051   "setIsInserterOpened": function() { return setIsInserterOpened; },
       
  1052   "setIsListViewOpened": function() { return setIsListViewOpened; },
       
  1053   "setIsNavigationPanelOpened": function() { return setIsNavigationPanelOpened; },
       
  1054   "setNavigationPanelActiveMenu": function() { return setNavigationPanelActiveMenu; },
       
  1055   "setPage": function() { return setPage; },
       
  1056   "setTemplate": function() { return setTemplate; },
       
  1057   "setTemplatePart": function() { return setTemplatePart; },
       
  1058   "switchEditorMode": function() { return switchEditorMode; },
       
  1059   "toggleFeature": function() { return actions_toggleFeature; },
       
  1060   "updateSettings": function() { return updateSettings; }
       
  1061 });
  7466 });
  1062 
  7467 
  1063 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/selectors.js
  7468 ;// CONCATENATED MODULE: external ["wp","blocks"]
  1064 var store_selectors_namespaceObject = {};
  7469 const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
  1065 __webpack_require__.r(store_selectors_namespaceObject);
  7470 ;// CONCATENATED MODULE: external ["wp","blockLibrary"]
  1066 __webpack_require__.d(store_selectors_namespaceObject, {
  7471 const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
  1067   "__experimentalGetInsertionPoint": function() { return __experimentalGetInsertionPoint; },
  7472 ;// CONCATENATED MODULE: external ["wp","data"]
  1068   "__experimentalGetPreviewDeviceType": function() { return __experimentalGetPreviewDeviceType; },
  7473 const external_wp_data_namespaceObject = window["wp"]["data"];
  1069   "__unstableGetPreference": function() { return __unstableGetPreference; },
  7474 ;// CONCATENATED MODULE: external ["wp","deprecated"]
  1070   "getCanUserCreateMedia": function() { return getCanUserCreateMedia; },
  7475 const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
  1071   "getCurrentTemplateNavigationPanelSubMenu": function() { return getCurrentTemplateNavigationPanelSubMenu; },
  7476 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
  1072   "getCurrentTemplateTemplateParts": function() { return getCurrentTemplateTemplateParts; },
       
  1073   "getEditedPostId": function() { return getEditedPostId; },
       
  1074   "getEditedPostType": function() { return getEditedPostType; },
       
  1075   "getEditorMode": function() { return getEditorMode; },
       
  1076   "getHomeTemplateId": function() { return getHomeTemplateId; },
       
  1077   "getNavigationPanelActiveMenu": function() { return getNavigationPanelActiveMenu; },
       
  1078   "getPage": function() { return getPage; },
       
  1079   "getReusableBlocks": function() { return getReusableBlocks; },
       
  1080   "getSettings": function() { return getSettings; },
       
  1081   "isFeatureActive": function() { return selectors_isFeatureActive; },
       
  1082   "isInserterOpened": function() { return isInserterOpened; },
       
  1083   "isListViewOpened": function() { return isListViewOpened; },
       
  1084   "isNavigationOpened": function() { return isNavigationOpened; }
       
  1085 });
       
  1086 
       
  1087 ;// CONCATENATED MODULE: external ["wp","element"]
  7477 ;// CONCATENATED MODULE: external ["wp","element"]
  1088 var external_wp_element_namespaceObject = window["wp"]["element"];
  7478 const external_wp_element_namespaceObject = window["wp"]["element"];
  1089 ;// CONCATENATED MODULE: external ["wp","blocks"]
  7479 ;// CONCATENATED MODULE: external ["wp","editor"]
  1090 var external_wp_blocks_namespaceObject = window["wp"]["blocks"];
  7480 const external_wp_editor_namespaceObject = window["wp"]["editor"];
  1091 ;// CONCATENATED MODULE: external ["wp","blockLibrary"]
  7481 ;// CONCATENATED MODULE: external ["wp","preferences"]
  1092 var external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
  7482 const external_wp_preferences_namespaceObject = window["wp"]["preferences"];
  1093 ;// CONCATENATED MODULE: external ["wp","data"]
  7483 ;// CONCATENATED MODULE: external ["wp","widgets"]
  1094 var external_wp_data_namespaceObject = window["wp"]["data"];
  7484 const external_wp_widgets_namespaceObject = window["wp"]["widgets"];
       
  7485 ;// CONCATENATED MODULE: external ["wp","hooks"]
       
  7486 const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
       
  7487 ;// CONCATENATED MODULE: external ["wp","compose"]
       
  7488 const external_wp_compose_namespaceObject = window["wp"]["compose"];
       
  7489 ;// CONCATENATED MODULE: external ["wp","blockEditor"]
       
  7490 const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
       
  7491 ;// CONCATENATED MODULE: external ["wp","components"]
       
  7492 const external_wp_components_namespaceObject = window["wp"]["components"];
       
  7493 ;// CONCATENATED MODULE: external ["wp","i18n"]
       
  7494 const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
       
  7495 ;// CONCATENATED MODULE: external ["wp","notices"]
       
  7496 const external_wp_notices_namespaceObject = window["wp"]["notices"];
  1095 ;// CONCATENATED MODULE: external ["wp","coreData"]
  7497 ;// CONCATENATED MODULE: external ["wp","coreData"]
  1096 var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
  7498 const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
  1097 ;// CONCATENATED MODULE: external ["wp","editor"]
  7499 ;// CONCATENATED MODULE: ./node_modules/colord/index.mjs
  1098 var external_wp_editor_namespaceObject = window["wp"]["editor"];
  7500 var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||colord_p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},colord_j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof colord_j?r:new colord_j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(colord_j,y),S.push(r))})},E=function(){return new colord_j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};
  1099 ;// CONCATENATED MODULE: external ["wp","preferences"]
  7501 
  1100 var external_wp_preferences_namespaceObject = window["wp"]["preferences"];
  7502 ;// CONCATENATED MODULE: ./node_modules/colord/plugins/a11y.mjs
  1101 ;// CONCATENATED MODULE: external ["wp","i18n"]
  7503 var a11y_o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},a11y_t=function(t){return.2126*a11y_o(t.r)+.7152*a11y_o(t.g)+.0722*a11y_o(t.b)};/* harmony default export */ function a11y(o){o.prototype.luminance=function(){return o=a11y_t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=a11y_t(e),d=a11y_t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?"normal":i,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===a&&"large"===e?3:4.5);var r,n,a,i,e}}
  1102 var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
  7504 
  1103 ;// CONCATENATED MODULE: external ["wp","viewport"]
  7505 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/clone-deep.js
  1104 var external_wp_viewport_namespaceObject = window["wp"]["viewport"];
  7506 /**
  1105 ;// CONCATENATED MODULE: external ["wp","url"]
  7507  * Makes a copy of an object without storing any references to the original object.
  1106 var external_wp_url_namespaceObject = window["wp"]["url"];
  7508  * @param {Object} object
  1107 ;// CONCATENATED MODULE: external ["wp","hooks"]
  7509  * @return {Object} The cloned object.
  1108 var external_wp_hooks_namespaceObject = window["wp"]["hooks"];
  7510  */
  1109 ;// CONCATENATED MODULE: external ["wp","mediaUtils"]
  7511 function cloneDeep(object) {
  1110 var external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
  7512   return !object ? {} : JSON.parse(JSON.stringify(object));
  1111 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/components.js
  7513 }
       
  7514 
       
  7515 ;// CONCATENATED MODULE: external ["wp","privateApis"]
       
  7516 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
       
  7517 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/lock-unlock.js
  1112 /**
  7518 /**
  1113  * WordPress dependencies
  7519  * WordPress dependencies
  1114  */
  7520  */
  1115 
  7521 
  1116 
  7522 const {
  1117 (0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-site/components/media-upload', () => external_wp_mediaUtils_namespaceObject.MediaUpload);
  7523   lock,
       
  7524   unlock: lock_unlock_unlock
       
  7525 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/edit-site');
       
  7526 
       
  7527 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js
       
  7528 /**
       
  7529  * WordPress dependencies
       
  7530  */
       
  7531 
       
  7532 
       
  7533 
       
  7534 
       
  7535 
       
  7536 
       
  7537 
       
  7538 /**
       
  7539  * Internal dependencies
       
  7540  */
       
  7541 
       
  7542 
       
  7543 const {
       
  7544   GlobalStylesContext
       
  7545 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
  7546 const {
       
  7547   mergeBaseAndUserConfigs
       
  7548 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
  7549 
       
  7550 /**
       
  7551  * Removes all instances of a property from an object.
       
  7552  *
       
  7553  * @param {Object} object   The object to remove the property from.
       
  7554  * @param {string} property The property to remove.
       
  7555  * @return {Object} The modified object.
       
  7556  */
       
  7557 function removePropertyFromObject(object, property) {
       
  7558   if (!property || typeof property !== 'string') {
       
  7559     return object;
       
  7560   }
       
  7561   if (typeof object !== 'object' || !object || !Object.keys(object).length) {
       
  7562     return object;
       
  7563   }
       
  7564   for (const key in object) {
       
  7565     if (key === property) {
       
  7566       delete object[key];
       
  7567     } else if (typeof object[key] === 'object') {
       
  7568       removePropertyFromObject(object[key], property);
       
  7569     }
       
  7570   }
       
  7571   return object;
       
  7572 }
       
  7573 
       
  7574 /**
       
  7575  * Fetches the current theme style variations that contain only the specified property
       
  7576  * and merges them with the user config.
       
  7577  *
       
  7578  * @param {Object} props          Object of hook args.
       
  7579  * @param {string} props.property The property to filter by.
       
  7580  * @return {Object[]|*} The merged object.
       
  7581  */
       
  7582 function useCurrentMergeThemeStyleVariationsWithUserConfig({
       
  7583   property
       
  7584 }) {
       
  7585   const {
       
  7586     variationsFromTheme
       
  7587   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  7588     const _variationsFromTheme = select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations();
       
  7589     return {
       
  7590       variationsFromTheme: _variationsFromTheme || []
       
  7591     };
       
  7592   }, []);
       
  7593   const {
       
  7594     user: userVariation
       
  7595   } = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
       
  7596   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  7597     const clonedUserVariation = cloneDeep(userVariation);
       
  7598 
       
  7599     // Get user variation and remove the settings for the given property.
       
  7600     const userVariationWithoutProperty = removePropertyFromObject(clonedUserVariation, property);
       
  7601     userVariationWithoutProperty.title = (0,external_wp_i18n_namespaceObject.__)('Default');
       
  7602     const variationsWithSinglePropertyAndBase = variationsFromTheme.filter(variation => {
       
  7603       return isVariationWithSingleProperty(variation, property);
       
  7604     }).map(variation => {
       
  7605       return mergeBaseAndUserConfigs(userVariationWithoutProperty, variation);
       
  7606     });
       
  7607     return [userVariationWithoutProperty, ...variationsWithSinglePropertyAndBase];
       
  7608   }, [property, userVariation, variationsFromTheme]);
       
  7609 }
       
  7610 
       
  7611 /**
       
  7612  * Returns a new object, with properties specified in `property`,
       
  7613  * maintain the original object tree structure.
       
  7614  * The function is recursive, so it will perform a deep search for the given property.
       
  7615  * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the property is `test`.
       
  7616  *
       
  7617  * @param {Object} object   The object to filter
       
  7618  * @param {Object} property The property to filter by
       
  7619  * @return {Object} The merged object.
       
  7620  */
       
  7621 const filterObjectByProperty = (object, property) => {
       
  7622   if (!object) {
       
  7623     return {};
       
  7624   }
       
  7625   const newObject = {};
       
  7626   Object.keys(object).forEach(key => {
       
  7627     if (key === property) {
       
  7628       newObject[key] = object[key];
       
  7629     } else if (typeof object[key] === 'object') {
       
  7630       const newFilter = filterObjectByProperty(object[key], property);
       
  7631       if (Object.keys(newFilter).length) {
       
  7632         newObject[key] = newFilter;
       
  7633       }
       
  7634     }
       
  7635   });
       
  7636   return newObject;
       
  7637 };
       
  7638 
       
  7639 /**
       
  7640  * Compares a style variation to the same variation filtered by a single property.
       
  7641  * Returns true if the variation contains only the property specified.
       
  7642  *
       
  7643  * @param {Object} variation The variation to compare.
       
  7644  * @param {string} property  The property to compare.
       
  7645  * @return {boolean} Whether the variation contains only a single property.
       
  7646  */
       
  7647 function isVariationWithSingleProperty(variation, property) {
       
  7648   const variationWithProperty = filterObjectByProperty(cloneDeep(variation), property);
       
  7649   return JSON.stringify(variationWithProperty?.styles) === JSON.stringify(variation?.styles) && JSON.stringify(variationWithProperty?.settings) === JSON.stringify(variation?.settings);
       
  7650 }
       
  7651 
       
  7652 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/hooks.js
       
  7653 /**
       
  7654  * External dependencies
       
  7655  */
       
  7656 
       
  7657 
       
  7658 
       
  7659 /**
       
  7660  * WordPress dependencies
       
  7661  */
       
  7662 
       
  7663 
       
  7664 
       
  7665 
       
  7666 /**
       
  7667  * Internal dependencies
       
  7668  */
       
  7669 
       
  7670 
       
  7671 
       
  7672 const {
       
  7673   useGlobalSetting,
       
  7674   useGlobalStyle
       
  7675 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
  7676 
       
  7677 // Enable colord's a11y plugin.
       
  7678 k([a11y]);
       
  7679 function useColorRandomizer(name) {
       
  7680   const [themeColors, setThemeColors] = useGlobalSetting('color.palette.theme', name);
       
  7681   function randomizeColors() {
       
  7682     /* eslint-disable no-restricted-syntax */
       
  7683     const randomRotationValue = Math.floor(Math.random() * 225);
       
  7684     /* eslint-enable no-restricted-syntax */
       
  7685 
       
  7686     const newColors = themeColors.map(colorObject => {
       
  7687       const {
       
  7688         color
       
  7689       } = colorObject;
       
  7690       const newColor = w(color).rotate(randomRotationValue).toHex();
       
  7691       return {
       
  7692         ...colorObject,
       
  7693         color: newColor
       
  7694       };
       
  7695     });
       
  7696     setThemeColors(newColors);
       
  7697   }
       
  7698   return window.__experimentalEnableColorRandomizer ? [randomizeColors] : [];
       
  7699 }
       
  7700 function useStylesPreviewColors() {
       
  7701   const [textColor = 'black'] = useGlobalStyle('color.text');
       
  7702   const [backgroundColor = 'white'] = useGlobalStyle('color.background');
       
  7703   const [headingColor = textColor] = useGlobalStyle('elements.h1.color.text');
       
  7704   const [linkColor = headingColor] = useGlobalStyle('elements.link.color.text');
       
  7705   const [buttonBackgroundColor = linkColor] = useGlobalStyle('elements.button.color.background');
       
  7706   const [coreColors] = useGlobalSetting('color.palette.core');
       
  7707   const [themeColors] = useGlobalSetting('color.palette.theme');
       
  7708   const [customColors] = useGlobalSetting('color.palette.custom');
       
  7709   const paletteColors = (themeColors !== null && themeColors !== void 0 ? themeColors : []).concat(customColors !== null && customColors !== void 0 ? customColors : []).concat(coreColors !== null && coreColors !== void 0 ? coreColors : []);
       
  7710   const textColorObject = paletteColors.filter(({
       
  7711     color
       
  7712   }) => color === textColor);
       
  7713   const buttonBackgroundColorObject = paletteColors.filter(({
       
  7714     color
       
  7715   }) => color === buttonBackgroundColor);
       
  7716   const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
       
  7717   // we exclude these background color because it is already visible in the preview.
       
  7718   ({
       
  7719     color
       
  7720   }) => color !== backgroundColor).slice(0, 2);
       
  7721   return {
       
  7722     paletteColors,
       
  7723     highlightedColors
       
  7724   };
       
  7725 }
       
  7726 function useSupportedStyles(name, element) {
       
  7727   const {
       
  7728     supportedPanels
       
  7729   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  7730     return {
       
  7731       supportedPanels: lock_unlock_unlock(select(external_wp_blocks_namespaceObject.store)).getSupportedStyles(name, element)
       
  7732     };
       
  7733   }, [name, element]);
       
  7734   return supportedPanels;
       
  7735 }
       
  7736 function useColorVariations() {
       
  7737   const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig({
       
  7738     property: 'color'
       
  7739   });
       
  7740   /*
       
  7741    * Filter out variations with no settings or styles.
       
  7742    */
       
  7743   return colorVariations?.length ? colorVariations.filter(variation => {
       
  7744     const {
       
  7745       settings,
       
  7746       styles,
       
  7747       title
       
  7748     } = variation;
       
  7749     return title === (0,external_wp_i18n_namespaceObject.__)('Default') ||
       
  7750     // Always preseve the default variation.
       
  7751     Object.keys(settings).length > 0 || Object.keys(styles).length > 0;
       
  7752   }) : [];
       
  7753 }
       
  7754 function useTypographyVariations() {
       
  7755   const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig({
       
  7756     property: 'typography'
       
  7757   });
       
  7758   /*
       
  7759    * Filter out variations with no settings or styles.
       
  7760    */
       
  7761   return typographyVariations?.length ? typographyVariations.filter(variation => {
       
  7762     const {
       
  7763       settings,
       
  7764       styles,
       
  7765       title
       
  7766     } = variation;
       
  7767     return title === (0,external_wp_i18n_namespaceObject.__)('Default') ||
       
  7768     // Always preseve the default variation.
       
  7769     Object.keys(settings).length > 0 || Object.keys(styles).length > 0;
       
  7770   }) : [];
       
  7771 }
       
  7772 
       
  7773 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/set-nested-value.js
       
  7774 /**
       
  7775  * Sets the value at path of object.
       
  7776  * If a portion of path doesn’t exist, it’s created.
       
  7777  * Arrays are created for missing index properties while objects are created
       
  7778  * for all other missing properties.
       
  7779  *
       
  7780  * This function intentionally mutates the input object.
       
  7781  *
       
  7782  * Inspired by _.set().
       
  7783  *
       
  7784  * @see https://lodash.com/docs/4.17.15#set
       
  7785  *
       
  7786  * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`.
       
  7787  *
       
  7788  * @param {Object} object Object to modify
       
  7789  * @param {Array}  path   Path of the property to set.
       
  7790  * @param {*}      value  Value to set.
       
  7791  */
       
  7792 function setNestedValue(object, path, value) {
       
  7793   if (!object || typeof object !== 'object') {
       
  7794     return object;
       
  7795   }
       
  7796   path.reduce((acc, key, idx) => {
       
  7797     if (acc[key] === undefined) {
       
  7798       if (Number.isInteger(path[idx + 1])) {
       
  7799         acc[key] = [];
       
  7800       } else {
       
  7801         acc[key] = {};
       
  7802       }
       
  7803     }
       
  7804     if (idx === path.length - 1) {
       
  7805       acc[key] = value;
       
  7806     }
       
  7807     return acc[key];
       
  7808   }, object);
       
  7809   return object;
       
  7810 }
       
  7811 
       
  7812 ;// CONCATENATED MODULE: external "ReactJSXRuntime"
       
  7813 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
       
  7814 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/push-changes-to-global-styles/index.js
       
  7815 /**
       
  7816  * WordPress dependencies
       
  7817  */
       
  7818 
       
  7819 
       
  7820 
       
  7821 
       
  7822 
       
  7823 
       
  7824 
       
  7825 
       
  7826 
       
  7827 
       
  7828 
       
  7829 /**
       
  7830  * Internal dependencies
       
  7831  */
       
  7832 
       
  7833 
       
  7834 
       
  7835 
       
  7836 
       
  7837 
       
  7838 
       
  7839 const {
       
  7840   cleanEmptyObject,
       
  7841   GlobalStylesContext: push_changes_to_global_styles_GlobalStylesContext
       
  7842 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
  7843 
       
  7844 // Block Gap is a special case and isn't defined within the blocks
       
  7845 // style properties config. We'll add it here to allow it to be pushed
       
  7846 // to global styles as well.
       
  7847 const STYLE_PROPERTY = {
       
  7848   ...external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY,
       
  7849   blockGap: {
       
  7850     value: ['spacing', 'blockGap']
       
  7851   }
       
  7852 };
       
  7853 
       
  7854 // TODO: Temporary duplication of constant in @wordpress/block-editor. Can be
       
  7855 // removed by moving PushChangesToGlobalStylesControl to
       
  7856 // @wordpress/block-editor.
       
  7857 const STYLE_PATH_TO_CSS_VAR_INFIX = {
       
  7858   'border.color': 'color',
       
  7859   'color.background': 'color',
       
  7860   'color.text': 'color',
       
  7861   'elements.link.color.text': 'color',
       
  7862   'elements.link.:hover.color.text': 'color',
       
  7863   'elements.link.typography.fontFamily': 'font-family',
       
  7864   'elements.link.typography.fontSize': 'font-size',
       
  7865   'elements.button.color.text': 'color',
       
  7866   'elements.button.color.background': 'color',
       
  7867   'elements.button.typography.fontFamily': 'font-family',
       
  7868   'elements.button.typography.fontSize': 'font-size',
       
  7869   'elements.caption.color.text': 'color',
       
  7870   'elements.heading.color': 'color',
       
  7871   'elements.heading.color.background': 'color',
       
  7872   'elements.heading.typography.fontFamily': 'font-family',
       
  7873   'elements.heading.gradient': 'gradient',
       
  7874   'elements.heading.color.gradient': 'gradient',
       
  7875   'elements.h1.color': 'color',
       
  7876   'elements.h1.color.background': 'color',
       
  7877   'elements.h1.typography.fontFamily': 'font-family',
       
  7878   'elements.h1.color.gradient': 'gradient',
       
  7879   'elements.h2.color': 'color',
       
  7880   'elements.h2.color.background': 'color',
       
  7881   'elements.h2.typography.fontFamily': 'font-family',
       
  7882   'elements.h2.color.gradient': 'gradient',
       
  7883   'elements.h3.color': 'color',
       
  7884   'elements.h3.color.background': 'color',
       
  7885   'elements.h3.typography.fontFamily': 'font-family',
       
  7886   'elements.h3.color.gradient': 'gradient',
       
  7887   'elements.h4.color': 'color',
       
  7888   'elements.h4.color.background': 'color',
       
  7889   'elements.h4.typography.fontFamily': 'font-family',
       
  7890   'elements.h4.color.gradient': 'gradient',
       
  7891   'elements.h5.color': 'color',
       
  7892   'elements.h5.color.background': 'color',
       
  7893   'elements.h5.typography.fontFamily': 'font-family',
       
  7894   'elements.h5.color.gradient': 'gradient',
       
  7895   'elements.h6.color': 'color',
       
  7896   'elements.h6.color.background': 'color',
       
  7897   'elements.h6.typography.fontFamily': 'font-family',
       
  7898   'elements.h6.color.gradient': 'gradient',
       
  7899   'color.gradient': 'gradient',
       
  7900   blockGap: 'spacing',
       
  7901   'typography.fontSize': 'font-size',
       
  7902   'typography.fontFamily': 'font-family'
       
  7903 };
       
  7904 
       
  7905 // TODO: Temporary duplication of constant in @wordpress/block-editor. Can be
       
  7906 // removed by moving PushChangesToGlobalStylesControl to
       
  7907 // @wordpress/block-editor.
       
  7908 const STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {
       
  7909   'border.color': 'borderColor',
       
  7910   'color.background': 'backgroundColor',
       
  7911   'color.text': 'textColor',
       
  7912   'color.gradient': 'gradient',
       
  7913   'typography.fontSize': 'fontSize',
       
  7914   'typography.fontFamily': 'fontFamily'
       
  7915 };
       
  7916 const SUPPORTED_STYLES = ['border', 'color', 'spacing', 'typography'];
       
  7917 const getValueFromObjectPath = (object, path) => {
       
  7918   let value = object;
       
  7919   path.forEach(fieldName => {
       
  7920     value = value?.[fieldName];
       
  7921   });
       
  7922   return value;
       
  7923 };
       
  7924 const flatBorderProperties = ['borderColor', 'borderWidth', 'borderStyle'];
       
  7925 const sides = ['top', 'right', 'bottom', 'left'];
       
  7926 function getBorderStyleChanges(border, presetColor, userStyle) {
       
  7927   if (!border && !presetColor) {
       
  7928     return [];
       
  7929   }
       
  7930   const changes = [...getFallbackBorderStyleChange('top', border, userStyle), ...getFallbackBorderStyleChange('right', border, userStyle), ...getFallbackBorderStyleChange('bottom', border, userStyle), ...getFallbackBorderStyleChange('left', border, userStyle)];
       
  7931 
       
  7932   // Handle a flat border i.e. all sides the same, CSS shorthand.
       
  7933   const {
       
  7934     color: customColor,
       
  7935     style,
       
  7936     width
       
  7937   } = border || {};
       
  7938   const hasColorOrWidth = presetColor || customColor || width;
       
  7939   if (hasColorOrWidth && !style) {
       
  7940     // Global Styles need individual side configurations to overcome
       
  7941     // theme.json configurations which are per side as well.
       
  7942     sides.forEach(side => {
       
  7943       // Only add fallback border-style if global styles don't already
       
  7944       // have something set.
       
  7945       if (!userStyle?.[side]?.style) {
       
  7946         changes.push({
       
  7947           path: ['border', side, 'style'],
       
  7948           value: 'solid'
       
  7949         });
       
  7950       }
       
  7951     });
       
  7952   }
       
  7953   return changes;
       
  7954 }
       
  7955 function getFallbackBorderStyleChange(side, border, globalBorderStyle) {
       
  7956   if (!border?.[side] || globalBorderStyle?.[side]?.style) {
       
  7957     return [];
       
  7958   }
       
  7959   const {
       
  7960     color,
       
  7961     style,
       
  7962     width
       
  7963   } = border[side];
       
  7964   const hasColorOrWidth = color || width;
       
  7965   if (!hasColorOrWidth || style) {
       
  7966     return [];
       
  7967   }
       
  7968   return [{
       
  7969     path: ['border', side, 'style'],
       
  7970     value: 'solid'
       
  7971   }];
       
  7972 }
       
  7973 function useChangesToPush(name, attributes, userConfig) {
       
  7974   const supports = useSupportedStyles(name);
       
  7975   const blockUserConfig = userConfig?.styles?.blocks?.[name];
       
  7976   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  7977     const changes = supports.flatMap(key => {
       
  7978       if (!STYLE_PROPERTY[key]) {
       
  7979         return [];
       
  7980       }
       
  7981       const {
       
  7982         value: path
       
  7983       } = STYLE_PROPERTY[key];
       
  7984       const presetAttributeKey = path.join('.');
       
  7985       const presetAttributeValue = attributes[STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[presetAttributeKey]];
       
  7986       const value = presetAttributeValue ? `var:preset|${STYLE_PATH_TO_CSS_VAR_INFIX[presetAttributeKey]}|${presetAttributeValue}` : getValueFromObjectPath(attributes.style, path);
       
  7987 
       
  7988       // Links only have a single support entry but have two element
       
  7989       // style properties, color and hover color. The following check
       
  7990       // will add the hover color to the changes if required.
       
  7991       if (key === 'linkColor') {
       
  7992         const linkChanges = value ? [{
       
  7993           path,
       
  7994           value
       
  7995         }] : [];
       
  7996         const hoverPath = ['elements', 'link', ':hover', 'color', 'text'];
       
  7997         const hoverValue = getValueFromObjectPath(attributes.style, hoverPath);
       
  7998         if (hoverValue) {
       
  7999           linkChanges.push({
       
  8000             path: hoverPath,
       
  8001             value: hoverValue
       
  8002           });
       
  8003         }
       
  8004         return linkChanges;
       
  8005       }
       
  8006 
       
  8007       // The shorthand border styles can't be mapped directly as global
       
  8008       // styles requires longhand config.
       
  8009       if (flatBorderProperties.includes(key) && value) {
       
  8010         // The shorthand config path is included to clear the block attribute.
       
  8011         const borderChanges = [{
       
  8012           path,
       
  8013           value
       
  8014         }];
       
  8015         sides.forEach(side => {
       
  8016           const currentPath = [...path];
       
  8017           currentPath.splice(-1, 0, side);
       
  8018           borderChanges.push({
       
  8019             path: currentPath,
       
  8020             value
       
  8021           });
       
  8022         });
       
  8023         return borderChanges;
       
  8024       }
       
  8025       return value ? [{
       
  8026         path,
       
  8027         value
       
  8028       }] : [];
       
  8029     });
       
  8030 
       
  8031     // To ensure display of a visible border, global styles require a
       
  8032     // default border style if a border color or width is present.
       
  8033     getBorderStyleChanges(attributes.style?.border, attributes.borderColor, blockUserConfig?.border).forEach(change => changes.push(change));
       
  8034     return changes;
       
  8035   }, [supports, attributes, blockUserConfig]);
       
  8036 }
       
  8037 function PushChangesToGlobalStylesControl({
       
  8038   name,
       
  8039   attributes,
       
  8040   setAttributes
       
  8041 }) {
       
  8042   const {
       
  8043     user: userConfig,
       
  8044     setUserConfig
       
  8045   } = (0,external_wp_element_namespaceObject.useContext)(push_changes_to_global_styles_GlobalStylesContext);
       
  8046   const changes = useChangesToPush(name, attributes, userConfig);
       
  8047   const {
       
  8048     __unstableMarkNextChangeAsNotPersistent
       
  8049   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
  8050   const {
       
  8051     createSuccessNotice
       
  8052   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
  8053   const pushChanges = (0,external_wp_element_namespaceObject.useCallback)(() => {
       
  8054     if (changes.length === 0) {
       
  8055       return;
       
  8056     }
       
  8057     if (changes.length > 0) {
       
  8058       const {
       
  8059         style: blockStyles
       
  8060       } = attributes;
       
  8061       const newBlockStyles = cloneDeep(blockStyles);
       
  8062       const newUserConfig = cloneDeep(userConfig);
       
  8063       for (const {
       
  8064         path,
       
  8065         value
       
  8066       } of changes) {
       
  8067         setNestedValue(newBlockStyles, path, undefined);
       
  8068         setNestedValue(newUserConfig, ['styles', 'blocks', name, ...path], value);
       
  8069       }
       
  8070       const newBlockAttributes = {
       
  8071         borderColor: undefined,
       
  8072         backgroundColor: undefined,
       
  8073         textColor: undefined,
       
  8074         gradient: undefined,
       
  8075         fontSize: undefined,
       
  8076         fontFamily: undefined,
       
  8077         style: cleanEmptyObject(newBlockStyles)
       
  8078       };
       
  8079 
       
  8080       // @wordpress/core-data doesn't support editing multiple entity types in
       
  8081       // a single undo level. So for now, we disable @wordpress/core-data undo
       
  8082       // tracking and implement our own Undo button in the snackbar
       
  8083       // notification.
       
  8084       __unstableMarkNextChangeAsNotPersistent();
       
  8085       setAttributes(newBlockAttributes);
       
  8086       setUserConfig(newUserConfig, {
       
  8087         undoIgnore: true
       
  8088       });
       
  8089       createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
       
  8090       // translators: %s: Title of the block e.g. 'Heading'.
       
  8091       (0,external_wp_i18n_namespaceObject.__)('%s styles applied.'), (0,external_wp_blocks_namespaceObject.getBlockType)(name).title), {
       
  8092         type: 'snackbar',
       
  8093         actions: [{
       
  8094           label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
       
  8095           onClick() {
       
  8096             __unstableMarkNextChangeAsNotPersistent();
       
  8097             setAttributes(attributes);
       
  8098             setUserConfig(userConfig, {
       
  8099               undoIgnore: true
       
  8100             });
       
  8101           }
       
  8102         }]
       
  8103       });
       
  8104     }
       
  8105   }, [__unstableMarkNextChangeAsNotPersistent, attributes, changes, createSuccessNotice, name, setAttributes, setUserConfig, userConfig]);
       
  8106   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BaseControl, {
       
  8107     className: "edit-site-push-changes-to-global-styles-control",
       
  8108     help: (0,external_wp_i18n_namespaceObject.sprintf)(
       
  8109     // translators: %s: Title of the block e.g. 'Heading'.
       
  8110     (0,external_wp_i18n_namespaceObject.__)('Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks.'), (0,external_wp_blocks_namespaceObject.getBlockType)(name).title),
       
  8111     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
       
  8112       children: (0,external_wp_i18n_namespaceObject.__)('Styles')
       
  8113     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
  8114       __next40pxDefaultSize: true,
       
  8115       variant: "secondary",
       
  8116       __experimentalIsFocusable: true,
       
  8117       disabled: changes.length === 0,
       
  8118       onClick: pushChanges,
       
  8119       children: (0,external_wp_i18n_namespaceObject.__)('Apply globally')
       
  8120     })]
       
  8121   });
       
  8122 }
       
  8123 function PushChangesToGlobalStyles(props) {
       
  8124   const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
       
  8125   const isBlockBasedTheme = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.is_block_theme, []);
       
  8126   const supportsStyles = SUPPORTED_STYLES.some(feature => (0,external_wp_blocks_namespaceObject.hasBlockSupport)(props.name, feature));
       
  8127   const isDisplayed = blockEditingMode === 'default' && supportsStyles && isBlockBasedTheme;
       
  8128   if (!isDisplayed) {
       
  8129     return null;
       
  8130   }
       
  8131   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorAdvancedControls, {
       
  8132     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PushChangesToGlobalStylesControl, {
       
  8133       ...props
       
  8134     })
       
  8135   });
       
  8136 }
       
  8137 const withPushChangesToGlobalStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
  8138   children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, {
       
  8139     ...props
       
  8140   }), props.isSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PushChangesToGlobalStyles, {
       
  8141     ...props
       
  8142   })]
       
  8143 }));
       
  8144 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/edit-site/push-changes-to-global-styles', withPushChangesToGlobalStyles);
  1118 
  8145 
  1119 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/index.js
  8146 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/index.js
  1120 /**
  8147 /**
  1121  * Internal dependencies
  8148  * Internal dependencies
  1122  */
  8149  */
  1123 
  8150 
  1124 
  8151 
  1125 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/constants.js
  8152 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/reducer.js
  1126 /**
       
  1127  * The identifier for the data store.
       
  1128  *
       
  1129  * @type {string}
       
  1130  */
       
  1131 const STORE_NAME = 'core/edit-site';
       
  1132 const TEMPLATE_PART_AREA_HEADER = 'header';
       
  1133 const TEMPLATE_PART_AREA_FOOTER = 'footer';
       
  1134 const TEMPLATE_PART_AREA_SIDEBAR = 'sidebar';
       
  1135 const TEMPLATE_PART_AREA_GENERAL = 'uncategorized';
       
  1136 
       
  1137 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-panel/constants.js
       
  1138 /**
  8153 /**
  1139  * WordPress dependencies
  8154  * WordPress dependencies
  1140  */
  8155  */
  1141 
  8156 
  1142 /**
  8157 
  1143  * Internal dependencies
       
  1144  */
       
  1145 
       
  1146 
       
  1147 const TEMPLATES_PRIMARY = ['index', 'singular', 'archive', 'single', 'page', 'home', '404', 'search'];
       
  1148 const TEMPLATES_SECONDARY = ['author', 'category', 'taxonomy', 'date', 'tag', 'attachment', 'single-post', 'front-page'];
       
  1149 const TEMPLATES_TOP_LEVEL = [...TEMPLATES_PRIMARY, ...TEMPLATES_SECONDARY];
       
  1150 const TEMPLATES_GENERAL = ['page-home'];
       
  1151 const TEMPLATES_POSTS_PREFIXES = ['post-', 'author-', 'single-post-', 'tag-'];
       
  1152 const TEMPLATES_PAGES_PREFIXES = ['page-'];
       
  1153 const TEMPLATE_OVERRIDES = {
       
  1154   singular: ['single', 'page'],
       
  1155   index: ['archive', '404', 'search', 'singular', 'home'],
       
  1156   home: ['front-page']
       
  1157 };
       
  1158 const MENU_ROOT = 'root';
       
  1159 const MENU_TEMPLATE_PARTS = 'template-parts';
       
  1160 const MENU_TEMPLATES = 'templates';
       
  1161 const MENU_TEMPLATES_GENERAL = 'templates-general';
       
  1162 const MENU_TEMPLATES_PAGES = 'templates-pages';
       
  1163 const MENU_TEMPLATES_POSTS = 'templates-posts';
       
  1164 const MENU_TEMPLATES_UNUSED = 'templates-unused';
       
  1165 const MENU_TEMPLATE_PARTS_HEADERS = 'template-parts-headers';
       
  1166 const MENU_TEMPLATE_PARTS_FOOTERS = 'template-parts-footers';
       
  1167 const MENU_TEMPLATE_PARTS_SIDEBARS = 'template-parts-sidebars';
       
  1168 const MENU_TEMPLATE_PARTS_GENERAL = 'template-parts-general';
       
  1169 const TEMPLATE_PARTS_SUB_MENUS = [{
       
  1170   area: TEMPLATE_PART_AREA_HEADER,
       
  1171   menu: MENU_TEMPLATE_PARTS_HEADERS,
       
  1172   title: (0,external_wp_i18n_namespaceObject.__)('headers')
       
  1173 }, {
       
  1174   area: TEMPLATE_PART_AREA_FOOTER,
       
  1175   menu: MENU_TEMPLATE_PARTS_FOOTERS,
       
  1176   title: (0,external_wp_i18n_namespaceObject.__)('footers')
       
  1177 }, {
       
  1178   area: TEMPLATE_PART_AREA_SIDEBAR,
       
  1179   menu: MENU_TEMPLATE_PARTS_SIDEBARS,
       
  1180   title: (0,external_wp_i18n_namespaceObject.__)('sidebars')
       
  1181 }, {
       
  1182   area: TEMPLATE_PART_AREA_GENERAL,
       
  1183   menu: MENU_TEMPLATE_PARTS_GENERAL,
       
  1184   title: (0,external_wp_i18n_namespaceObject.__)('general')
       
  1185 }];
       
  1186 
       
  1187 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/reducer.js
       
  1188 /**
       
  1189  * WordPress dependencies
       
  1190  */
       
  1191 
       
  1192 /**
       
  1193  * Internal dependencies
       
  1194  */
       
  1195 
       
  1196 
       
  1197 /**
       
  1198  * Reducer returning the editing canvas device type.
       
  1199  *
       
  1200  * @param {Object} state  Current state.
       
  1201  * @param {Object} action Dispatched action.
       
  1202  *
       
  1203  * @return {Object} Updated state.
       
  1204  */
       
  1205 
       
  1206 function deviceType() {
       
  1207   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Desktop';
       
  1208   let action = arguments.length > 1 ? arguments[1] : undefined;
       
  1209 
       
  1210   switch (action.type) {
       
  1211     case 'SET_PREVIEW_DEVICE_TYPE':
       
  1212       return action.deviceType;
       
  1213   }
       
  1214 
       
  1215   return state;
       
  1216 }
       
  1217 /**
  8158 /**
  1218  * Reducer returning the settings.
  8159  * Reducer returning the settings.
  1219  *
  8160  *
  1220  * @param {Object} state  Current state.
  8161  * @param {Object} state  Current state.
  1221  * @param {Object} action Dispatched action.
  8162  * @param {Object} action Dispatched action.
  1222  *
  8163  *
  1223  * @return {Object} Updated state.
  8164  * @return {Object} Updated state.
  1224  */
  8165  */
  1225 
  8166 function settings(state = {}, action) {
  1226 function settings() {
       
  1227   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  1228   let action = arguments.length > 1 ? arguments[1] : undefined;
       
  1229 
       
  1230   switch (action.type) {
  8167   switch (action.type) {
  1231     case 'UPDATE_SETTINGS':
  8168     case 'UPDATE_SETTINGS':
  1232       return { ...state,
  8169       return {
       
  8170         ...state,
  1233         ...action.settings
  8171         ...action.settings
  1234       };
  8172       };
  1235   }
  8173   }
  1236 
       
  1237   return state;
  8174   return state;
  1238 }
  8175 }
       
  8176 
  1239 /**
  8177 /**
  1240  * Reducer keeping track of the currently edited Post Type,
  8178  * Reducer keeping track of the currently edited Post Type,
  1241  * Post Id and the context provided to fill the content of the block editor.
  8179  * Post Id and the context provided to fill the content of the block editor.
  1242  *
  8180  *
  1243  * @param {Object} state  Current edited post.
  8181  * @param {Object} state  Current edited post.
  1244  * @param {Object} action Dispatched action.
  8182  * @param {Object} action Dispatched action.
  1245  *
  8183  *
  1246  * @return {Object} Updated state.
  8184  * @return {Object} Updated state.
  1247  */
  8185  */
  1248 
  8186 function editedPost(state = {}, action) {
  1249 function editedPost() {
       
  1250   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  1251   let action = arguments.length > 1 ? arguments[1] : undefined;
       
  1252 
       
  1253   switch (action.type) {
  8187   switch (action.type) {
  1254     case 'SET_TEMPLATE':
  8188     case 'SET_EDITED_POST':
  1255     case 'SET_PAGE':
       
  1256       return {
  8189       return {
  1257         type: 'wp_template',
  8190         postType: action.postType,
  1258         id: action.templateId,
  8191         id: action.id,
  1259         page: action.page
  8192         context: action.context
  1260       };
  8193       };
  1261 
  8194     case 'SET_EDITED_POST_CONTEXT':
  1262     case 'SET_TEMPLATE_PART':
       
  1263       return {
  8195       return {
  1264         type: 'wp_template_part',
  8196         ...state,
  1265         id: action.templatePartId
  8197         context: action.context
  1266       };
  8198       };
  1267   }
  8199   }
  1268 
       
  1269   return state;
  8200   return state;
  1270 }
  8201 }
  1271 /**
  8202 
  1272  * Reducer for information about the site's homepage.
  8203 /**
       
  8204  * Reducer to set the save view panel open or closed.
  1273  *
  8205  *
  1274  * @param {Object} state  Current state.
  8206  * @param {Object} state  Current state.
  1275  * @param {Object} action Dispatched action.
  8207  * @param {Object} action Dispatched action.
  1276  *
  8208  */
  1277  * @return {Object} Updated state.
  8209 function saveViewPanel(state = false, action) {
  1278  */
       
  1279 
       
  1280 function homeTemplateId(state, action) {
       
  1281   switch (action.type) {
  8210   switch (action.type) {
  1282     case 'SET_HOME_TEMPLATE':
  8211     case 'SET_IS_SAVE_VIEW_OPENED':
  1283       return action.homeTemplateId;
  8212       return action.isOpen;
       
  8213     case 'SET_CANVAS_MODE':
       
  8214       return false;
  1284   }
  8215   }
  1285 
       
  1286   return state;
  8216   return state;
  1287 }
  8217 }
  1288 /**
  8218 
  1289  * Reducer for information about the navigation panel, such as its active menu
  8219 /**
  1290  * and whether it should be opened or closed.
  8220  * Reducer used to track the site editor canvas mode (edit or view).
  1291  *
       
  1292  * Note: this reducer interacts with the inserter and list view panels reducers
       
  1293  * to make sure that only one of the three panels is open at the same time.
       
  1294  *
  8221  *
  1295  * @param {Object} state  Current state.
  8222  * @param {Object} state  Current state.
  1296  * @param {Object} action Dispatched action.
  8223  * @param {Object} action Dispatched action.
  1297  */
  8224  */
  1298 
  8225 function canvasMode(state = 'init', action) {
  1299 function navigationPanel() {
       
  1300   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
       
  1301     menu: MENU_ROOT,
       
  1302     isOpen: false
       
  1303   };
       
  1304   let action = arguments.length > 1 ? arguments[1] : undefined;
       
  1305 
       
  1306   switch (action.type) {
  8226   switch (action.type) {
  1307     case 'SET_NAVIGATION_PANEL_ACTIVE_MENU':
  8227     case 'SET_CANVAS_MODE':
  1308       return { ...state,
  8228       return action.mode;
  1309         menu: action.menu
       
  1310       };
       
  1311 
       
  1312     case 'OPEN_NAVIGATION_PANEL_TO_MENU':
       
  1313       return { ...state,
       
  1314         isOpen: true,
       
  1315         menu: action.menu
       
  1316       };
       
  1317 
       
  1318     case 'SET_IS_NAVIGATION_PANEL_OPENED':
       
  1319       return { ...state,
       
  1320         menu: !action.isOpen ? MENU_ROOT : state.menu,
       
  1321         // Set menu to root when closing panel.
       
  1322         isOpen: action.isOpen
       
  1323       };
       
  1324 
       
  1325     case 'SET_IS_LIST_VIEW_OPENED':
       
  1326       return { ...state,
       
  1327         menu: state.isOpen && action.isOpen ? MENU_ROOT : state.menu,
       
  1328         // Set menu to root when closing panel.
       
  1329         isOpen: action.isOpen ? false : state.isOpen
       
  1330       };
       
  1331 
       
  1332     case 'SET_IS_INSERTER_OPENED':
       
  1333       return { ...state,
       
  1334         menu: state.isOpen && action.value ? MENU_ROOT : state.menu,
       
  1335         // Set menu to root when closing panel.
       
  1336         isOpen: action.value ? false : state.isOpen
       
  1337       };
       
  1338   }
  8229   }
  1339 
       
  1340   return state;
  8230   return state;
  1341 }
  8231 }
  1342 /**
  8232 
  1343  * Reducer to set the block inserter panel open or closed.
  8233 /**
       
  8234  * Reducer used to track the site editor canvas container view.
       
  8235  * Default is `undefined`, denoting the default, visual block editor.
       
  8236  * This could be, for example, `'style-book'` (the style book).
  1344  *
  8237  *
  1345  * Note: this reducer interacts with the navigation and list view panels reducers
  8238  * @param {string|undefined} state  Current state.
  1346  * to make sure that only one of the three panels is open at the same time.
  8239  * @param {Object}           action Dispatched action.
  1347  *
  8240  */
  1348  * @param {boolean|Object} state  Current state.
  8241 function editorCanvasContainerView(state = undefined, action) {
  1349  * @param {Object}         action Dispatched action.
       
  1350  */
       
  1351 
       
  1352 function blockInserterPanel() {
       
  1353   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
  1354   let action = arguments.length > 1 ? arguments[1] : undefined;
       
  1355 
       
  1356   switch (action.type) {
  8242   switch (action.type) {
  1357     case 'OPEN_NAVIGATION_PANEL_TO_MENU':
  8243     case 'SET_EDITOR_CANVAS_CONTAINER_VIEW':
  1358       return false;
  8244       return action.view;
  1359 
       
  1360     case 'SET_IS_NAVIGATION_PANEL_OPENED':
       
  1361     case 'SET_IS_LIST_VIEW_OPENED':
       
  1362       return action.isOpen ? false : state;
       
  1363 
       
  1364     case 'SET_IS_INSERTER_OPENED':
       
  1365       return action.value;
       
  1366   }
  8245   }
  1367 
       
  1368   return state;
  8246   return state;
  1369 }
  8247 }
  1370 /**
  8248 /* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
  1371  * Reducer to set the list view panel open or closed.
       
  1372  *
       
  1373  * Note: this reducer interacts with the navigation and inserter panels reducers
       
  1374  * to make sure that only one of the three panels is open at the same time.
       
  1375  *
       
  1376  * @param {Object} state  Current state.
       
  1377  * @param {Object} action Dispatched action.
       
  1378  */
       
  1379 
       
  1380 function listViewPanel() {
       
  1381   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
  1382   let action = arguments.length > 1 ? arguments[1] : undefined;
       
  1383 
       
  1384   switch (action.type) {
       
  1385     case 'OPEN_NAVIGATION_PANEL_TO_MENU':
       
  1386       return false;
       
  1387 
       
  1388     case 'SET_IS_NAVIGATION_PANEL_OPENED':
       
  1389       return action.isOpen ? false : state;
       
  1390 
       
  1391     case 'SET_IS_INSERTER_OPENED':
       
  1392       return action.value ? false : state;
       
  1393 
       
  1394     case 'SET_IS_LIST_VIEW_OPENED':
       
  1395       return action.isOpen;
       
  1396   }
       
  1397 
       
  1398   return state;
       
  1399 }
       
  1400 /* harmony default export */ var reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
       
  1401   deviceType,
       
  1402   settings,
  8249   settings,
  1403   editedPost,
  8250   editedPost,
  1404   homeTemplateId,
  8251   saveViewPanel,
  1405   navigationPanel,
  8252   canvasMode,
  1406   blockInserterPanel,
  8253   editorCanvasContainerView
  1407   listViewPanel
       
  1408 }));
  8254 }));
  1409 
  8255 
  1410 ;// CONCATENATED MODULE: external ["wp","apiFetch"]
  8256 ;// CONCATENATED MODULE: external ["wp","patterns"]
  1411 var external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
  8257 const external_wp_patterns_namespaceObject = window["wp"]["patterns"];
  1412 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
  8258 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/constants.js
  1413 ;// CONCATENATED MODULE: external ["wp","deprecated"]
       
  1414 var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
       
  1415 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
       
  1416 ;// CONCATENATED MODULE: external ["wp","notices"]
       
  1417 var external_wp_notices_namespaceObject = window["wp"]["notices"];
       
  1418 ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
       
  1419 function extends_extends() {
       
  1420   extends_extends = Object.assign ? Object.assign.bind() : function (target) {
       
  1421     for (var i = 1; i < arguments.length; i++) {
       
  1422       var source = arguments[i];
       
  1423 
       
  1424       for (var key in source) {
       
  1425         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
  1426           target[key] = source[key];
       
  1427         }
       
  1428       }
       
  1429     }
       
  1430 
       
  1431     return target;
       
  1432   };
       
  1433   return extends_extends.apply(this, arguments);
       
  1434 }
       
  1435 // EXTERNAL MODULE: ./node_modules/classnames/index.js
       
  1436 var classnames = __webpack_require__(4403);
       
  1437 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
       
  1438 ;// CONCATENATED MODULE: external ["wp","components"]
       
  1439 var external_wp_components_namespaceObject = window["wp"]["components"];
       
  1440 ;// CONCATENATED MODULE: external ["wp","primitives"]
       
  1441 var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
       
  1442 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
       
  1443 
       
  1444 
       
  1445 /**
  8259 /**
  1446  * WordPress dependencies
  8260  * WordPress dependencies
  1447  */
  8261  */
  1448 
  8262 
  1449 const check = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  8263 
  1450   xmlns: "http://www.w3.org/2000/svg",
  8264 
  1451   viewBox: "0 0 24 24"
  8265 /**
  1452 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  8266  * Internal dependencies
  1453   d: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"
  8267  */
  1454 }));
  8268 
  1455 /* harmony default export */ var library_check = (check);
  8269 
  1456 
  8270 // Navigation
  1457 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
  8271 const NAVIGATION_POST_TYPE = 'wp_navigation';
  1458 
  8272 
  1459 
  8273 // Templates.
       
  8274 const TEMPLATE_POST_TYPE = 'wp_template';
       
  8275 const TEMPLATE_PART_POST_TYPE = 'wp_template_part';
       
  8276 const TEMPLATE_ORIGINS = {
       
  8277   custom: 'custom',
       
  8278   theme: 'theme',
       
  8279   plugin: 'plugin'
       
  8280 };
       
  8281 const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';
       
  8282 const TEMPLATE_PART_ALL_AREAS_CATEGORY = 'all-parts';
       
  8283 
       
  8284 // Patterns.
       
  8285 const {
       
  8286   PATTERN_TYPES,
       
  8287   PATTERN_DEFAULT_CATEGORY,
       
  8288   PATTERN_USER_CATEGORY,
       
  8289   EXCLUDED_PATTERN_SOURCES,
       
  8290   PATTERN_SYNC_TYPES
       
  8291 } = lock_unlock_unlock(external_wp_patterns_namespaceObject.privateApis);
       
  8292 
       
  8293 // Entities that are editable in focus mode.
       
  8294 const FOCUSABLE_ENTITIES = [TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE, PATTERN_TYPES.user];
       
  8295 const POST_TYPE_LABELS = {
       
  8296   [TEMPLATE_POST_TYPE]: (0,external_wp_i18n_namespaceObject.__)('Template'),
       
  8297   [TEMPLATE_PART_POST_TYPE]: (0,external_wp_i18n_namespaceObject.__)('Template part'),
       
  8298   [PATTERN_TYPES.user]: (0,external_wp_i18n_namespaceObject.__)('Pattern'),
       
  8299   [NAVIGATION_POST_TYPE]: (0,external_wp_i18n_namespaceObject.__)('Navigation')
       
  8300 };
       
  8301 
       
  8302 // DataViews constants
       
  8303 const LAYOUT_GRID = 'grid';
       
  8304 const LAYOUT_TABLE = 'table';
       
  8305 const LAYOUT_LIST = 'list';
       
  8306 const OPERATOR_IS = 'is';
       
  8307 const OPERATOR_IS_NOT = 'isNot';
       
  8308 const OPERATOR_IS_ANY = 'isAny';
       
  8309 const OPERATOR_IS_NONE = 'isNone';
       
  8310 
       
  8311 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/actions.js
  1460 /**
  8312 /**
  1461  * WordPress dependencies
  8313  * WordPress dependencies
  1462  */
  8314  */
  1463 
  8315 
  1464 const starFilled = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  8316 
  1465   xmlns: "http://www.w3.org/2000/svg",
  8317 
  1466   viewBox: "0 0 24 24"
  8318 
  1467 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  8319 
  1468   d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
  8320 
  1469 }));
       
  1470 /* harmony default export */ var star_filled = (starFilled);
       
  1471 
       
  1472 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
       
  1473 
       
  1474 
       
  1475 /**
       
  1476  * WordPress dependencies
       
  1477  */
       
  1478 
       
  1479 const starEmpty = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  1480   xmlns: "http://www.w3.org/2000/svg",
       
  1481   viewBox: "0 0 24 24"
       
  1482 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  1483   fillRule: "evenodd",
       
  1484   d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",
       
  1485   clipRule: "evenodd"
       
  1486 }));
       
  1487 /* harmony default export */ var star_empty = (starEmpty);
       
  1488 
       
  1489 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
       
  1490 
       
  1491 
       
  1492 /**
       
  1493  * WordPress dependencies
       
  1494  */
       
  1495 
       
  1496 const closeSmall = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  1497   xmlns: "http://www.w3.org/2000/svg",
       
  1498   viewBox: "0 0 24 24"
       
  1499 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  1500   d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
       
  1501 }));
       
  1502 /* harmony default export */ var close_small = (closeSmall);
       
  1503 
       
  1504 ;// CONCATENATED MODULE: external "lodash"
       
  1505 var external_lodash_namespaceObject = window["lodash"];
       
  1506 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
       
  1507 /**
       
  1508  * WordPress dependencies
       
  1509  */
       
  1510 
       
  1511 
       
  1512 /**
       
  1513  * Enable the complementary area.
       
  1514  *
       
  1515  * @param {string} scope Complementary area scope.
       
  1516  * @param {string} area  Area identifier.
       
  1517  */
       
  1518 
       
  1519 const enableComplementaryArea = (scope, area) => _ref => {
       
  1520   let {
       
  1521     registry
       
  1522   } = _ref;
       
  1523 
       
  1524   // Return early if there's no area.
       
  1525   if (!area) {
       
  1526     return;
       
  1527   }
       
  1528 
       
  1529   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', area);
       
  1530 };
       
  1531 /**
       
  1532  * Disable the complementary area.
       
  1533  *
       
  1534  * @param {string} scope Complementary area scope.
       
  1535  */
       
  1536 
       
  1537 const disableComplementaryArea = scope => _ref2 => {
       
  1538   let {
       
  1539     registry
       
  1540   } = _ref2;
       
  1541   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', null);
       
  1542 };
       
  1543 /**
       
  1544  * Pins an item.
       
  1545  *
       
  1546  * @param {string} scope Item scope.
       
  1547  * @param {string} item  Item identifier.
       
  1548  *
       
  1549  * @return {Object} Action object.
       
  1550  */
       
  1551 
       
  1552 const pinItem = (scope, item) => _ref3 => {
       
  1553   let {
       
  1554     registry
       
  1555   } = _ref3;
       
  1556 
       
  1557   // Return early if there's no item.
       
  1558   if (!item) {
       
  1559     return;
       
  1560   }
       
  1561 
       
  1562   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems'); // The item is already pinned, there's nothing to do.
       
  1563 
       
  1564   if ((pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) === true) {
       
  1565     return;
       
  1566   }
       
  1567 
       
  1568   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems,
       
  1569     [item]: true
       
  1570   });
       
  1571 };
       
  1572 /**
       
  1573  * Unpins an item.
       
  1574  *
       
  1575  * @param {string} scope Item scope.
       
  1576  * @param {string} item  Item identifier.
       
  1577  */
       
  1578 
       
  1579 const unpinItem = (scope, item) => _ref4 => {
       
  1580   let {
       
  1581     registry
       
  1582   } = _ref4;
       
  1583 
       
  1584   // Return early if there's no item.
       
  1585   if (!item) {
       
  1586     return;
       
  1587   }
       
  1588 
       
  1589   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
       
  1590   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems,
       
  1591     [item]: false
       
  1592   });
       
  1593 };
       
  1594 /**
       
  1595  * Returns an action object used in signalling that a feature should be toggled.
       
  1596  *
       
  1597  * @param {string} scope       The feature scope (e.g. core/edit-post).
       
  1598  * @param {string} featureName The feature name.
       
  1599  */
       
  1600 
       
  1601 function toggleFeature(scope, featureName) {
       
  1602   return function (_ref5) {
       
  1603     let {
       
  1604       registry
       
  1605     } = _ref5;
       
  1606     external_wp_deprecated_default()(`dispatch( 'core/interface' ).toggleFeature`, {
       
  1607       since: '6.0',
       
  1608       alternative: `dispatch( 'core/preferences' ).toggle`
       
  1609     });
       
  1610     registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(scope, featureName);
       
  1611   };
       
  1612 }
       
  1613 /**
       
  1614  * Returns an action object used in signalling that a feature should be set to
       
  1615  * a true or false value
       
  1616  *
       
  1617  * @param {string}  scope       The feature scope (e.g. core/edit-post).
       
  1618  * @param {string}  featureName The feature name.
       
  1619  * @param {boolean} value       The value to set.
       
  1620  *
       
  1621  * @return {Object} Action object.
       
  1622  */
       
  1623 
       
  1624 function setFeatureValue(scope, featureName, value) {
       
  1625   return function (_ref6) {
       
  1626     let {
       
  1627       registry
       
  1628     } = _ref6;
       
  1629     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureValue`, {
       
  1630       since: '6.0',
       
  1631       alternative: `dispatch( 'core/preferences' ).set`
       
  1632     });
       
  1633     registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, featureName, !!value);
       
  1634   };
       
  1635 }
       
  1636 /**
       
  1637  * Returns an action object used in signalling that defaults should be set for features.
       
  1638  *
       
  1639  * @param {string}                  scope    The feature scope (e.g. core/edit-post).
       
  1640  * @param {Object<string, boolean>} defaults A key/value map of feature names to values.
       
  1641  *
       
  1642  * @return {Object} Action object.
       
  1643  */
       
  1644 
       
  1645 function setFeatureDefaults(scope, defaults) {
       
  1646   return function (_ref7) {
       
  1647     let {
       
  1648       registry
       
  1649     } = _ref7;
       
  1650     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureDefaults`, {
       
  1651       since: '6.0',
       
  1652       alternative: `dispatch( 'core/preferences' ).setDefaults`
       
  1653     });
       
  1654     registry.dispatch(external_wp_preferences_namespaceObject.store).setDefaults(scope, defaults);
       
  1655   };
       
  1656 }
       
  1657 
       
  1658 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
       
  1659 /**
       
  1660  * WordPress dependencies
       
  1661  */
       
  1662 
       
  1663 
       
  1664 
       
  1665 /**
       
  1666  * Returns the complementary area that is active in a given scope.
       
  1667  *
       
  1668  * @param {Object} state Global application state.
       
  1669  * @param {string} scope Item scope.
       
  1670  *
       
  1671  * @return {string} The complementary area that is active in the given scope.
       
  1672  */
       
  1673 
       
  1674 const getActiveComplementaryArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
       
  1675   return select(external_wp_preferences_namespaceObject.store).get(scope, 'complementaryArea');
       
  1676 });
       
  1677 /**
       
  1678  * Returns a boolean indicating if an item is pinned or not.
       
  1679  *
       
  1680  * @param {Object} state Global application state.
       
  1681  * @param {string} scope Scope.
       
  1682  * @param {string} item  Item to check.
       
  1683  *
       
  1684  * @return {boolean} True if the item is pinned and false otherwise.
       
  1685  */
       
  1686 
       
  1687 const isItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, item) => {
       
  1688   var _pinnedItems$item;
       
  1689 
       
  1690   const pinnedItems = select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
       
  1691   return (_pinnedItems$item = pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
       
  1692 });
       
  1693 /**
       
  1694  * Returns a boolean indicating whether a feature is active for a particular
       
  1695  * scope.
       
  1696  *
       
  1697  * @param {Object} state       The store state.
       
  1698  * @param {string} scope       The scope of the feature (e.g. core/edit-post).
       
  1699  * @param {string} featureName The name of the feature.
       
  1700  *
       
  1701  * @return {boolean} Is the feature enabled?
       
  1702  */
       
  1703 
       
  1704 const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, featureName) => {
       
  1705   external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
       
  1706     since: '6.0',
       
  1707     alternative: `select( 'core/preferences' ).get( scope, featureName )`
       
  1708   });
       
  1709   return !!select(external_wp_preferences_namespaceObject.store).get(scope, featureName);
       
  1710 });
       
  1711 
       
  1712 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
       
  1713 /**
       
  1714  * The identifier for the data store.
       
  1715  *
       
  1716  * @type {string}
       
  1717  */
       
  1718 const constants_STORE_NAME = 'core/interface';
       
  1719 
       
  1720 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
       
  1721 /**
       
  1722  * WordPress dependencies
       
  1723  */
       
  1724 
  8321 
  1725 /**
  8322 /**
  1726  * Internal dependencies
  8323  * Internal dependencies
  1727  */
  8324  */
  1728 
  8325 
  1729 
  8326 
  1730 
  8327 const {
  1731 
  8328   interfaceStore
  1732 /**
  8329 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
  1733  * Store definition for the interface namespace.
       
  1734  *
       
  1735  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
       
  1736  *
       
  1737  * @type {Object}
       
  1738  */
       
  1739 
       
  1740 const store = (0,external_wp_data_namespaceObject.createReduxStore)(constants_STORE_NAME, {
       
  1741   reducer: () => {},
       
  1742   actions: actions_namespaceObject,
       
  1743   selectors: selectors_namespaceObject
       
  1744 }); // Once we build a more generic persistence plugin that works across types of stores
       
  1745 // we'd be able to replace this with a register call.
       
  1746 
       
  1747 (0,external_wp_data_namespaceObject.register)(store);
       
  1748 
       
  1749 ;// CONCATENATED MODULE: external ["wp","plugins"]
       
  1750 var external_wp_plugins_namespaceObject = window["wp"]["plugins"];
       
  1751 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js
       
  1752 /**
       
  1753  * WordPress dependencies
       
  1754  */
       
  1755 
       
  1756 /* harmony default export */ var complementary_area_context = ((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => {
       
  1757   return {
       
  1758     icon: ownProps.icon || context.icon,
       
  1759     identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
       
  1760   };
       
  1761 }));
       
  1762 
       
  1763 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js
       
  1764 
       
  1765 
       
  1766 
       
  1767 /**
       
  1768  * External dependencies
       
  1769  */
       
  1770 
       
  1771 /**
       
  1772  * WordPress dependencies
       
  1773  */
       
  1774 
       
  1775 
       
  1776 
       
  1777 /**
       
  1778  * Internal dependencies
       
  1779  */
       
  1780 
       
  1781 
       
  1782 
       
  1783 
       
  1784 function ComplementaryAreaToggle(_ref) {
       
  1785   let {
       
  1786     as = external_wp_components_namespaceObject.Button,
       
  1787     scope,
       
  1788     identifier,
       
  1789     icon,
       
  1790     selectedIcon,
       
  1791     ...props
       
  1792   } = _ref;
       
  1793   const ComponentToUse = as;
       
  1794   const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier]);
       
  1795   const {
       
  1796     enableComplementaryArea,
       
  1797     disableComplementaryArea
       
  1798   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
  1799   return (0,external_wp_element_namespaceObject.createElement)(ComponentToUse, extends_extends({
       
  1800     icon: selectedIcon && isSelected ? selectedIcon : icon,
       
  1801     onClick: () => {
       
  1802       if (isSelected) {
       
  1803         disableComplementaryArea(scope);
       
  1804       } else {
       
  1805         enableComplementaryArea(scope, identifier);
       
  1806       }
       
  1807     }
       
  1808   }, (0,external_lodash_namespaceObject.omit)(props, ['name'])));
       
  1809 }
       
  1810 
       
  1811 /* harmony default export */ var complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle));
       
  1812 
       
  1813 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js
       
  1814 
       
  1815 
       
  1816 
       
  1817 /**
       
  1818  * External dependencies
       
  1819  */
       
  1820 
       
  1821 /**
       
  1822  * WordPress dependencies
       
  1823  */
       
  1824 
       
  1825 
       
  1826 /**
       
  1827  * Internal dependencies
       
  1828  */
       
  1829 
       
  1830 
       
  1831 
       
  1832 const ComplementaryAreaHeader = _ref => {
       
  1833   let {
       
  1834     smallScreenTitle,
       
  1835     children,
       
  1836     className,
       
  1837     toggleButtonProps
       
  1838   } = _ref;
       
  1839   const toggleButton = (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, extends_extends({
       
  1840     icon: close_small
       
  1841   }, toggleButtonProps));
       
  1842   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  1843     className: "components-panel__header interface-complementary-area-header__small"
       
  1844   }, smallScreenTitle && (0,external_wp_element_namespaceObject.createElement)("span", {
       
  1845     className: "interface-complementary-area-header__small-title"
       
  1846   }, smallScreenTitle), toggleButton), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  1847     className: classnames_default()('components-panel__header', 'interface-complementary-area-header', className),
       
  1848     tabIndex: -1
       
  1849   }, children, toggleButton));
       
  1850 };
       
  1851 
       
  1852 /* harmony default export */ var complementary_area_header = (ComplementaryAreaHeader);
       
  1853 
       
  1854 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js
       
  1855 
       
  1856 
       
  1857 
       
  1858 /**
       
  1859  * External dependencies
       
  1860  */
       
  1861 
       
  1862 /**
       
  1863  * WordPress dependencies
       
  1864  */
       
  1865 
       
  1866 
       
  1867 
       
  1868 
       
  1869 function ActionItemSlot(_ref) {
       
  1870   let {
       
  1871     name,
       
  1872     as: Component = external_wp_components_namespaceObject.ButtonGroup,
       
  1873     fillProps = {},
       
  1874     bubblesVirtually,
       
  1875     ...props
       
  1876   } = _ref;
       
  1877   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, {
       
  1878     name: name,
       
  1879     bubblesVirtually: bubblesVirtually,
       
  1880     fillProps: fillProps
       
  1881   }, fills => {
       
  1882     if ((0,external_lodash_namespaceObject.isEmpty)(external_wp_element_namespaceObject.Children.toArray(fills))) {
       
  1883       return null;
       
  1884     } // Special handling exists for backward compatibility.
       
  1885     // It ensures that menu items created by plugin authors aren't
       
  1886     // duplicated with automatically injected menu items coming
       
  1887     // from pinnable plugin sidebars.
       
  1888     // @see https://github.com/WordPress/gutenberg/issues/14457
       
  1889 
       
  1890 
       
  1891     const initializedByPlugins = [];
       
  1892     external_wp_element_namespaceObject.Children.forEach(fills, _ref2 => {
       
  1893       let {
       
  1894         props: {
       
  1895           __unstableExplicitMenuItem,
       
  1896           __unstableTarget
       
  1897         }
       
  1898       } = _ref2;
       
  1899 
       
  1900       if (__unstableTarget && __unstableExplicitMenuItem) {
       
  1901         initializedByPlugins.push(__unstableTarget);
       
  1902       }
       
  1903     });
       
  1904     const children = external_wp_element_namespaceObject.Children.map(fills, child => {
       
  1905       if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) {
       
  1906         return null;
       
  1907       }
       
  1908 
       
  1909       return child;
       
  1910     });
       
  1911     return (0,external_wp_element_namespaceObject.createElement)(Component, props, children);
       
  1912   });
       
  1913 }
       
  1914 
       
  1915 function ActionItem(_ref3) {
       
  1916   let {
       
  1917     name,
       
  1918     as: Component = external_wp_components_namespaceObject.Button,
       
  1919     onClick,
       
  1920     ...props
       
  1921   } = _ref3;
       
  1922   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, {
       
  1923     name: name
       
  1924   }, _ref4 => {
       
  1925     let {
       
  1926       onClick: fpOnClick
       
  1927     } = _ref4;
       
  1928     return (0,external_wp_element_namespaceObject.createElement)(Component, extends_extends({
       
  1929       onClick: onClick || fpOnClick ? function () {
       
  1930         (onClick || external_lodash_namespaceObject.noop)(...arguments);
       
  1931         (fpOnClick || external_lodash_namespaceObject.noop)(...arguments);
       
  1932       } : undefined
       
  1933     }, props));
       
  1934   });
       
  1935 }
       
  1936 
       
  1937 ActionItem.Slot = ActionItemSlot;
       
  1938 /* harmony default export */ var action_item = (ActionItem);
       
  1939 
       
  1940 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js
       
  1941 
       
  1942 
       
  1943 
       
  1944 /**
       
  1945  * External dependencies
       
  1946  */
       
  1947 
       
  1948 /**
       
  1949  * WordPress dependencies
       
  1950  */
       
  1951 
       
  1952 
       
  1953 
       
  1954 /**
       
  1955  * Internal dependencies
       
  1956  */
       
  1957 
       
  1958 
       
  1959 
       
  1960 
       
  1961 const PluginsMenuItem = props => // Menu item is marked with unstable prop for backward compatibility.
       
  1962 // They are removed so they don't leak to DOM elements.
       
  1963 // @see https://github.com/WordPress/gutenberg/issues/14457
       
  1964 (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, (0,external_lodash_namespaceObject.omit)(props, ['__unstableExplicitMenuItem', '__unstableTarget']));
       
  1965 
       
  1966 function ComplementaryAreaMoreMenuItem(_ref) {
       
  1967   let {
       
  1968     scope,
       
  1969     target,
       
  1970     __unstableExplicitMenuItem,
       
  1971     ...props
       
  1972   } = _ref;
       
  1973   return (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, extends_extends({
       
  1974     as: toggleProps => {
       
  1975       return (0,external_wp_element_namespaceObject.createElement)(action_item, extends_extends({
       
  1976         __unstableExplicitMenuItem: __unstableExplicitMenuItem,
       
  1977         __unstableTarget: `${scope}/${target}`,
       
  1978         as: PluginsMenuItem,
       
  1979         name: `${scope}/plugin-more-menu`
       
  1980       }, toggleProps));
       
  1981     },
       
  1982     role: "menuitemcheckbox",
       
  1983     selectedIcon: library_check,
       
  1984     name: target,
       
  1985     scope: scope
       
  1986   }, props));
       
  1987 }
       
  1988 
       
  1989 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js
       
  1990 
       
  1991 
       
  1992 
       
  1993 /**
       
  1994  * External dependencies
       
  1995  */
       
  1996 
       
  1997 
       
  1998 /**
       
  1999  * WordPress dependencies
       
  2000  */
       
  2001 
       
  2002 
       
  2003 
       
  2004 function PinnedItems(_ref) {
       
  2005   let {
       
  2006     scope,
       
  2007     ...props
       
  2008   } = _ref;
       
  2009   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, extends_extends({
       
  2010     name: `PinnedItems/${scope}`
       
  2011   }, props));
       
  2012 }
       
  2013 
       
  2014 function PinnedItemsSlot(_ref2) {
       
  2015   let {
       
  2016     scope,
       
  2017     className,
       
  2018     ...props
       
  2019   } = _ref2;
       
  2020   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, extends_extends({
       
  2021     name: `PinnedItems/${scope}`
       
  2022   }, props), fills => !(0,external_lodash_namespaceObject.isEmpty)(fills) && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2023     className: classnames_default()(className, 'interface-pinned-items')
       
  2024   }, fills));
       
  2025 }
       
  2026 
       
  2027 PinnedItems.Slot = PinnedItemsSlot;
       
  2028 /* harmony default export */ var pinned_items = (PinnedItems);
       
  2029 
       
  2030 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js
       
  2031 
       
  2032 
       
  2033 
       
  2034 /**
       
  2035  * External dependencies
       
  2036  */
       
  2037 
       
  2038 /**
       
  2039  * WordPress dependencies
       
  2040  */
       
  2041 
       
  2042 
       
  2043 
       
  2044 
       
  2045 
       
  2046 
       
  2047 
       
  2048 /**
       
  2049  * Internal dependencies
       
  2050  */
       
  2051 
       
  2052 
       
  2053 
       
  2054 
       
  2055 
       
  2056 
       
  2057 
       
  2058 
       
  2059 function ComplementaryAreaSlot(_ref) {
       
  2060   let {
       
  2061     scope,
       
  2062     ...props
       
  2063   } = _ref;
       
  2064   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, extends_extends({
       
  2065     name: `ComplementaryArea/${scope}`
       
  2066   }, props));
       
  2067 }
       
  2068 
       
  2069 function ComplementaryAreaFill(_ref2) {
       
  2070   let {
       
  2071     scope,
       
  2072     children,
       
  2073     className
       
  2074   } = _ref2;
       
  2075   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, {
       
  2076     name: `ComplementaryArea/${scope}`
       
  2077   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2078     className: className
       
  2079   }, children));
       
  2080 }
       
  2081 
       
  2082 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
       
  2083   const previousIsSmall = (0,external_wp_element_namespaceObject.useRef)(false);
       
  2084   const shouldOpenWhenNotSmall = (0,external_wp_element_namespaceObject.useRef)(false);
       
  2085   const {
       
  2086     enableComplementaryArea,
       
  2087     disableComplementaryArea
       
  2088   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
  2089   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
  2090     // If the complementary area is active and the editor is switching from a big to a small window size.
       
  2091     if (isActive && isSmall && !previousIsSmall.current) {
       
  2092       // Disable the complementary area.
       
  2093       disableComplementaryArea(scope); // Flag the complementary area to be reopened when the window size goes from small to big.
       
  2094 
       
  2095       shouldOpenWhenNotSmall.current = true;
       
  2096     } else if ( // If there is a flag indicating the complementary area should be enabled when we go from small to big window size
       
  2097     // and we are going from a small to big window size.
       
  2098     shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) {
       
  2099       // Remove the flag indicating the complementary area should be enabled.
       
  2100       shouldOpenWhenNotSmall.current = false; // Enable the complementary area.
       
  2101 
       
  2102       enableComplementaryArea(scope, identifier);
       
  2103     } else if ( // If the flag is indicating the current complementary should be reopened but another complementary area becomes active,
       
  2104     // remove the flag.
       
  2105     shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) {
       
  2106       shouldOpenWhenNotSmall.current = false;
       
  2107     }
       
  2108 
       
  2109     if (isSmall !== previousIsSmall.current) {
       
  2110       previousIsSmall.current = isSmall;
       
  2111     }
       
  2112   }, [isActive, isSmall, scope, identifier, activeArea]);
       
  2113 }
       
  2114 
       
  2115 function ComplementaryArea(_ref3) {
       
  2116   let {
       
  2117     children,
       
  2118     className,
       
  2119     closeLabel = (0,external_wp_i18n_namespaceObject.__)('Close plugin'),
       
  2120     identifier,
       
  2121     header,
       
  2122     headerClassName,
       
  2123     icon,
       
  2124     isPinnable = true,
       
  2125     panelClassName,
       
  2126     scope,
       
  2127     name,
       
  2128     smallScreenTitle,
       
  2129     title,
       
  2130     toggleShortcut,
       
  2131     isActiveByDefault,
       
  2132     showIconLabels = false
       
  2133   } = _ref3;
       
  2134   const {
       
  2135     isActive,
       
  2136     isPinned,
       
  2137     activeArea,
       
  2138     isSmall,
       
  2139     isLarge
       
  2140   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  2141     const {
       
  2142       getActiveComplementaryArea,
       
  2143       isItemPinned
       
  2144     } = select(store);
       
  2145 
       
  2146     const _activeArea = getActiveComplementaryArea(scope);
       
  2147 
       
  2148     return {
       
  2149       isActive: _activeArea === identifier,
       
  2150       isPinned: isItemPinned(scope, identifier),
       
  2151       activeArea: _activeArea,
       
  2152       isSmall: select(external_wp_viewport_namespaceObject.store).isViewportMatch('< medium'),
       
  2153       isLarge: select(external_wp_viewport_namespaceObject.store).isViewportMatch('large')
       
  2154     };
       
  2155   }, [identifier, scope]);
       
  2156   useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall);
       
  2157   const {
       
  2158     enableComplementaryArea,
       
  2159     disableComplementaryArea,
       
  2160     pinItem,
       
  2161     unpinItem
       
  2162   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
  2163   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
  2164     if (isActiveByDefault && activeArea === undefined && !isSmall) {
       
  2165       enableComplementaryArea(scope, identifier);
       
  2166     }
       
  2167   }, [activeArea, isActiveByDefault, scope, identifier, isSmall]);
       
  2168   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isPinnable && (0,external_wp_element_namespaceObject.createElement)(pinned_items, {
       
  2169     scope: scope
       
  2170   }, isPinned && (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, {
       
  2171     scope: scope,
       
  2172     identifier: identifier,
       
  2173     isPressed: isActive && (!showIconLabels || isLarge),
       
  2174     "aria-expanded": isActive,
       
  2175     label: title,
       
  2176     icon: showIconLabels ? library_check : icon,
       
  2177     showTooltip: !showIconLabels,
       
  2178     variant: showIconLabels ? 'tertiary' : undefined
       
  2179   })), name && isPinnable && (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaMoreMenuItem, {
       
  2180     target: name,
       
  2181     scope: scope,
       
  2182     icon: icon
       
  2183   }, title), isActive && (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaFill, {
       
  2184     className: classnames_default()('interface-complementary-area', className),
       
  2185     scope: scope
       
  2186   }, (0,external_wp_element_namespaceObject.createElement)(complementary_area_header, {
       
  2187     className: headerClassName,
       
  2188     closeLabel: closeLabel,
       
  2189     onClose: () => disableComplementaryArea(scope),
       
  2190     smallScreenTitle: smallScreenTitle,
       
  2191     toggleButtonProps: {
       
  2192       label: closeLabel,
       
  2193       shortcut: toggleShortcut,
       
  2194       scope,
       
  2195       identifier
       
  2196     }
       
  2197   }, header || (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("strong", null, title), isPinnable && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  2198     className: "interface-complementary-area__pin-unpin-item",
       
  2199     icon: isPinned ? star_filled : star_empty,
       
  2200     label: isPinned ? (0,external_wp_i18n_namespaceObject.__)('Unpin from toolbar') : (0,external_wp_i18n_namespaceObject.__)('Pin to toolbar'),
       
  2201     onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier),
       
  2202     isPressed: isPinned,
       
  2203     "aria-expanded": isPinned
       
  2204   }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Panel, {
       
  2205     className: panelClassName
       
  2206   }, children)));
       
  2207 }
       
  2208 
       
  2209 const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea);
       
  2210 ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;
       
  2211 /* harmony default export */ var complementary_area = (ComplementaryAreaWrapped);
       
  2212 
       
  2213 ;// CONCATENATED MODULE: external ["wp","compose"]
       
  2214 var external_wp_compose_namespaceObject = window["wp"]["compose"];
       
  2215 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js
       
  2216 
       
  2217 
       
  2218 
       
  2219 /**
       
  2220  * External dependencies
       
  2221  */
       
  2222 
       
  2223 /**
       
  2224  * WordPress dependencies
       
  2225  */
       
  2226 
       
  2227 /**
       
  2228  * WordPress dependencies
       
  2229  */
       
  2230 
       
  2231 
       
  2232 
       
  2233 
       
  2234 
       
  2235 
       
  2236 function useHTMLClass(className) {
       
  2237   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
  2238     const element = document && document.querySelector(`html:not(.${className})`);
       
  2239 
       
  2240     if (!element) {
       
  2241       return;
       
  2242     }
       
  2243 
       
  2244     element.classList.toggle(className);
       
  2245     return () => {
       
  2246       element.classList.toggle(className);
       
  2247     };
       
  2248   }, [className]);
       
  2249 }
       
  2250 
       
  2251 function InterfaceSkeleton(_ref, ref) {
       
  2252   let {
       
  2253     footer,
       
  2254     header,
       
  2255     sidebar,
       
  2256     secondarySidebar,
       
  2257     notices,
       
  2258     content,
       
  2259     drawer,
       
  2260     actions,
       
  2261     labels,
       
  2262     className,
       
  2263     shortcuts
       
  2264   } = _ref;
       
  2265   const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(shortcuts);
       
  2266   useHTMLClass('interface-interface-skeleton__html-container');
       
  2267   const defaultLabels = {
       
  2268     /* translators: accessibility text for the nav bar landmark region. */
       
  2269     drawer: (0,external_wp_i18n_namespaceObject.__)('Drawer'),
       
  2270 
       
  2271     /* translators: accessibility text for the top bar landmark region. */
       
  2272     header: (0,external_wp_i18n_namespaceObject.__)('Header'),
       
  2273 
       
  2274     /* translators: accessibility text for the content landmark region. */
       
  2275     body: (0,external_wp_i18n_namespaceObject.__)('Content'),
       
  2276 
       
  2277     /* translators: accessibility text for the secondary sidebar landmark region. */
       
  2278     secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'),
       
  2279 
       
  2280     /* translators: accessibility text for the settings landmark region. */
       
  2281     sidebar: (0,external_wp_i18n_namespaceObject.__)('Settings'),
       
  2282 
       
  2283     /* translators: accessibility text for the publish landmark region. */
       
  2284     actions: (0,external_wp_i18n_namespaceObject.__)('Publish'),
       
  2285 
       
  2286     /* translators: accessibility text for the footer landmark region. */
       
  2287     footer: (0,external_wp_i18n_namespaceObject.__)('Footer')
       
  2288   };
       
  2289   const mergedLabels = { ...defaultLabels,
       
  2290     ...labels
       
  2291   };
       
  2292   return (0,external_wp_element_namespaceObject.createElement)("div", extends_extends({}, navigateRegionsProps, {
       
  2293     ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, navigateRegionsProps.ref]),
       
  2294     className: classnames_default()(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer')
       
  2295   }), !!drawer && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2296     className: "interface-interface-skeleton__drawer",
       
  2297     role: "region",
       
  2298     "aria-label": mergedLabels.drawer,
       
  2299     tabIndex: "-1"
       
  2300   }, drawer), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2301     className: "interface-interface-skeleton__editor"
       
  2302   }, !!header && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2303     className: "interface-interface-skeleton__header",
       
  2304     role: "region",
       
  2305     "aria-label": mergedLabels.header,
       
  2306     tabIndex: "-1"
       
  2307   }, header), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2308     className: "interface-interface-skeleton__body"
       
  2309   }, !!secondarySidebar && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2310     className: "interface-interface-skeleton__secondary-sidebar",
       
  2311     role: "region",
       
  2312     "aria-label": mergedLabels.secondarySidebar,
       
  2313     tabIndex: "-1"
       
  2314   }, secondarySidebar), !!notices && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2315     className: "interface-interface-skeleton__notices"
       
  2316   }, notices), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2317     className: "interface-interface-skeleton__content",
       
  2318     role: "region",
       
  2319     "aria-label": mergedLabels.body,
       
  2320     tabIndex: "-1"
       
  2321   }, content), !!sidebar && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2322     className: "interface-interface-skeleton__sidebar",
       
  2323     role: "region",
       
  2324     "aria-label": mergedLabels.sidebar,
       
  2325     tabIndex: "-1"
       
  2326   }, sidebar), !!actions && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2327     className: "interface-interface-skeleton__actions",
       
  2328     role: "region",
       
  2329     "aria-label": mergedLabels.actions,
       
  2330     tabIndex: "-1"
       
  2331   }, actions))), !!footer && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2332     className: "interface-interface-skeleton__footer",
       
  2333     role: "region",
       
  2334     "aria-label": mergedLabels.footer,
       
  2335     tabIndex: "-1"
       
  2336   }, footer));
       
  2337 }
       
  2338 
       
  2339 /* harmony default export */ var interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton));
       
  2340 
       
  2341 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
       
  2342 
       
  2343 
       
  2344 /**
       
  2345  * WordPress dependencies
       
  2346  */
       
  2347 
       
  2348 const moreVertical = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  2349   xmlns: "http://www.w3.org/2000/svg",
       
  2350   viewBox: "0 0 24 24"
       
  2351 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  2352   d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
       
  2353 }));
       
  2354 /* harmony default export */ var more_vertical = (moreVertical);
       
  2355 
       
  2356 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/more-menu-dropdown/index.js
       
  2357 
       
  2358 
       
  2359 /**
       
  2360  * External dependencies
       
  2361  */
       
  2362 
       
  2363 /**
       
  2364  * WordPress dependencies
       
  2365  */
       
  2366 
       
  2367 
       
  2368 
       
  2369 
       
  2370 function MoreMenuDropdown(_ref) {
       
  2371   let {
       
  2372     as: DropdownComponent = external_wp_components_namespaceObject.DropdownMenu,
       
  2373     className,
       
  2374 
       
  2375     /* translators: button label text should, if possible, be under 16 characters. */
       
  2376     label = (0,external_wp_i18n_namespaceObject.__)('Options'),
       
  2377     popoverProps,
       
  2378     toggleProps,
       
  2379     children
       
  2380   } = _ref;
       
  2381   return (0,external_wp_element_namespaceObject.createElement)(DropdownComponent, {
       
  2382     className: classnames_default()('interface-more-menu-dropdown', className),
       
  2383     icon: more_vertical,
       
  2384     label: label,
       
  2385     popoverProps: {
       
  2386       position: 'bottom left',
       
  2387       ...popoverProps,
       
  2388       className: classnames_default()('interface-more-menu-dropdown__content', popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.className)
       
  2389     },
       
  2390     toggleProps: {
       
  2391       tooltipPosition: 'bottom',
       
  2392       ...toggleProps
       
  2393     }
       
  2394   }, onClose => children(onClose));
       
  2395 }
       
  2396 
       
  2397 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/preferences-modal/index.js
       
  2398 
       
  2399 
       
  2400 /**
       
  2401  * WordPress dependencies
       
  2402  */
       
  2403 
       
  2404 
       
  2405 function PreferencesModal(_ref) {
       
  2406   let {
       
  2407     closeModal,
       
  2408     children
       
  2409   } = _ref;
       
  2410   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
       
  2411     className: "interface-preferences-modal",
       
  2412     title: (0,external_wp_i18n_namespaceObject.__)('Preferences'),
       
  2413     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close'),
       
  2414     onRequestClose: closeModal
       
  2415   }, children);
       
  2416 }
       
  2417 
       
  2418 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
       
  2419 /**
       
  2420  * WordPress dependencies
       
  2421  */
       
  2422 
       
  2423 /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
       
  2424 
       
  2425 /**
       
  2426  * Return an SVG icon.
       
  2427  *
       
  2428  * @param {IconProps} props icon is the SVG component to render
       
  2429  *                          size is a number specifiying the icon size in pixels
       
  2430  *                          Other props will be passed to wrapped SVG component
       
  2431  *
       
  2432  * @return {JSX.Element}  Icon component
       
  2433  */
       
  2434 
       
  2435 function Icon(_ref) {
       
  2436   let {
       
  2437     icon,
       
  2438     size = 24,
       
  2439     ...props
       
  2440   } = _ref;
       
  2441   return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
       
  2442     width: size,
       
  2443     height: size,
       
  2444     ...props
       
  2445   });
       
  2446 }
       
  2447 
       
  2448 /* harmony default export */ var icon = (Icon);
       
  2449 
       
  2450 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
       
  2451 
       
  2452 
       
  2453 /**
       
  2454  * WordPress dependencies
       
  2455  */
       
  2456 
       
  2457 const chevronLeft = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  2458   xmlns: "http://www.w3.org/2000/svg",
       
  2459   viewBox: "0 0 24 24"
       
  2460 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  2461   d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
       
  2462 }));
       
  2463 /* harmony default export */ var chevron_left = (chevronLeft);
       
  2464 
       
  2465 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
       
  2466 
       
  2467 
       
  2468 /**
       
  2469  * WordPress dependencies
       
  2470  */
       
  2471 
       
  2472 const chevronRight = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  2473   xmlns: "http://www.w3.org/2000/svg",
       
  2474   viewBox: "0 0 24 24"
       
  2475 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  2476   d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
       
  2477 }));
       
  2478 /* harmony default export */ var chevron_right = (chevronRight);
       
  2479 
       
  2480 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/preferences-modal-tabs/index.js
       
  2481 
       
  2482 
       
  2483 /**
       
  2484  * WordPress dependencies
       
  2485  */
       
  2486 
       
  2487 
       
  2488 
       
  2489 
       
  2490 
       
  2491 const PREFERENCES_MENU = 'preferences-menu';
       
  2492 function PreferencesModalTabs(_ref) {
       
  2493   let {
       
  2494     sections
       
  2495   } = _ref;
       
  2496   const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium'); // This is also used to sync the two different rendered components
       
  2497   // between small and large viewports.
       
  2498 
       
  2499   const [activeMenu, setActiveMenu] = (0,external_wp_element_namespaceObject.useState)(PREFERENCES_MENU);
       
  2500   /**
       
  2501    * Create helper objects from `sections` for easier data handling.
       
  2502    * `tabs` is used for creating the `TabPanel` and `sectionsContentMap`
       
  2503    * is used for easier access to active tab's content.
       
  2504    */
       
  2505 
       
  2506   const {
       
  2507     tabs,
       
  2508     sectionsContentMap
       
  2509   } = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  2510     let mappedTabs = {
       
  2511       tabs: [],
       
  2512       sectionsContentMap: {}
       
  2513     };
       
  2514 
       
  2515     if (sections.length) {
       
  2516       mappedTabs = sections.reduce((accumulator, _ref2) => {
       
  2517         let {
       
  2518           name,
       
  2519           tabLabel: title,
       
  2520           content
       
  2521         } = _ref2;
       
  2522         accumulator.tabs.push({
       
  2523           name,
       
  2524           title
       
  2525         });
       
  2526         accumulator.sectionsContentMap[name] = content;
       
  2527         return accumulator;
       
  2528       }, {
       
  2529         tabs: [],
       
  2530         sectionsContentMap: {}
       
  2531       });
       
  2532     }
       
  2533 
       
  2534     return mappedTabs;
       
  2535   }, [sections]);
       
  2536   const getCurrentTab = (0,external_wp_element_namespaceObject.useCallback)(tab => sectionsContentMap[tab.name] || null, [sectionsContentMap]);
       
  2537   let modalContent; // We render different components based on the viewport size.
       
  2538 
       
  2539   if (isLargeViewport) {
       
  2540     modalContent = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TabPanel, {
       
  2541       className: "interface-preferences__tabs",
       
  2542       tabs: tabs,
       
  2543       initialTabName: activeMenu !== PREFERENCES_MENU ? activeMenu : undefined,
       
  2544       onSelect: setActiveMenu,
       
  2545       orientation: "vertical"
       
  2546     }, getCurrentTab);
       
  2547   } else {
       
  2548     modalContent = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorProvider, {
       
  2549       initialPath: "/",
       
  2550       className: "interface-preferences__provider"
       
  2551     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
       
  2552       path: "/"
       
  2553     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Card, {
       
  2554       isBorderless: true,
       
  2555       size: "small"
       
  2556     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, null, tabs.map(tab => {
       
  2557       return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorButton, {
       
  2558         key: tab.name,
       
  2559         path: tab.name,
       
  2560         as: external_wp_components_namespaceObject.__experimentalItem,
       
  2561         isAction: true
       
  2562       }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  2563         justify: "space-between"
       
  2564       }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalTruncate, null, tab.title)), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(icon, {
       
  2565         icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
       
  2566       }))));
       
  2567     }))))), sections.length && sections.map(section => {
       
  2568       return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
       
  2569         key: `${section.name}-menu`,
       
  2570         path: section.name
       
  2571       }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Card, {
       
  2572         isBorderless: true,
       
  2573         size: "large"
       
  2574       }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardHeader, {
       
  2575         isBorderless: false,
       
  2576         justify: "left",
       
  2577         size: "small",
       
  2578         gap: "6"
       
  2579       }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorBackButton, {
       
  2580         icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right : chevron_left,
       
  2581         "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigate to the previous view')
       
  2582       }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
       
  2583         size: "16"
       
  2584       }, section.tabLabel)), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardBody, null, section.content)));
       
  2585     }));
       
  2586   }
       
  2587 
       
  2588   return modalContent;
       
  2589 }
       
  2590 
       
  2591 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/preferences-modal-section/index.js
       
  2592 
       
  2593 
       
  2594 const Section = _ref => {
       
  2595   let {
       
  2596     description,
       
  2597     title,
       
  2598     children
       
  2599   } = _ref;
       
  2600   return (0,external_wp_element_namespaceObject.createElement)("fieldset", {
       
  2601     className: "interface-preferences-modal__section"
       
  2602   }, (0,external_wp_element_namespaceObject.createElement)("legend", null, (0,external_wp_element_namespaceObject.createElement)("h2", {
       
  2603     className: "interface-preferences-modal__section-title"
       
  2604   }, title), description && (0,external_wp_element_namespaceObject.createElement)("p", {
       
  2605     className: "interface-preferences-modal__section-description"
       
  2606   }, description)), children);
       
  2607 };
       
  2608 
       
  2609 /* harmony default export */ var preferences_modal_section = (Section);
       
  2610 
       
  2611 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/preferences-modal-base-option/index.js
       
  2612 
       
  2613 
       
  2614 /**
       
  2615  * WordPress dependencies
       
  2616  */
       
  2617 
       
  2618 
       
  2619 function BaseOption(_ref) {
       
  2620   let {
       
  2621     help,
       
  2622     label,
       
  2623     isChecked,
       
  2624     onChange,
       
  2625     children
       
  2626   } = _ref;
       
  2627   return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  2628     className: "interface-preferences-modal__option"
       
  2629   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
       
  2630     help: help,
       
  2631     label: label,
       
  2632     checked: isChecked,
       
  2633     onChange: onChange
       
  2634   }), children);
       
  2635 }
       
  2636 
       
  2637 /* harmony default export */ var preferences_modal_base_option = (BaseOption);
       
  2638 
       
  2639 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
       
  2640 
       
  2641 
       
  2642 
       
  2643 
       
  2644 
       
  2645 
       
  2646 
       
  2647 
       
  2648 
       
  2649 
       
  2650 
       
  2651 
       
  2652 
       
  2653 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
       
  2654 
       
  2655 
       
  2656 
       
  2657 ;// CONCATENATED MODULE: external ["wp","blockEditor"]
       
  2658 var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
       
  2659 ;// CONCATENATED MODULE: external ["wp","a11y"]
       
  2660 var external_wp_a11y_namespaceObject = window["wp"]["a11y"];
       
  2661 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/is-template-revertable.js
       
  2662 /**
       
  2663  * Check if a template is revertable to its original theme-provided template file.
       
  2664  *
       
  2665  * @param {Object} template The template entity to check.
       
  2666  * @return {boolean} Whether the template is revertable.
       
  2667  */
       
  2668 function isTemplateRevertable(template) {
       
  2669   if (!template) {
       
  2670     return false;
       
  2671   }
       
  2672   /* eslint-disable camelcase */
       
  2673 
       
  2674 
       
  2675   return (template === null || template === void 0 ? void 0 : template.source) === 'custom' && (template === null || template === void 0 ? void 0 : template.has_theme_file);
       
  2676   /* eslint-enable camelcase */
       
  2677 }
       
  2678 
       
  2679 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/actions.js
       
  2680 /**
       
  2681  * WordPress dependencies
       
  2682  */
       
  2683 
       
  2684 
       
  2685 
       
  2686 
       
  2687 
       
  2688 
       
  2689 
       
  2690 
       
  2691 
       
  2692 
       
  2693 
       
  2694 /**
       
  2695  * Internal dependencies
       
  2696  */
       
  2697 
       
  2698 
       
  2699 
  8330 
  2700 /**
  8331 /**
  2701  * Dispatches an action that toggles a feature flag.
  8332  * Dispatches an action that toggles a feature flag.
  2702  *
  8333  *
  2703  * @param {string} featureName Feature name.
  8334  * @param {string} featureName Feature name.
  2704  */
  8335  */
  2705 
  8336 function toggleFeature(featureName) {
  2706 function actions_toggleFeature(featureName) {
  8337   return function ({
  2707   return function (_ref) {
  8338     registry
  2708     let {
  8339   }) {
  2709       registry
  8340     external_wp_deprecated_default()("dispatch( 'core/edit-site' ).toggleFeature( featureName )", {
  2710     } = _ref;
       
  2711     external_wp_deprecated_default()("select( 'core/edit-site' ).toggleFeature( featureName )", {
       
  2712       since: '6.0',
  8341       since: '6.0',
  2713       alternative: "select( 'core/preferences').toggle( 'core/edit-site', featureName )"
  8342       alternative: "dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"
  2714     });
  8343     });
  2715     registry.dispatch(external_wp_preferences_namespaceObject.store).toggle('core/edit-site', featureName);
  8344     registry.dispatch(external_wp_preferences_namespaceObject.store).toggle('core/edit-site', featureName);
  2716   };
  8345   };
  2717 }
  8346 }
       
  8347 
  2718 /**
  8348 /**
  2719  * Action that changes the width of the editing canvas.
  8349  * Action that changes the width of the editing canvas.
       
  8350  *
       
  8351  * @deprecated
  2720  *
  8352  *
  2721  * @param {string} deviceType
  8353  * @param {string} deviceType
  2722  *
  8354  *
  2723  * @return {Object} Action object.
  8355  * @return {Object} Action object.
  2724  */
  8356  */
  2725 
  8357 const __experimentalSetPreviewDeviceType = deviceType => ({
  2726 function __experimentalSetPreviewDeviceType(deviceType) {
  8358   registry
  2727   return {
  8359 }) => {
  2728     type: 'SET_PREVIEW_DEVICE_TYPE',
  8360   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType", {
  2729     deviceType
  8361     since: '6.5',
  2730   };
  8362     version: '6.7',
  2731 }
  8363     hint: 'registry.dispatch( editorStore ).setDeviceType'
       
  8364   });
       
  8365   registry.dispatch(external_wp_editor_namespaceObject.store).setDeviceType(deviceType);
       
  8366 };
       
  8367 
  2732 /**
  8368 /**
  2733  * Action that sets a template, optionally fetching it from REST API.
  8369  * Action that sets a template, optionally fetching it from REST API.
  2734  *
  8370  *
  2735  * @param {number} templateId   The template ID.
       
  2736  * @param {string} templateSlug The template slug.
       
  2737  * @return {Object} Action object.
  8371  * @return {Object} Action object.
  2738  */
  8372  */
  2739 
  8373 function setTemplate() {
  2740 const setTemplate = (templateId, templateSlug) => async _ref2 => {
  8374   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).setTemplate", {
  2741   let {
  8375     since: '6.5',
  2742     dispatch,
  8376     version: '6.8',
  2743     registry
  8377     hint: 'The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically.'
  2744   } = _ref2;
       
  2745 
       
  2746   if (!templateSlug) {
       
  2747     const template = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', 'wp_template', templateId);
       
  2748     templateSlug = template === null || template === void 0 ? void 0 : template.slug;
       
  2749   }
       
  2750 
       
  2751   dispatch({
       
  2752     type: 'SET_TEMPLATE',
       
  2753     templateId,
       
  2754     page: {
       
  2755       context: {
       
  2756         templateSlug
       
  2757       }
       
  2758     }
       
  2759   });
  8378   });
  2760 };
  8379   return {
       
  8380     type: 'NOTHING'
       
  8381   };
       
  8382 }
       
  8383 
  2761 /**
  8384 /**
  2762  * Action that adds a new template and sets it as the current template.
  8385  * Action that adds a new template and sets it as the current template.
  2763  *
  8386  *
  2764  * @param {Object} template The template.
  8387  * @param {Object} template The template.
  2765  *
  8388  *
       
  8389  * @deprecated
       
  8390  *
  2766  * @return {Object} Action object used to set the current template.
  8391  * @return {Object} Action object used to set the current template.
  2767  */
  8392  */
  2768 
  8393 const addTemplate = template => async ({
  2769 const addTemplate = template => async _ref3 => {
  8394   dispatch,
  2770   let {
  8395   registry
  2771     dispatch,
  8396 }) => {
  2772     registry
  8397   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).addTemplate", {
  2773   } = _ref3;
  8398     since: '6.5',
  2774   const newTemplate = await registry.dispatch(external_wp_coreData_namespaceObject.store).saveEntityRecord('postType', 'wp_template', template);
  8399     version: '6.8',
  2775 
  8400     hint: 'use saveEntityRecord directly'
       
  8401   });
       
  8402   const newTemplate = await registry.dispatch(external_wp_coreData_namespaceObject.store).saveEntityRecord('postType', TEMPLATE_POST_TYPE, template);
  2776   if (template.content) {
  8403   if (template.content) {
  2777     registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord('postType', 'wp_template', newTemplate.id, {
  8404     registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord('postType', TEMPLATE_POST_TYPE, newTemplate.id, {
  2778       blocks: (0,external_wp_blocks_namespaceObject.parse)(template.content)
  8405       blocks: (0,external_wp_blocks_namespaceObject.parse)(template.content)
  2779     }, {
  8406     }, {
  2780       undoIgnore: true
  8407       undoIgnore: true
  2781     });
  8408     });
  2782   }
  8409   }
  2783 
       
  2784   dispatch({
  8410   dispatch({
  2785     type: 'SET_TEMPLATE',
  8411     type: 'SET_EDITED_POST',
  2786     templateId: newTemplate.id,
  8412     postType: TEMPLATE_POST_TYPE,
  2787     page: {
  8413     id: newTemplate.id
  2788       context: {
       
  2789         templateSlug: newTemplate.slug
       
  2790       }
       
  2791     }
       
  2792   });
  8414   });
  2793 };
  8415 };
       
  8416 
  2794 /**
  8417 /**
  2795  * Action that removes a template.
  8418  * Action that removes a template.
  2796  *
  8419  *
  2797  * @param {Object} template The template object.
  8420  * @param {Object} template The template object.
  2798  */
  8421  */
  2799 
  8422 const removeTemplate = template => ({
  2800 const removeTemplate = template => async _ref4 => {
  8423   registry
  2801   let {
  8424 }) => {
  2802     registry
  8425   return lock_unlock_unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).removeTemplates([template]);
  2803   } = _ref4;
       
  2804 
       
  2805   try {
       
  2806     await registry.dispatch(external_wp_coreData_namespaceObject.store).deleteEntityRecord('postType', template.type, template.id, {
       
  2807       force: true
       
  2808     });
       
  2809     const lastError = registry.select(external_wp_coreData_namespaceObject.store).getLastEntityDeleteError('postType', template.type, template.id);
       
  2810 
       
  2811     if (lastError) {
       
  2812       throw lastError;
       
  2813     }
       
  2814 
       
  2815     registry.dispatch(external_wp_notices_namespaceObject.store).createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
       
  2816     /* translators: The template/part's name. */
       
  2817     (0,external_wp_i18n_namespaceObject.__)('"%s" deleted.'), template.title.rendered), {
       
  2818       type: 'snackbar'
       
  2819     });
       
  2820   } catch (error) {
       
  2821     const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while deleting the template.');
       
  2822     registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice(errorMessage, {
       
  2823       type: 'snackbar'
       
  2824     });
       
  2825   }
       
  2826 };
  8426 };
       
  8427 
  2827 /**
  8428 /**
  2828  * Action that sets a template part.
  8429  * Action that sets a template part.
  2829  *
  8430  *
  2830  * @param {string} templatePartId The template part ID.
  8431  * @param {string} templatePartId The template part ID.
  2831  *
  8432  *
  2832  * @return {Object} Action object.
  8433  * @return {Object} Action object.
  2833  */
  8434  */
  2834 
       
  2835 function setTemplatePart(templatePartId) {
  8435 function setTemplatePart(templatePartId) {
  2836   return {
  8436   return {
  2837     type: 'SET_TEMPLATE_PART',
  8437     type: 'SET_EDITED_POST',
  2838     templatePartId
  8438     postType: TEMPLATE_PART_POST_TYPE,
       
  8439     id: templatePartId
  2839   };
  8440   };
  2840 }
  8441 }
  2841 /**
  8442 
  2842  * Action that sets the home template ID to the template ID of the page resolved
  8443 /**
  2843  * from a given path.
  8444  * Action that sets a navigation menu.
  2844  *
  8445  *
  2845  * @param {number} homeTemplateId The template ID for the homepage.
  8446  * @param {string} navigationMenuId The Navigation Menu Post ID.
  2846  */
  8447  *
  2847 
  8448  * @return {Object} Action object.
  2848 function setHomeTemplateId(homeTemplateId) {
  8449  */
       
  8450 function setNavigationMenu(navigationMenuId) {
  2849   return {
  8451   return {
  2850     type: 'SET_HOME_TEMPLATE',
  8452     type: 'SET_EDITED_POST',
  2851     homeTemplateId
  8453     postType: NAVIGATION_POST_TYPE,
       
  8454     id: navigationMenuId
  2852   };
  8455   };
  2853 }
  8456 }
       
  8457 
       
  8458 /**
       
  8459  * Action that sets an edited entity.
       
  8460  *
       
  8461  * @param {string} postType The entity's post type.
       
  8462  * @param {string} postId   The entity's ID.
       
  8463  * @param {Object} context  The entity's context.
       
  8464  *
       
  8465  * @return {Object} Action object.
       
  8466  */
       
  8467 function setEditedEntity(postType, postId, context) {
       
  8468   return {
       
  8469     type: 'SET_EDITED_POST',
       
  8470     postType,
       
  8471     id: postId,
       
  8472     context
       
  8473   };
       
  8474 }
       
  8475 
       
  8476 /**
       
  8477  * @deprecated
       
  8478  */
       
  8479 function setHomeTemplateId() {
       
  8480   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).setHomeTemplateId", {
       
  8481     since: '6.2',
       
  8482     version: '6.4'
       
  8483   });
       
  8484   return {
       
  8485     type: 'NOTHING'
       
  8486   };
       
  8487 }
       
  8488 
       
  8489 /**
       
  8490  * Set's the current block editor context.
       
  8491  *
       
  8492  * @param {Object} context The context object.
       
  8493  *
       
  8494  * @return {Object} Action object.
       
  8495  */
       
  8496 function setEditedPostContext(context) {
       
  8497   return {
       
  8498     type: 'SET_EDITED_POST_CONTEXT',
       
  8499     context
       
  8500   };
       
  8501 }
       
  8502 
  2854 /**
  8503 /**
  2855  * Resolves the template for a page and displays both. If no path is given, attempts
  8504  * Resolves the template for a page and displays both. If no path is given, attempts
  2856  * to use the postId to generate a path like `?p=${ postId }`.
  8505  * to use the postId to generate a path like `?p=${ postId }`.
  2857  *
  8506  *
  2858  * @param {Object} page         The page object.
  8507  * @deprecated
  2859  * @param {string} page.type    The page type.
       
  2860  * @param {string} page.slug    The page slug.
       
  2861  * @param {string} page.path    The page path.
       
  2862  * @param {Object} page.context The page context.
       
  2863  *
  8508  *
  2864  * @return {number} The resolved template ID for the page route.
  8509  * @return {Object} Action object.
  2865  */
  8510  */
  2866 
  8511 function setPage() {
  2867 const setPage = page => async _ref5 => {
  8512   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).setPage", {
  2868   var _page$context;
  8513     since: '6.5',
  2869 
  8514     version: '6.8',
  2870   let {
  8515     hint: 'The setPage is not needed anymore, the correct entity is resolved from the URL automatically.'
  2871     dispatch,
       
  2872     registry
       
  2873   } = _ref5;
       
  2874 
       
  2875   if (!page.path && (_page$context = page.context) !== null && _page$context !== void 0 && _page$context.postId) {
       
  2876     const entity = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', page.context.postType || 'post', page.context.postId); // If the entity is undefined for some reason, path will resolve to "/"
       
  2877 
       
  2878     page.path = (0,external_wp_url_namespaceObject.getPathAndQueryString)(entity === null || entity === void 0 ? void 0 : entity.link);
       
  2879   }
       
  2880 
       
  2881   const template = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).__experimentalGetTemplateForLink(page.path);
       
  2882 
       
  2883   if (!template) {
       
  2884     return;
       
  2885   }
       
  2886 
       
  2887   dispatch({
       
  2888     type: 'SET_PAGE',
       
  2889     page: template.slug ? { ...page,
       
  2890       context: { ...page.context,
       
  2891         templateSlug: template.slug
       
  2892       }
       
  2893     } : page,
       
  2894     templateId: template.id
       
  2895   });
  8516   });
  2896   return template.id;
  8517   return {
  2897 };
  8518     type: 'NOTHING'
       
  8519   };
       
  8520 }
       
  8521 
  2898 /**
  8522 /**
  2899  * Action that sets the active navigation panel menu.
  8523  * Action that sets the active navigation panel menu.
  2900  *
  8524  *
  2901  * @param {string} menu Menu prop of active menu.
  8525  * @deprecated
  2902  *
  8526  *
  2903  * @return {Object} Action object.
  8527  * @return {Object} Action object.
  2904  */
  8528  */
  2905 
  8529 function setNavigationPanelActiveMenu() {
  2906 function setNavigationPanelActiveMenu(menu) {
  8530   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu", {
       
  8531     since: '6.2',
       
  8532     version: '6.4'
       
  8533   });
  2907   return {
  8534   return {
  2908     type: 'SET_NAVIGATION_PANEL_ACTIVE_MENU',
  8535     type: 'NOTHING'
  2909     menu
       
  2910   };
  8536   };
  2911 }
  8537 }
       
  8538 
  2912 /**
  8539 /**
  2913  * Opens the navigation panel and sets its active menu at the same time.
  8540  * Opens the navigation panel and sets its active menu at the same time.
  2914  *
  8541  *
  2915  * @param {string} menu Identifies the menu to open.
  8542  * @deprecated
  2916  */
  8543  */
  2917 
  8544 function openNavigationPanelToMenu() {
  2918 function openNavigationPanelToMenu(menu) {
  8545   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu", {
       
  8546     since: '6.2',
       
  8547     version: '6.4'
       
  8548   });
  2919   return {
  8549   return {
  2920     type: 'OPEN_NAVIGATION_PANEL_TO_MENU',
  8550     type: 'NOTHING'
  2921     menu
       
  2922   };
  8551   };
  2923 }
  8552 }
       
  8553 
  2924 /**
  8554 /**
  2925  * Sets whether the navigation panel should be open.
  8555  * Sets whether the navigation panel should be open.
  2926  *
  8556  *
  2927  * @param {boolean} isOpen If true, opens the nav panel. If false, closes it. It
  8557  * @deprecated
  2928  *                         does not toggle the state, but sets it directly.
  8558  */
  2929  */
  8559 function setIsNavigationPanelOpened() {
  2930 
  8560   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened", {
  2931 function setIsNavigationPanelOpened(isOpen) {
  8561     since: '6.2',
       
  8562     version: '6.4'
       
  8563   });
  2932   return {
  8564   return {
  2933     type: 'SET_IS_NAVIGATION_PANEL_OPENED',
  8565     type: 'NOTHING'
  2934     isOpen
       
  2935   };
  8566   };
  2936 }
  8567 }
  2937 /**
  8568 
  2938  * Opens or closes the inserter.
  8569 /**
       
  8570  * Returns an action object used to open/close the inserter.
  2939  *
  8571  *
  2940  * @param {boolean|Object} value                Whether the inserter should be
  8572  * @deprecated
  2941  *                                              opened (true) or closed (false).
       
  2942  *                                              To specify an insertion point,
       
  2943  *                                              use an object.
       
  2944  * @param {string}         value.rootClientId   The root client ID to insert at.
       
  2945  * @param {number}         value.insertionIndex The index to insert at.
       
  2946  *
  8573  *
  2947  * @return {Object} Action object.
  8574  * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).
  2948  */
  8575  */
  2949 
  8576 const setIsInserterOpened = value => ({
  2950 function setIsInserterOpened(value) {
  8577   registry
  2951   return {
  8578 }) => {
  2952     type: 'SET_IS_INSERTER_OPENED',
  8579   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).setIsInserterOpened", {
  2953     value
  8580     since: '6.5',
  2954   };
  8581     alternative: "dispatch( 'core/editor').setIsInserterOpened"
  2955 }
  8582   });
       
  8583   registry.dispatch(external_wp_editor_namespaceObject.store).setIsInserterOpened(value);
       
  8584 };
       
  8585 
       
  8586 /**
       
  8587  * Returns an action object used to open/close the list view.
       
  8588  *
       
  8589  * @deprecated
       
  8590  *
       
  8591  * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.
       
  8592  */
       
  8593 const setIsListViewOpened = isOpen => ({
       
  8594   registry
       
  8595 }) => {
       
  8596   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).setIsListViewOpened", {
       
  8597     since: '6.5',
       
  8598     alternative: "dispatch( 'core/editor').setIsListViewOpened"
       
  8599   });
       
  8600   registry.dispatch(external_wp_editor_namespaceObject.store).setIsListViewOpened(isOpen);
       
  8601 };
       
  8602 
  2956 /**
  8603 /**
  2957  * Returns an action object used to update the settings.
  8604  * Returns an action object used to update the settings.
  2958  *
  8605  *
  2959  * @param {Object} settings New settings.
  8606  * @param {Object} settings New settings.
  2960  *
  8607  *
  2961  * @return {Object} Action object.
  8608  * @return {Object} Action object.
  2962  */
  8609  */
  2963 
       
  2964 function updateSettings(settings) {
  8610 function updateSettings(settings) {
  2965   return {
  8611   return {
  2966     type: 'UPDATE_SETTINGS',
  8612     type: 'UPDATE_SETTINGS',
  2967     settings
  8613     settings
  2968   };
  8614   };
  2969 }
  8615 }
  2970 /**
  8616 
  2971  * Sets whether the list view panel should be open.
  8617 /**
       
  8618  * Sets whether the save view panel should be open.
  2972  *
  8619  *
  2973  * @param {boolean} isOpen If true, opens the list view. If false, closes it.
  8620  * @param {boolean} isOpen If true, opens the save view. If false, closes it.
  2974  *                         It does not toggle the state, but sets it directly.
  8621  *                         It does not toggle the state, but sets it directly.
  2975  */
  8622  */
  2976 
  8623 function setIsSaveViewOpened(isOpen) {
  2977 function setIsListViewOpened(isOpen) {
       
  2978   return {
  8624   return {
  2979     type: 'SET_IS_LIST_VIEW_OPENED',
  8625     type: 'SET_IS_SAVE_VIEW_OPENED',
  2980     isOpen
  8626     isOpen
  2981   };
  8627   };
  2982 }
  8628 }
       
  8629 
  2983 /**
  8630 /**
  2984  * Reverts a template to its original theme-provided file.
  8631  * Reverts a template to its original theme-provided file.
  2985  *
  8632  *
  2986  * @param {Object}  template            The template to revert.
  8633  * @param {Object}  template            The template to revert.
  2987  * @param {Object}  [options]
  8634  * @param {Object}  [options]
  2988  * @param {boolean} [options.allowUndo] Whether to allow the user to undo
  8635  * @param {boolean} [options.allowUndo] Whether to allow the user to undo
  2989  *                                      reverting the template. Default true.
  8636  *                                      reverting the template. Default true.
  2990  */
  8637  */
  2991 
  8638 const revertTemplate = (template, options) => ({
  2992 const revertTemplate = function (template) {
  8639   registry
  2993   let {
  8640 }) => {
  2994     allowUndo = true
  8641   return lock_unlock_unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).revertTemplate(template, options);
  2995   } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
  2996   return async _ref6 => {
       
  2997     let {
       
  2998       registry
       
  2999     } = _ref6;
       
  3000 
       
  3001     if (!isTemplateRevertable(template)) {
       
  3002       registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice((0,external_wp_i18n_namespaceObject.__)('This template is not revertable.'), {
       
  3003         type: 'snackbar'
       
  3004       });
       
  3005       return;
       
  3006     }
       
  3007 
       
  3008     try {
       
  3009       var _fileTemplate$content;
       
  3010 
       
  3011       const templateEntityConfig = registry.select(external_wp_coreData_namespaceObject.store).getEntityConfig('postType', template.type);
       
  3012 
       
  3013       if (!templateEntityConfig) {
       
  3014         registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice((0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error. Please reload.'), {
       
  3015           type: 'snackbar'
       
  3016         });
       
  3017         return;
       
  3018       }
       
  3019 
       
  3020       const fileTemplatePath = (0,external_wp_url_namespaceObject.addQueryArgs)(`${templateEntityConfig.baseURL}/${template.id}`, {
       
  3021         context: 'edit',
       
  3022         source: 'theme'
       
  3023       });
       
  3024       const fileTemplate = await external_wp_apiFetch_default()({
       
  3025         path: fileTemplatePath
       
  3026       });
       
  3027 
       
  3028       if (!fileTemplate) {
       
  3029         registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice((0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error. Please reload.'), {
       
  3030           type: 'snackbar'
       
  3031         });
       
  3032         return;
       
  3033       }
       
  3034 
       
  3035       const serializeBlocks = _ref7 => {
       
  3036         let {
       
  3037           blocks: blocksForSerialization = []
       
  3038         } = _ref7;
       
  3039         return (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocksForSerialization);
       
  3040       };
       
  3041 
       
  3042       const edited = registry.select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', template.type, template.id); // We are fixing up the undo level here to make sure we can undo
       
  3043       // the revert in the header toolbar correctly.
       
  3044 
       
  3045       registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord('postType', template.type, template.id, {
       
  3046         content: serializeBlocks,
       
  3047         // Required to make the `undo` behave correctly.
       
  3048         blocks: edited.blocks,
       
  3049         // Required to revert the blocks in the editor.
       
  3050         source: 'custom' // required to avoid turning the editor into a dirty state
       
  3051 
       
  3052       }, {
       
  3053         undoIgnore: true // Required to merge this edit with the last undo level.
       
  3054 
       
  3055       });
       
  3056       const blocks = (0,external_wp_blocks_namespaceObject.parse)(fileTemplate === null || fileTemplate === void 0 ? void 0 : (_fileTemplate$content = fileTemplate.content) === null || _fileTemplate$content === void 0 ? void 0 : _fileTemplate$content.raw);
       
  3057       registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord('postType', template.type, fileTemplate.id, {
       
  3058         content: serializeBlocks,
       
  3059         blocks,
       
  3060         source: 'theme'
       
  3061       });
       
  3062 
       
  3063       if (allowUndo) {
       
  3064         const undoRevert = () => {
       
  3065           registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord('postType', template.type, edited.id, {
       
  3066             content: serializeBlocks,
       
  3067             blocks: edited.blocks,
       
  3068             source: 'custom'
       
  3069           });
       
  3070         };
       
  3071 
       
  3072         registry.dispatch(external_wp_notices_namespaceObject.store).createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Template reverted.'), {
       
  3073           type: 'snackbar',
       
  3074           actions: [{
       
  3075             label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
       
  3076             onClick: undoRevert
       
  3077           }]
       
  3078         });
       
  3079       } else {
       
  3080         registry.dispatch(external_wp_notices_namespaceObject.store).createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Template reverted.'));
       
  3081       }
       
  3082     } catch (error) {
       
  3083       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('Template revert failed. Please reload.');
       
  3084       registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice(errorMessage, {
       
  3085         type: 'snackbar'
       
  3086       });
       
  3087     }
       
  3088   };
       
  3089 };
  8642 };
       
  8643 
  3090 /**
  8644 /**
  3091  * Action that opens an editor sidebar.
  8645  * Action that opens an editor sidebar.
  3092  *
  8646  *
  3093  * @param {?string} name Sidebar name to be opened.
  8647  * @param {?string} name Sidebar name to be opened.
  3094  */
  8648  */
  3095 
  8649 const openGeneralSidebar = name => ({
  3096 const openGeneralSidebar = name => _ref8 => {
  8650   registry
  3097   let {
  8651 }) => {
  3098     registry
  8652   registry.dispatch(interfaceStore).enableComplementaryArea('core', name);
  3099   } = _ref8;
       
  3100   registry.dispatch(store).enableComplementaryArea(STORE_NAME, name);
       
  3101 };
  8653 };
       
  8654 
  3102 /**
  8655 /**
  3103  * Action that closes the sidebar.
  8656  * Action that closes the sidebar.
  3104  */
  8657  */
  3105 
  8658 const closeGeneralSidebar = () => ({
  3106 const closeGeneralSidebar = () => _ref9 => {
  8659   registry
  3107   let {
  8660 }) => {
  3108     registry
  8661   registry.dispatch(interfaceStore).disableComplementaryArea('core');
  3109   } = _ref9;
       
  3110   registry.dispatch(store).disableComplementaryArea(STORE_NAME);
       
  3111 };
  8662 };
  3112 const switchEditorMode = mode => _ref10 => {
  8663 
  3113   let {
  8664 /**
  3114     registry
  8665  * Triggers an action used to switch editor mode.
  3115   } = _ref10;
  8666  *
  3116   registry.dispatch('core/preferences').set('core/edit-site', 'editorMode', mode); // Unselect blocks when we switch to a non visual mode.
  8667  * @deprecated
  3117 
  8668  *
  3118   if (mode !== 'visual') {
  8669  * @param {string} mode The editor mode.
       
  8670  */
       
  8671 const switchEditorMode = mode => ({
       
  8672   registry
       
  8673 }) => {
       
  8674   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).switchEditorMode", {
       
  8675     since: '6.6',
       
  8676     alternative: "dispatch( 'core/editor').switchEditorMode"
       
  8677   });
       
  8678   registry.dispatch(external_wp_editor_namespaceObject.store).switchEditorMode(mode);
       
  8679 };
       
  8680 
       
  8681 /**
       
  8682  * Sets whether or not the editor allows only page content to be edited.
       
  8683  *
       
  8684  * @param {boolean} hasPageContentFocus True to allow only page content to be
       
  8685  *                                      edited, false to allow template to be
       
  8686  *                                      edited.
       
  8687  */
       
  8688 const setHasPageContentFocus = hasPageContentFocus => ({
       
  8689   dispatch,
       
  8690   registry
       
  8691 }) => {
       
  8692   external_wp_deprecated_default()(`dispatch( 'core/edit-site' ).setHasPageContentFocus`, {
       
  8693     since: '6.5'
       
  8694   });
       
  8695   if (hasPageContentFocus) {
  3119     registry.dispatch(external_wp_blockEditor_namespaceObject.store).clearSelectedBlock();
  8696     registry.dispatch(external_wp_blockEditor_namespaceObject.store).clearSelectedBlock();
  3120   }
  8697   }
  3121 
  8698   dispatch({
  3122   if (mode === 'visual') {
  8699     type: 'SET_HAS_PAGE_CONTENT_FOCUS',
  3123     (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Visual editor selected'), 'assertive');
  8700     hasPageContentFocus
  3124   } else if (mode === 'mosaic') {
  8701   });
  3125     (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Mosaic view selected'), 'assertive');
  8702 };
       
  8703 
       
  8704 /**
       
  8705  * Action that toggles Distraction free mode.
       
  8706  * Distraction free mode expects there are no sidebars, as due to the
       
  8707  * z-index values set, you can't close sidebars.
       
  8708  *
       
  8709  * @deprecated
       
  8710  */
       
  8711 const toggleDistractionFree = () => ({
       
  8712   registry
       
  8713 }) => {
       
  8714   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).toggleDistractionFree", {
       
  8715     since: '6.6',
       
  8716     alternative: "dispatch( 'core/editor').toggleDistractionFree"
       
  8717   });
       
  8718   registry.dispatch(external_wp_editor_namespaceObject.store).toggleDistractionFree();
       
  8719 };
       
  8720 
       
  8721 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/private-actions.js
       
  8722 /**
       
  8723  * WordPress dependencies
       
  8724  */
       
  8725 
       
  8726 
       
  8727 
       
  8728 
       
  8729 /**
       
  8730  * Action that switches the canvas mode.
       
  8731  *
       
  8732  * @param {?string} mode Canvas mode.
       
  8733  */
       
  8734 const setCanvasMode = mode => ({
       
  8735   registry,
       
  8736   dispatch
       
  8737 }) => {
       
  8738   const isMediumOrBigger = window.matchMedia('(min-width: 782px)').matches;
       
  8739   const switchCanvasMode = () => {
       
  8740     registry.batch(() => {
       
  8741       registry.dispatch(external_wp_blockEditor_namespaceObject.store).clearSelectedBlock();
       
  8742       registry.dispatch(external_wp_editor_namespaceObject.store).setDeviceType('Desktop');
       
  8743       registry.dispatch(external_wp_blockEditor_namespaceObject.store).__unstableSetEditorMode('edit');
       
  8744       const isPublishSidebarOpened = registry.select(external_wp_editor_namespaceObject.store).isPublishSidebarOpened();
       
  8745       dispatch({
       
  8746         type: 'SET_CANVAS_MODE',
       
  8747         mode
       
  8748       });
       
  8749       const isEditMode = mode === 'edit';
       
  8750       if (isPublishSidebarOpened && !isEditMode) {
       
  8751         registry.dispatch(external_wp_editor_namespaceObject.store).closePublishSidebar();
       
  8752       }
       
  8753 
       
  8754       // Check if the block list view should be open by default.
       
  8755       // If `distractionFree` mode is enabled, the block list view should not be open.
       
  8756       // This behavior is disabled for small viewports.
       
  8757       if (isMediumOrBigger && isEditMode && registry.select(external_wp_preferences_namespaceObject.store).get('core', 'showListViewByDefault') && !registry.select(external_wp_preferences_namespaceObject.store).get('core', 'distractionFree')) {
       
  8758         registry.dispatch(external_wp_editor_namespaceObject.store).setIsListViewOpened(true);
       
  8759       } else {
       
  8760         registry.dispatch(external_wp_editor_namespaceObject.store).setIsListViewOpened(false);
       
  8761       }
       
  8762       registry.dispatch(external_wp_editor_namespaceObject.store).setIsInserterOpened(false);
       
  8763     });
       
  8764   };
       
  8765 
       
  8766   /*
       
  8767    * Skip transition in mobile, otherwise it crashes the browser.
       
  8768    * See: https://github.com/WordPress/gutenberg/pull/63002.
       
  8769    */
       
  8770   if (!isMediumOrBigger || !document.startViewTransition) {
       
  8771     switchCanvasMode();
       
  8772   } else {
       
  8773     document.documentElement.classList.add(`canvas-mode-${mode}-transition`);
       
  8774     const transition = document.startViewTransition(() => switchCanvasMode());
       
  8775     transition.finished.finally(() => {
       
  8776       document.documentElement.classList.remove(`canvas-mode-${mode}-transition`);
       
  8777     });
  3126   }
  8778   }
  3127 };
  8779 };
  3128 
  8780 
  3129 ;// CONCATENATED MODULE: ./node_modules/rememo/es/rememo.js
  8781 /**
  3130 
  8782  * Action that switches the editor canvas container view.
  3131 
       
  3132 var LEAF_KEY, hasWeakMap;
       
  3133 
       
  3134 /**
       
  3135  * Arbitrary value used as key for referencing cache object in WeakMap tree.
       
  3136  *
  8783  *
  3137  * @type {Object}
  8784  * @param {?string} view Editor canvas container view.
  3138  */
  8785  */
  3139 LEAF_KEY = {};
  8786 const setEditorCanvasContainerView = view => ({
  3140 
  8787   dispatch
  3141 /**
  8788 }) => {
  3142  * Whether environment supports WeakMap.
  8789   dispatch({
  3143  *
  8790     type: 'SET_EDITOR_CANVAS_CONTAINER_VIEW',
  3144  * @type {boolean}
  8791     view
  3145  */
  8792   });
  3146 hasWeakMap = typeof WeakMap !== 'undefined';
  8793 };
  3147 
  8794 
  3148 /**
  8795 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/selectors.js
  3149  * Returns the first argument as the sole entry in an array.
  8796 /**
  3150  *
  8797  * WordPress dependencies
  3151  * @param {*} value Value to return.
  8798  */
  3152  *
  8799 
  3153  * @return {Array} Value returned as entry in array.
  8800 
  3154  */
  8801 
  3155 function arrayOf( value ) {
  8802 
  3156 	return [ value ];
  8803 
  3157 }
  8804 
  3158 
       
  3159 /**
       
  3160  * Returns true if the value passed is object-like, or false otherwise. A value
       
  3161  * is object-like if it can support property assignment, e.g. object or array.
       
  3162  *
       
  3163  * @param {*} value Value to test.
       
  3164  *
       
  3165  * @return {boolean} Whether value is object-like.
       
  3166  */
       
  3167 function isObjectLike( value ) {
       
  3168 	return !! value && 'object' === typeof value;
       
  3169 }
       
  3170 
       
  3171 /**
       
  3172  * Creates and returns a new cache object.
       
  3173  *
       
  3174  * @return {Object} Cache object.
       
  3175  */
       
  3176 function createCache() {
       
  3177 	var cache = {
       
  3178 		clear: function() {
       
  3179 			cache.head = null;
       
  3180 		},
       
  3181 	};
       
  3182 
       
  3183 	return cache;
       
  3184 }
       
  3185 
       
  3186 /**
       
  3187  * Returns true if entries within the two arrays are strictly equal by
       
  3188  * reference from a starting index.
       
  3189  *
       
  3190  * @param {Array}  a         First array.
       
  3191  * @param {Array}  b         Second array.
       
  3192  * @param {number} fromIndex Index from which to start comparison.
       
  3193  *
       
  3194  * @return {boolean} Whether arrays are shallowly equal.
       
  3195  */
       
  3196 function isShallowEqual( a, b, fromIndex ) {
       
  3197 	var i;
       
  3198 
       
  3199 	if ( a.length !== b.length ) {
       
  3200 		return false;
       
  3201 	}
       
  3202 
       
  3203 	for ( i = fromIndex; i < a.length; i++ ) {
       
  3204 		if ( a[ i ] !== b[ i ] ) {
       
  3205 			return false;
       
  3206 		}
       
  3207 	}
       
  3208 
       
  3209 	return true;
       
  3210 }
       
  3211 
       
  3212 /**
       
  3213  * Returns a memoized selector function. The getDependants function argument is
       
  3214  * called before the memoized selector and is expected to return an immutable
       
  3215  * reference or array of references on which the selector depends for computing
       
  3216  * its own return value. The memoize cache is preserved only as long as those
       
  3217  * dependant references remain the same. If getDependants returns a different
       
  3218  * reference(s), the cache is cleared and the selector value regenerated.
       
  3219  *
       
  3220  * @param {Function} selector      Selector function.
       
  3221  * @param {Function} getDependants Dependant getter returning an immutable
       
  3222  *                                 reference or array of reference used in
       
  3223  *                                 cache bust consideration.
       
  3224  *
       
  3225  * @return {Function} Memoized selector.
       
  3226  */
       
  3227 /* harmony default export */ function rememo(selector, getDependants ) {
       
  3228 	var rootCache, getCache;
       
  3229 
       
  3230 	// Use object source as dependant if getter not provided
       
  3231 	if ( ! getDependants ) {
       
  3232 		getDependants = arrayOf;
       
  3233 	}
       
  3234 
       
  3235 	/**
       
  3236 	 * Returns the root cache. If WeakMap is supported, this is assigned to the
       
  3237 	 * root WeakMap cache set, otherwise it is a shared instance of the default
       
  3238 	 * cache object.
       
  3239 	 *
       
  3240 	 * @return {(WeakMap|Object)} Root cache object.
       
  3241 	 */
       
  3242 	function getRootCache() {
       
  3243 		return rootCache;
       
  3244 	}
       
  3245 
       
  3246 	/**
       
  3247 	 * Returns the cache for a given dependants array. When possible, a WeakMap
       
  3248 	 * will be used to create a unique cache for each set of dependants. This
       
  3249 	 * is feasible due to the nature of WeakMap in allowing garbage collection
       
  3250 	 * to occur on entries where the key object is no longer referenced. Since
       
  3251 	 * WeakMap requires the key to be an object, this is only possible when the
       
  3252 	 * dependant is object-like. The root cache is created as a hierarchy where
       
  3253 	 * each top-level key is the first entry in a dependants set, the value a
       
  3254 	 * WeakMap where each key is the next dependant, and so on. This continues
       
  3255 	 * so long as the dependants are object-like. If no dependants are object-
       
  3256 	 * like, then the cache is shared across all invocations.
       
  3257 	 *
       
  3258 	 * @see isObjectLike
       
  3259 	 *
       
  3260 	 * @param {Array} dependants Selector dependants.
       
  3261 	 *
       
  3262 	 * @return {Object} Cache object.
       
  3263 	 */
       
  3264 	function getWeakMapCache( dependants ) {
       
  3265 		var caches = rootCache,
       
  3266 			isUniqueByDependants = true,
       
  3267 			i, dependant, map, cache;
       
  3268 
       
  3269 		for ( i = 0; i < dependants.length; i++ ) {
       
  3270 			dependant = dependants[ i ];
       
  3271 
       
  3272 			// Can only compose WeakMap from object-like key.
       
  3273 			if ( ! isObjectLike( dependant ) ) {
       
  3274 				isUniqueByDependants = false;
       
  3275 				break;
       
  3276 			}
       
  3277 
       
  3278 			// Does current segment of cache already have a WeakMap?
       
  3279 			if ( caches.has( dependant ) ) {
       
  3280 				// Traverse into nested WeakMap.
       
  3281 				caches = caches.get( dependant );
       
  3282 			} else {
       
  3283 				// Create, set, and traverse into a new one.
       
  3284 				map = new WeakMap();
       
  3285 				caches.set( dependant, map );
       
  3286 				caches = map;
       
  3287 			}
       
  3288 		}
       
  3289 
       
  3290 		// We use an arbitrary (but consistent) object as key for the last item
       
  3291 		// in the WeakMap to serve as our running cache.
       
  3292 		if ( ! caches.has( LEAF_KEY ) ) {
       
  3293 			cache = createCache();
       
  3294 			cache.isUniqueByDependants = isUniqueByDependants;
       
  3295 			caches.set( LEAF_KEY, cache );
       
  3296 		}
       
  3297 
       
  3298 		return caches.get( LEAF_KEY );
       
  3299 	}
       
  3300 
       
  3301 	// Assign cache handler by availability of WeakMap
       
  3302 	getCache = hasWeakMap ? getWeakMapCache : getRootCache;
       
  3303 
       
  3304 	/**
       
  3305 	 * Resets root memoization cache.
       
  3306 	 */
       
  3307 	function clear() {
       
  3308 		rootCache = hasWeakMap ? new WeakMap() : createCache();
       
  3309 	}
       
  3310 
       
  3311 	// eslint-disable-next-line jsdoc/check-param-names
       
  3312 	/**
       
  3313 	 * The augmented selector call, considering first whether dependants have
       
  3314 	 * changed before passing it to underlying memoize function.
       
  3315 	 *
       
  3316 	 * @param {Object} source    Source object for derivation.
       
  3317 	 * @param {...*}   extraArgs Additional arguments to pass to selector.
       
  3318 	 *
       
  3319 	 * @return {*} Selector result.
       
  3320 	 */
       
  3321 	function callSelector( /* source, ...extraArgs */ ) {
       
  3322 		var len = arguments.length,
       
  3323 			cache, node, i, args, dependants;
       
  3324 
       
  3325 		// Create copy of arguments (avoid leaking deoptimization).
       
  3326 		args = new Array( len );
       
  3327 		for ( i = 0; i < len; i++ ) {
       
  3328 			args[ i ] = arguments[ i ];
       
  3329 		}
       
  3330 
       
  3331 		dependants = getDependants.apply( null, args );
       
  3332 		cache = getCache( dependants );
       
  3333 
       
  3334 		// If not guaranteed uniqueness by dependants (primitive type or lack
       
  3335 		// of WeakMap support), shallow compare against last dependants and, if
       
  3336 		// references have changed, destroy cache to recalculate result.
       
  3337 		if ( ! cache.isUniqueByDependants ) {
       
  3338 			if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
       
  3339 				cache.clear();
       
  3340 			}
       
  3341 
       
  3342 			cache.lastDependants = dependants;
       
  3343 		}
       
  3344 
       
  3345 		node = cache.head;
       
  3346 		while ( node ) {
       
  3347 			// Check whether node arguments match arguments
       
  3348 			if ( ! isShallowEqual( node.args, args, 1 ) ) {
       
  3349 				node = node.next;
       
  3350 				continue;
       
  3351 			}
       
  3352 
       
  3353 			// At this point we can assume we've found a match
       
  3354 
       
  3355 			// Surface matched node to head if not already
       
  3356 			if ( node !== cache.head ) {
       
  3357 				// Adjust siblings to point to each other.
       
  3358 				node.prev.next = node.next;
       
  3359 				if ( node.next ) {
       
  3360 					node.next.prev = node.prev;
       
  3361 				}
       
  3362 
       
  3363 				node.next = cache.head;
       
  3364 				node.prev = null;
       
  3365 				cache.head.prev = node;
       
  3366 				cache.head = node;
       
  3367 			}
       
  3368 
       
  3369 			// Return immediately
       
  3370 			return node.val;
       
  3371 		}
       
  3372 
       
  3373 		// No cached value found. Continue to insertion phase:
       
  3374 
       
  3375 		node = {
       
  3376 			// Generate the result from original function
       
  3377 			val: selector.apply( null, args ),
       
  3378 		};
       
  3379 
       
  3380 		// Avoid including the source object in the cache.
       
  3381 		args[ 0 ] = null;
       
  3382 		node.args = args;
       
  3383 
       
  3384 		// Don't need to check whether node is already head, since it would
       
  3385 		// have been returned above already if it was
       
  3386 
       
  3387 		// Shift existing head down list
       
  3388 		if ( cache.head ) {
       
  3389 			cache.head.prev = node;
       
  3390 			node.next = cache.head;
       
  3391 		}
       
  3392 
       
  3393 		cache.head = node;
       
  3394 
       
  3395 		return node.val;
       
  3396 	}
       
  3397 
       
  3398 	callSelector.getDependants = getDependants;
       
  3399 	callSelector.clear = clear;
       
  3400 	clear();
       
  3401 
       
  3402 	return callSelector;
       
  3403 }
       
  3404 
       
  3405 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js
       
  3406 /**
       
  3407  * External dependencies
       
  3408  */
       
  3409 
  8805 
  3410 /**
  8806 /**
  3411  * Internal dependencies
  8807  * Internal dependencies
  3412  */
  8808  */
  3413 
  8809 
  3414 
  8810 
  3415 function isTemplateSuperseded(slug, existingSlugs, showOnFront) {
       
  3416   if (!TEMPLATE_OVERRIDES[slug]) {
       
  3417     return false;
       
  3418   } // `home` template is unused if it is superseded by `front-page`
       
  3419   // or "show on front" is set to show a page rather than blog posts.
       
  3420 
       
  3421 
       
  3422   if (slug === 'home' && showOnFront !== 'posts') {
       
  3423     return true;
       
  3424   }
       
  3425 
       
  3426   return TEMPLATE_OVERRIDES[slug].every(overrideSlug => existingSlugs.includes(overrideSlug) || isTemplateSuperseded(overrideSlug, existingSlugs, showOnFront));
       
  3427 }
       
  3428 function getTemplateLocation(slug) {
       
  3429   const isTopLevelTemplate = TEMPLATES_TOP_LEVEL.includes(slug);
       
  3430 
       
  3431   if (isTopLevelTemplate) {
       
  3432     return MENU_TEMPLATES;
       
  3433   }
       
  3434 
       
  3435   const isGeneralTemplate = TEMPLATES_GENERAL.includes(slug);
       
  3436 
       
  3437   if (isGeneralTemplate) {
       
  3438     return MENU_TEMPLATES_GENERAL;
       
  3439   }
       
  3440 
       
  3441   const isPostsTemplate = TEMPLATES_POSTS_PREFIXES.some(prefix => slug.startsWith(prefix));
       
  3442 
       
  3443   if (isPostsTemplate) {
       
  3444     return MENU_TEMPLATES_POSTS;
       
  3445   }
       
  3446 
       
  3447   const isPagesTemplate = TEMPLATES_PAGES_PREFIXES.some(prefix => slug.startsWith(prefix));
       
  3448 
       
  3449   if (isPagesTemplate) {
       
  3450     return MENU_TEMPLATES_PAGES;
       
  3451   }
       
  3452 
       
  3453   return MENU_TEMPLATES_GENERAL;
       
  3454 }
       
  3455 function getUnusedTemplates(templates, showOnFront) {
       
  3456   const templateSlugs = map(templates, 'slug');
       
  3457   const supersededTemplates = templates.filter(_ref => {
       
  3458     let {
       
  3459       slug
       
  3460     } = _ref;
       
  3461     return isTemplateSuperseded(slug, templateSlugs, showOnFront);
       
  3462   });
       
  3463   return supersededTemplates;
       
  3464 }
       
  3465 function getTemplatesLocationMap(templates) {
       
  3466   return templates.reduce((obj, template) => {
       
  3467     obj[template.slug] = getTemplateLocation(template.slug);
       
  3468     return obj;
       
  3469   }, {});
       
  3470 }
       
  3471 
       
  3472 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/selectors.js
       
  3473 /**
       
  3474  * External dependencies
       
  3475  */
       
  3476 
       
  3477 
       
  3478 /**
       
  3479  * WordPress dependencies
       
  3480  */
       
  3481 
       
  3482 
       
  3483 
       
  3484 
       
  3485 
       
  3486 
       
  3487 
       
  3488 
       
  3489 /**
       
  3490  * Internal dependencies
       
  3491  */
       
  3492 
       
  3493 
       
  3494 
       
  3495 /**
  8811 /**
  3496  * @typedef {'template'|'template_type'} TemplateType Template type.
  8812  * @typedef {'template'|'template_type'} TemplateType Template type.
  3497  */
  8813  */
  3498 
  8814 
  3499 /**
       
  3500  * Helper for getting a preference from the preferences store.
       
  3501  *
       
  3502  * This is only present so that `getSettings` doesn't need to be made a
       
  3503  * registry selector.
       
  3504  *
       
  3505  * It's unstable because the selector needs to be exported and so part of the
       
  3506  * public API to work.
       
  3507  */
       
  3508 
       
  3509 const __unstableGetPreference = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, name) => select(external_wp_preferences_namespaceObject.store).get('core/edit-site', name));
       
  3510 /**
  8815 /**
  3511  * Returns whether the given feature is enabled or not.
  8816  * Returns whether the given feature is enabled or not.
  3512  *
  8817  *
       
  8818  * @deprecated
  3513  * @param {Object} state       Global application state.
  8819  * @param {Object} state       Global application state.
  3514  * @param {string} featureName Feature slug.
  8820  * @param {string} featureName Feature slug.
  3515  *
  8821  *
  3516  * @return {boolean} Is active.
  8822  * @return {boolean} Is active.
  3517  */
  8823  */
  3518 
  8824 const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (_, featureName) => {
  3519 function selectors_isFeatureActive(state, featureName) {
  8825   external_wp_deprecated_default()(`select( 'core/edit-site' ).isFeatureActive`, {
  3520   external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive`, {
       
  3521     since: '6.0',
  8826     since: '6.0',
  3522     alternative: `select( 'core/preferences' ).get`
  8827     alternative: `select( 'core/preferences' ).get`
  3523   });
  8828   });
  3524   return !!__unstableGetPreference(state, featureName);
  8829   return !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', featureName);
  3525 }
  8830 });
       
  8831 
  3526 /**
  8832 /**
  3527  * Returns the current editing canvas device type.
  8833  * Returns the current editing canvas device type.
       
  8834  *
       
  8835  * @deprecated
  3528  *
  8836  *
  3529  * @param {Object} state Global application state.
  8837  * @param {Object} state Global application state.
  3530  *
  8838  *
  3531  * @return {string} Device type.
  8839  * @return {string} Device type.
  3532  */
  8840  */
  3533 
  8841 const __experimentalGetPreviewDeviceType = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  3534 function __experimentalGetPreviewDeviceType(state) {
  8842   external_wp_deprecated_default()(`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`, {
  3535   return state.deviceType;
  8843     since: '6.5',
  3536 }
  8844     version: '6.7',
       
  8845     alternative: `select( 'core/editor' ).getDeviceType`
       
  8846   });
       
  8847   return select(external_wp_editor_namespaceObject.store).getDeviceType();
       
  8848 });
       
  8849 
  3537 /**
  8850 /**
  3538  * Returns whether the current user can create media or not.
  8851  * Returns whether the current user can create media or not.
  3539  *
  8852  *
  3540  * @param {Object} state Global application state.
  8853  * @param {Object} state Global application state.
  3541  *
  8854  *
  3542  * @return {Object} Whether the current user can create media or not.
  8855  * @return {Object} Whether the current user can create media or not.
  3543  */
  8856  */
  3544 
       
  3545 const getCanUserCreateMedia = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => select(external_wp_coreData_namespaceObject.store).canUser('create', 'media'));
  8857 const getCanUserCreateMedia = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => select(external_wp_coreData_namespaceObject.store).canUser('create', 'media'));
       
  8858 
  3546 /**
  8859 /**
  3547  * Returns any available Reusable blocks.
  8860  * Returns any available Reusable blocks.
  3548  *
  8861  *
  3549  * @param {Object} state Global application state.
  8862  * @param {Object} state Global application state.
  3550  *
  8863  *
  3551  * @return {Array} The available reusable blocks.
  8864  * @return {Array} The available reusable blocks.
  3552  */
  8865  */
  3553 
       
  3554 const getReusableBlocks = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  8866 const getReusableBlocks = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
       
  8867   external_wp_deprecated_default()("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )", {
       
  8868     since: '6.5',
       
  8869     version: '6.8'
       
  8870   });
  3555   const isWeb = external_wp_element_namespaceObject.Platform.OS === 'web';
  8871   const isWeb = external_wp_element_namespaceObject.Platform.OS === 'web';
  3556   return isWeb ? select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', 'wp_block', {
  8872   return isWeb ? select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', 'wp_block', {
  3557     per_page: -1
  8873     per_page: -1
  3558   }) : [];
  8874   }) : [];
  3559 });
  8875 });
  3560 /**
  8876 
  3561  * Returns the settings, taking into account active features and permissions.
  8877 /**
  3562  *
  8878  * Returns the site editor settings.
  3563  * @param {Object}   state             Global application state.
       
  3564  * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.
       
  3565  *
       
  3566  * @return {Object} Settings.
       
  3567  */
       
  3568 
       
  3569 const getSettings = rememo((state, setIsInserterOpen) => {
       
  3570   const settings = { ...state.settings,
       
  3571     outlineMode: true,
       
  3572     focusMode: !!__unstableGetPreference(state, 'focusMode'),
       
  3573     hasFixedToolbar: !!__unstableGetPreference(state, 'fixedToolbar'),
       
  3574     keepCaretInsideBlock: !!__unstableGetPreference(state, 'keepCaretInsideBlock'),
       
  3575     showIconLabels: !!__unstableGetPreference(state, 'showIconLabels'),
       
  3576     __experimentalSetIsInserterOpened: setIsInserterOpen,
       
  3577     __experimentalReusableBlocks: getReusableBlocks(state),
       
  3578     __experimentalPreferPatternsOnRoot: 'wp_template' === getEditedPostType(state)
       
  3579   };
       
  3580   const canUserCreateMedia = getCanUserCreateMedia(state);
       
  3581 
       
  3582   if (!canUserCreateMedia) {
       
  3583     return settings;
       
  3584   }
       
  3585 
       
  3586   settings.mediaUpload = _ref => {
       
  3587     let {
       
  3588       onError,
       
  3589       ...rest
       
  3590     } = _ref;
       
  3591     (0,external_wp_mediaUtils_namespaceObject.uploadMedia)({
       
  3592       wpAllowedMimeTypes: state.settings.allowedMimeTypes,
       
  3593       onError: _ref2 => {
       
  3594         let {
       
  3595           message
       
  3596         } = _ref2;
       
  3597         return onError(message);
       
  3598       },
       
  3599       ...rest
       
  3600     });
       
  3601   };
       
  3602 
       
  3603   return settings;
       
  3604 }, state => [getCanUserCreateMedia(state), state.settings, __unstableGetPreference(state, 'focusMode'), __unstableGetPreference(state, 'fixedToolbar'), __unstableGetPreference(state, 'keepCaretInsideBlock'), __unstableGetPreference(state, 'showIconLabels'), getReusableBlocks(state), getEditedPostType(state)]);
       
  3605 /**
       
  3606  * Returns the current home template ID.
       
  3607  *
  8879  *
  3608  * @param {Object} state Global application state.
  8880  * @param {Object} state Global application state.
  3609  *
  8881  *
  3610  * @return {number?} Home template ID.
  8882  * @return {Object} Settings.
  3611  */
  8883  */
  3612 
  8884 function getSettings(state) {
  3613 function getHomeTemplateId(state) {
  8885   // It is important that we don't inject anything into these settings locally.
  3614   return state.homeTemplateId;
  8886   // The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.
  3615 }
  8887   // If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.
  3616 
  8888   return state.settings;
  3617 function getCurrentEditedPost(state) {
  8889 }
  3618   return state.editedPost;
  8890 
  3619 }
  8891 /**
       
  8892  * @deprecated
       
  8893  */
       
  8894 function getHomeTemplateId() {
       
  8895   external_wp_deprecated_default()("select( 'core/edit-site' ).getHomeTemplateId", {
       
  8896     since: '6.2',
       
  8897     version: '6.4'
       
  8898   });
       
  8899 }
       
  8900 
  3620 /**
  8901 /**
  3621  * Returns the current edited post type (wp_template or wp_template_part).
  8902  * Returns the current edited post type (wp_template or wp_template_part).
  3622  *
  8903  *
  3623  * @param {Object} state Global application state.
  8904  * @param {Object} state Global application state.
  3624  *
  8905  *
  3625  * @return {TemplateType?} Template type.
  8906  * @return {?TemplateType} Template type.
  3626  */
  8907  */
  3627 
       
  3628 
       
  3629 function getEditedPostType(state) {
  8908 function getEditedPostType(state) {
  3630   return getCurrentEditedPost(state).type;
  8909   return state.editedPost.postType;
  3631 }
  8910 }
       
  8911 
  3632 /**
  8912 /**
  3633  * Returns the ID of the currently edited template or template part.
  8913  * Returns the ID of the currently edited template or template part.
  3634  *
  8914  *
  3635  * @param {Object} state Global application state.
  8915  * @param {Object} state Global application state.
  3636  *
  8916  *
  3637  * @return {string?} Post ID.
  8917  * @return {?string} Post ID.
  3638  */
  8918  */
  3639 
       
  3640 function getEditedPostId(state) {
  8919 function getEditedPostId(state) {
  3641   return getCurrentEditedPost(state).id;
  8920   return state.editedPost.id;
  3642 }
  8921 }
       
  8922 
       
  8923 /**
       
  8924  * Returns the edited post's context object.
       
  8925  *
       
  8926  * @deprecated
       
  8927  * @param {Object} state Global application state.
       
  8928  *
       
  8929  * @return {Object} Page.
       
  8930  */
       
  8931 function getEditedPostContext(state) {
       
  8932   return state.editedPost.context;
       
  8933 }
       
  8934 
  3643 /**
  8935 /**
  3644  * Returns the current page object.
  8936  * Returns the current page object.
       
  8937  *
       
  8938  * @deprecated
       
  8939  * @param {Object} state Global application state.
       
  8940  *
       
  8941  * @return {Object} Page.
       
  8942  */
       
  8943 function getPage(state) {
       
  8944   return {
       
  8945     context: state.editedPost.context
       
  8946   };
       
  8947 }
       
  8948 
       
  8949 /**
       
  8950  * Returns true if the inserter is opened.
       
  8951  *
       
  8952  * @deprecated
  3645  *
  8953  *
  3646  * @param {Object} state Global application state.
  8954  * @param {Object} state Global application state.
  3647  *
  8955  *
  3648  * @return {Object} Page.
  8956  * @return {boolean} Whether the inserter is opened.
  3649  */
  8957  */
  3650 
  8958 const isInserterOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  3651 function getPage(state) {
  8959   external_wp_deprecated_default()(`select( 'core/edit-site' ).isInserterOpened`, {
  3652   return getCurrentEditedPost(state).page;
  8960     since: '6.5',
  3653 }
  8961     alternative: `select( 'core/editor' ).isInserterOpened`
  3654 /**
  8962   });
  3655  * Returns the active menu in the navigation panel.
  8963   return select(external_wp_editor_namespaceObject.store).isInserterOpened();
       
  8964 });
       
  8965 
       
  8966 /**
       
  8967  * Get the insertion point for the inserter.
  3656  *
  8968  *
  3657  * @param {Object} state Global application state.
  8969  * @deprecated
  3658  *
       
  3659  * @return {string} Active menu.
       
  3660  */
       
  3661 
       
  3662 function getNavigationPanelActiveMenu(state) {
       
  3663   return state.navigationPanel.menu;
       
  3664 }
       
  3665 /**
       
  3666  * Returns the current template or template part's corresponding
       
  3667  * navigation panel's sub menu, to be used with `openNavigationPanelToMenu`.
       
  3668  *
       
  3669  * @param {Object} state Global application state.
       
  3670  *
       
  3671  * @return {string} The current template or template part's sub menu.
       
  3672  */
       
  3673 
       
  3674 const getCurrentTemplateNavigationPanelSubMenu = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => state => {
       
  3675   const templateType = getEditedPostType(state);
       
  3676   const templateId = getEditedPostId(state);
       
  3677   const template = templateId ? select(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', templateType, templateId) : null;
       
  3678 
       
  3679   if (!template) {
       
  3680     return MENU_ROOT;
       
  3681   }
       
  3682 
       
  3683   if ('wp_template_part' === templateType) {
       
  3684     var _TEMPLATE_PARTS_SUB_M;
       
  3685 
       
  3686     return ((_TEMPLATE_PARTS_SUB_M = TEMPLATE_PARTS_SUB_MENUS.find(submenu => submenu.area === (template === null || template === void 0 ? void 0 : template.area))) === null || _TEMPLATE_PARTS_SUB_M === void 0 ? void 0 : _TEMPLATE_PARTS_SUB_M.menu) || MENU_TEMPLATE_PARTS;
       
  3687   }
       
  3688 
       
  3689   const templates = select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', 'wp_template');
       
  3690   const showOnFront = select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('root', 'site').show_on_front;
       
  3691 
       
  3692   if (isTemplateSuperseded(template.slug, (0,external_lodash_namespaceObject.map)(templates, 'slug'), showOnFront)) {
       
  3693     return MENU_TEMPLATES_UNUSED;
       
  3694   }
       
  3695 
       
  3696   return getTemplateLocation(template.slug);
       
  3697 });
       
  3698 /**
       
  3699  * Returns the current opened/closed state of the navigation panel.
       
  3700  *
       
  3701  * @param {Object} state Global application state.
       
  3702  *
       
  3703  * @return {boolean} True if the navigation panel should be open; false if closed.
       
  3704  */
       
  3705 
       
  3706 function isNavigationOpened(state) {
       
  3707   return state.navigationPanel.isOpen;
       
  3708 }
       
  3709 /**
       
  3710  * Returns the current opened/closed state of the inserter panel.
       
  3711  *
       
  3712  * @param {Object} state Global application state.
       
  3713  *
       
  3714  * @return {boolean} True if the inserter panel should be open; false if closed.
       
  3715  */
       
  3716 
       
  3717 function isInserterOpened(state) {
       
  3718   return !!state.blockInserterPanel;
       
  3719 }
       
  3720 /**
       
  3721  * Get the insertion point for the inserter.
       
  3722  *
  8970  *
  3723  * @param {Object} state Global application state.
  8971  * @param {Object} state Global application state.
  3724  *
  8972  *
  3725  * @return {Object} The root client ID, index to insert at and starting filter value.
  8973  * @return {Object} The root client ID, index to insert at and starting filter value.
  3726  */
  8974  */
  3727 
  8975 const __experimentalGetInsertionPoint = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  3728 function __experimentalGetInsertionPoint(state) {
  8976   external_wp_deprecated_default()(`select( 'core/edit-site' ).__experimentalGetInsertionPoint`, {
  3729   const {
  8977     since: '6.5',
  3730     rootClientId,
  8978     version: '6.7'
  3731     insertionIndex,
  8979   });
  3732     filterValue
  8980   return lock_unlock_unlock(select(external_wp_editor_namespaceObject.store)).getInsertionPoint();
  3733   } = state.blockInserterPanel;
  8981 });
  3734   return {
  8982 
  3735     rootClientId,
  8983 /**
  3736     insertionIndex,
  8984  * Returns true if the list view is opened.
  3737     filterValue
       
  3738   };
       
  3739 }
       
  3740 /**
       
  3741  * Returns the current opened/closed state of the list view panel.
       
  3742  *
  8985  *
  3743  * @param {Object} state Global application state.
  8986  * @param {Object} state Global application state.
  3744  *
  8987  *
  3745  * @return {boolean} True if the list view panel should be open; false if closed.
  8988  * @return {boolean} Whether the list view is opened.
  3746  */
  8989  */
  3747 
  8990 const isListViewOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  3748 function isListViewOpened(state) {
  8991   external_wp_deprecated_default()(`select( 'core/edit-site' ).isListViewOpened`, {
  3749   return state.listViewPanel;
  8992     since: '6.5',
  3750 }
  8993     alternative: `select( 'core/editor' ).isListViewOpened`
       
  8994   });
       
  8995   return select(external_wp_editor_namespaceObject.store).isListViewOpened();
       
  8996 });
       
  8997 
       
  8998 /**
       
  8999  * Returns the current opened/closed state of the save panel.
       
  9000  *
       
  9001  * @param {Object} state Global application state.
       
  9002  *
       
  9003  * @return {boolean} True if the save panel should be open; false if closed.
       
  9004  */
       
  9005 function isSaveViewOpened(state) {
       
  9006   return state.saveViewPanel;
       
  9007 }
       
  9008 
  3751 /**
  9009 /**
  3752  * Returns the template parts and their blocks for the current edited template.
  9010  * Returns the template parts and their blocks for the current edited template.
  3753  *
  9011  *
  3754  * @param {Object} state Global application state.
  9012  * @param {Object} state Global application state.
  3755  * @return {Array} Template parts and their blocks in an array.
  9013  * @return {Array} Template parts and their blocks in an array.
  3756  */
  9014  */
  3757 
  9015 const getCurrentTemplateTemplateParts = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  3758 const getCurrentTemplateTemplateParts = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => state => {
  9016   return lock_unlock_unlock(select(external_wp_editor_namespaceObject.store)).getCurrentTemplateTemplateParts();
  3759   var _template$blocks;
       
  3760 
       
  3761   const templateType = getEditedPostType(state);
       
  3762   const templateId = getEditedPostId(state);
       
  3763   const template = select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', templateType, templateId);
       
  3764   const templateParts = select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', 'wp_template_part', {
       
  3765     per_page: -1
       
  3766   });
       
  3767   const templatePartsById = (0,external_lodash_namespaceObject.keyBy)(templateParts, templatePart => templatePart.id);
       
  3768   return ((_template$blocks = template.blocks) !== null && _template$blocks !== void 0 ? _template$blocks : []).filter(block => (0,external_wp_blocks_namespaceObject.isTemplatePart)(block)).map(block => {
       
  3769     const {
       
  3770       attributes: {
       
  3771         theme,
       
  3772         slug
       
  3773       }
       
  3774     } = block;
       
  3775     const templatePartId = `${theme}//${slug}`;
       
  3776     const templatePart = templatePartsById[templatePartId];
       
  3777     return {
       
  3778       templatePart,
       
  3779       block
       
  3780     };
       
  3781   }).filter(_ref3 => {
       
  3782     let {
       
  3783       templatePart
       
  3784     } = _ref3;
       
  3785     return !!templatePart;
       
  3786   });
       
  3787 });
  9017 });
       
  9018 
  3788 /**
  9019 /**
  3789  * Returns the current editing mode.
  9020  * Returns the current editing mode.
  3790  *
  9021  *
  3791  * @param {Object} state Global application state.
  9022  * @param {Object} state Global application state.
  3792  *
  9023  *
  3793  * @return {string} Editing mode.
  9024  * @return {string} Editing mode.
  3794  */
  9025  */
  3795 
  9026 const getEditorMode = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  3796 function getEditorMode(state) {
  9027   return select(external_wp_preferences_namespaceObject.store).get('core', 'editorMode');
  3797   return __unstableGetPreference(state, 'editorMode');
  9028 });
  3798 }
  9029 
       
  9030 /**
       
  9031  * @deprecated
       
  9032  */
       
  9033 function getCurrentTemplateNavigationPanelSubMenu() {
       
  9034   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu", {
       
  9035     since: '6.2',
       
  9036     version: '6.4'
       
  9037   });
       
  9038 }
       
  9039 
       
  9040 /**
       
  9041  * @deprecated
       
  9042  */
       
  9043 function getNavigationPanelActiveMenu() {
       
  9044   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu", {
       
  9045     since: '6.2',
       
  9046     version: '6.4'
       
  9047   });
       
  9048 }
       
  9049 
       
  9050 /**
       
  9051  * @deprecated
       
  9052  */
       
  9053 function isNavigationOpened() {
       
  9054   external_wp_deprecated_default()("dispatch( 'core/edit-site' ).isNavigationOpened", {
       
  9055     since: '6.2',
       
  9056     version: '6.4'
       
  9057   });
       
  9058 }
       
  9059 
       
  9060 /**
       
  9061  * Whether or not the editor has a page loaded into it.
       
  9062  *
       
  9063  * @see setPage
       
  9064  *
       
  9065  * @param {Object} state Global application state.
       
  9066  *
       
  9067  * @return {boolean} Whether or not the editor has a page loaded into it.
       
  9068  */
       
  9069 function isPage(state) {
       
  9070   return !!state.editedPost.context?.postId;
       
  9071 }
       
  9072 
       
  9073 /**
       
  9074  * Whether or not the editor allows only page content to be edited.
       
  9075  *
       
  9076  * @deprecated
       
  9077  *
       
  9078  * @return {boolean} Whether or not focus is on editing page content.
       
  9079  */
       
  9080 function hasPageContentFocus() {
       
  9081   external_wp_deprecated_default()(`select( 'core/edit-site' ).hasPageContentFocus`, {
       
  9082     since: '6.5'
       
  9083   });
       
  9084   return false;
       
  9085 }
       
  9086 
       
  9087 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/private-selectors.js
       
  9088 /**
       
  9089  * Returns the current canvas mode.
       
  9090  *
       
  9091  * @param {Object} state Global application state.
       
  9092  *
       
  9093  * @return {string} Canvas mode.
       
  9094  */
       
  9095 function getCanvasMode(state) {
       
  9096   return state.canvasMode;
       
  9097 }
       
  9098 
       
  9099 /**
       
  9100  * Returns the editor canvas container view.
       
  9101  *
       
  9102  * @param {Object} state Global application state.
       
  9103  *
       
  9104  * @return {string} Editor canvas container view.
       
  9105  */
       
  9106 function getEditorCanvasContainerView(state) {
       
  9107   return state.editorCanvasContainerView;
       
  9108 }
       
  9109 
       
  9110 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/constants.js
       
  9111 /**
       
  9112  * The identifier for the data store.
       
  9113  *
       
  9114  * @type {string}
       
  9115  */
       
  9116 const STORE_NAME = 'core/edit-site';
  3799 
  9117 
  3800 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/index.js
  9118 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/index.js
  3801 /**
  9119 /**
  3802  * WordPress dependencies
  9120  * WordPress dependencies
  3803  */
  9121  */
  3804 
  9122 
       
  9123 
  3805 /**
  9124 /**
  3806  * Internal dependencies
  9125  * Internal dependencies
  3807  */
  9126  */
       
  9127 
       
  9128 
  3808 
  9129 
  3809 
  9130 
  3810 
  9131 
  3811 
  9132 
  3812 
  9133 
  3813 const storeConfig = {
  9134 const storeConfig = {
  3814   reducer: reducer,
  9135   reducer: reducer,
  3815   actions: store_actions_namespaceObject,
  9136   actions: actions_namespaceObject,
  3816   selectors: store_selectors_namespaceObject
  9137   selectors: selectors_namespaceObject
  3817 };
  9138 };
  3818 const store_store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig);
  9139 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig);
  3819 (0,external_wp_data_namespaceObject.register)(store_store);
  9140 (0,external_wp_data_namespaceObject.register)(store);
  3820 
  9141 lock_unlock_unlock(store).registerPrivateSelectors(private_selectors_namespaceObject);
  3821 ;// CONCATENATED MODULE: ./node_modules/history/index.js
  9142 lock_unlock_unlock(store).registerPrivateActions(private_actions_namespaceObject);
  3822 
  9143 
  3823 
  9144 ;// CONCATENATED MODULE: external ["wp","plugins"]
  3824 /**
  9145 const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
  3825  * Actions represent the type of change to a location value.
  9146 ;// CONCATENATED MODULE: external ["wp","router"]
  3826  *
  9147 const external_wp_router_namespaceObject = window["wp"]["router"];
  3827  * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#action
  9148 ;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs
  3828  */
  9149 function clsx_r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=clsx_r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=clsx_r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
  3829 var Action;
  9150 ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
  3830 
  9151 const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
  3831 (function (Action) {
  9152 ;// CONCATENATED MODULE: external ["wp","commands"]
  3832   /**
  9153 const external_wp_commands_namespaceObject = window["wp"]["commands"];
  3833    * A POP indicates a change to an arbitrary index in the history stack, such
  9154 ;// CONCATENATED MODULE: external ["wp","coreCommands"]
  3834    * as a back or forward navigation. It does not describe the direction of the
  9155 const external_wp_coreCommands_namespaceObject = window["wp"]["coreCommands"];
  3835    * navigation, only that the current index changed.
  9156 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/error-boundary/warning.js
  3836    *
  9157 /**
  3837    * Note: This is the default action for newly created history objects.
  9158  * WordPress dependencies
  3838    */
  9159  */
  3839   Action["Pop"] = "POP";
  9160 
  3840   /**
  9161 
  3841    * A PUSH indicates a new entry being added to the history stack, such as when
  9162 
  3842    * a link is clicked and a new page loads. When this happens, all subsequent
  9163 
  3843    * entries in the stack are lost.
  9164 
  3844    */
  9165 function CopyButton({
  3845 
  9166   text,
  3846   Action["Push"] = "PUSH";
  9167   children
  3847   /**
  9168 }) {
  3848    * A REPLACE indicates the entry at the current index in the history stack
  9169   const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text);
  3849    * being replaced by a new one.
  9170   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  3850    */
  9171     variant: "secondary",
  3851 
  9172     ref: ref,
  3852   Action["Replace"] = "REPLACE";
  9173     children: children
  3853 })(Action || (Action = {}));
  9174   });
  3854 
  9175 }
  3855 var readOnly =  false ? 0 : function (obj) {
  9176 function ErrorBoundaryWarning({
  3856   return obj;
  9177   message,
  3857 };
  9178   error
  3858 
  9179 }) {
  3859 function warning(cond, message) {
  9180   const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CopyButton, {
  3860   if (!cond) {
  9181     text: error.stack,
  3861     // eslint-disable-next-line no-console
  9182     children: (0,external_wp_i18n_namespaceObject.__)('Copy Error')
  3862     if (typeof console !== 'undefined') console.warn(message);
  9183   }, "copy-error")];
  3863 
  9184   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
  3864     try {
  9185     className: "editor-error-boundary",
  3865       // Welcome to debugging history!
  9186     actions: actions,
  3866       //
  9187     children: message
  3867       // This error is thrown as a convenience so you can more easily
  9188   });
  3868       // find the source for a warning that appears in the console by
  9189 }
  3869       // enabling "pause on exceptions" in your JavaScript debugger.
  9190 
  3870       throw new Error(message); // eslint-disable-next-line no-empty
  9191 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/error-boundary/index.js
  3871     } catch (e) {}
  9192 /**
       
  9193  * WordPress dependencies
       
  9194  */
       
  9195 
       
  9196 
       
  9197 
       
  9198 
       
  9199 /**
       
  9200  * Internal dependencies
       
  9201  */
       
  9202 
       
  9203 
       
  9204 class ErrorBoundary extends external_wp_element_namespaceObject.Component {
       
  9205   constructor() {
       
  9206     super(...arguments);
       
  9207     this.state = {
       
  9208       error: null
       
  9209     };
  3872   }
  9210   }
  3873 }
  9211   componentDidCatch(error) {
  3874 
  9212     (0,external_wp_hooks_namespaceObject.doAction)('editor.ErrorBoundary.errorLogged', error);
  3875 var BeforeUnloadEventType = 'beforeunload';
       
  3876 var HashChangeEventType = 'hashchange';
       
  3877 var PopStateEventType = 'popstate';
       
  3878 /**
       
  3879  * Browser history stores the location in regular URLs. This is the standard for
       
  3880  * most web apps, but it requires some configuration on the server to ensure you
       
  3881  * serve the same app at multiple URLs.
       
  3882  *
       
  3883  * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
       
  3884  */
       
  3885 
       
  3886 function createBrowserHistory(options) {
       
  3887   if (options === void 0) {
       
  3888     options = {};
       
  3889   }
  9213   }
  3890 
  9214   static getDerivedStateFromError(error) {
  3891   var _options = options,
  9215     return {
  3892       _options$window = _options.window,
  9216       error
  3893       window = _options$window === void 0 ? document.defaultView : _options$window;
  9217     };
  3894   var globalHistory = window.history;
       
  3895 
       
  3896   function getIndexAndLocation() {
       
  3897     var _window$location = window.location,
       
  3898         pathname = _window$location.pathname,
       
  3899         search = _window$location.search,
       
  3900         hash = _window$location.hash;
       
  3901     var state = globalHistory.state || {};
       
  3902     return [state.idx, readOnly({
       
  3903       pathname: pathname,
       
  3904       search: search,
       
  3905       hash: hash,
       
  3906       state: state.usr || null,
       
  3907       key: state.key || 'default'
       
  3908     })];
       
  3909   }
  9218   }
  3910 
  9219   render() {
  3911   var blockedPopTx = null;
  9220     if (!this.state.error) {
  3912 
  9221       return this.props.children;
  3913   function handlePop() {
       
  3914     if (blockedPopTx) {
       
  3915       blockers.call(blockedPopTx);
       
  3916       blockedPopTx = null;
       
  3917     } else {
       
  3918       var nextAction = Action.Pop;
       
  3919 
       
  3920       var _getIndexAndLocation = getIndexAndLocation(),
       
  3921           nextIndex = _getIndexAndLocation[0],
       
  3922           nextLocation = _getIndexAndLocation[1];
       
  3923 
       
  3924       if (blockers.length) {
       
  3925         if (nextIndex != null) {
       
  3926           var delta = index - nextIndex;
       
  3927 
       
  3928           if (delta) {
       
  3929             // Revert the POP
       
  3930             blockedPopTx = {
       
  3931               action: nextAction,
       
  3932               location: nextLocation,
       
  3933               retry: function retry() {
       
  3934                 go(delta * -1);
       
  3935               }
       
  3936             };
       
  3937             go(delta);
       
  3938           }
       
  3939         } else {
       
  3940           // Trying to POP to a location with no index. We did not create
       
  3941           // this location, so we can't effectively block the navigation.
       
  3942            false ? 0 : void 0;
       
  3943         }
       
  3944       } else {
       
  3945         applyTx(nextAction);
       
  3946       }
       
  3947     }
  9222     }
  3948   }
  9223     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundaryWarning, {
  3949 
  9224       message: (0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error.'),
  3950   window.addEventListener(PopStateEventType, handlePop);
  9225       error: this.state.error
  3951   var action = Action.Pop;
       
  3952 
       
  3953   var _getIndexAndLocation2 = getIndexAndLocation(),
       
  3954       index = _getIndexAndLocation2[0],
       
  3955       location = _getIndexAndLocation2[1];
       
  3956 
       
  3957   var listeners = createEvents();
       
  3958   var blockers = createEvents();
       
  3959 
       
  3960   if (index == null) {
       
  3961     index = 0;
       
  3962     globalHistory.replaceState(extends_extends({}, globalHistory.state, {
       
  3963       idx: index
       
  3964     }), '');
       
  3965   }
       
  3966 
       
  3967   function createHref(to) {
       
  3968     return typeof to === 'string' ? to : createPath(to);
       
  3969   } // state defaults to `null` because `window.history.state` does
       
  3970 
       
  3971 
       
  3972   function getNextLocation(to, state) {
       
  3973     if (state === void 0) {
       
  3974       state = null;
       
  3975     }
       
  3976 
       
  3977     return readOnly(extends_extends({
       
  3978       pathname: location.pathname,
       
  3979       hash: '',
       
  3980       search: ''
       
  3981     }, typeof to === 'string' ? parsePath(to) : to, {
       
  3982       state: state,
       
  3983       key: createKey()
       
  3984     }));
       
  3985   }
       
  3986 
       
  3987   function getHistoryStateAndUrl(nextLocation, index) {
       
  3988     return [{
       
  3989       usr: nextLocation.state,
       
  3990       key: nextLocation.key,
       
  3991       idx: index
       
  3992     }, createHref(nextLocation)];
       
  3993   }
       
  3994 
       
  3995   function allowTx(action, location, retry) {
       
  3996     return !blockers.length || (blockers.call({
       
  3997       action: action,
       
  3998       location: location,
       
  3999       retry: retry
       
  4000     }), false);
       
  4001   }
       
  4002 
       
  4003   function applyTx(nextAction) {
       
  4004     action = nextAction;
       
  4005 
       
  4006     var _getIndexAndLocation3 = getIndexAndLocation();
       
  4007 
       
  4008     index = _getIndexAndLocation3[0];
       
  4009     location = _getIndexAndLocation3[1];
       
  4010     listeners.call({
       
  4011       action: action,
       
  4012       location: location
       
  4013     });
  9226     });
  4014   }
  9227   }
  4015 
  9228 }
  4016   function push(to, state) {
  9229 
  4017     var nextAction = Action.Push;
  9230 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js
  4018     var nextLocation = getNextLocation(to, state);
  9231 /**
  4019 
  9232  * WordPress dependencies
  4020     function retry() {
  9233  */
  4021       push(to, state);
  9234 
       
  9235 
       
  9236 
       
  9237 
       
  9238 
       
  9239 /**
       
  9240  * Internal dependencies
       
  9241  */
       
  9242 
       
  9243 
       
  9244 
       
  9245 const {
       
  9246   useLocation
       
  9247 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
  9248 const postTypesWithoutParentTemplate = [TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE, PATTERN_TYPES.user];
       
  9249 const authorizedPostTypes = ['page'];
       
  9250 function useResolveEditedEntityAndContext({
       
  9251   postId,
       
  9252   postType
       
  9253 }) {
       
  9254   const {
       
  9255     hasLoadedAllDependencies,
       
  9256     homepageId,
       
  9257     postsPageId,
       
  9258     url,
       
  9259     frontPageTemplateId
       
  9260   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9261     const {
       
  9262       getSite,
       
  9263       getUnstableBase,
       
  9264       getEntityRecords
       
  9265     } = select(external_wp_coreData_namespaceObject.store);
       
  9266     const siteData = getSite();
       
  9267     const base = getUnstableBase();
       
  9268     const templates = getEntityRecords('postType', TEMPLATE_POST_TYPE, {
       
  9269       per_page: -1
       
  9270     });
       
  9271     const _homepageId = siteData?.show_on_front === 'page' && ['number', 'string'].includes(typeof siteData.page_on_front) && !!+siteData.page_on_front // We also need to check if it's not zero(`0`).
       
  9272     ? siteData.page_on_front.toString() : null;
       
  9273     const _postsPageId = siteData?.show_on_front === 'page' && ['number', 'string'].includes(typeof siteData.page_for_posts) ? siteData.page_for_posts.toString() : null;
       
  9274     let _frontPageTemplateId;
       
  9275     if (templates) {
       
  9276       const frontPageTemplate = templates.find(t => t.slug === 'front-page');
       
  9277       _frontPageTemplateId = frontPageTemplate ? frontPageTemplate.id : false;
  4022     }
  9278     }
  4023 
  9279     return {
  4024     if (allowTx(nextAction, nextLocation, retry)) {
  9280       hasLoadedAllDependencies: !!base && !!siteData,
  4025       var _getHistoryStateAndUr = getHistoryStateAndUrl(nextLocation, index + 1),
  9281       homepageId: _homepageId,
  4026           historyState = _getHistoryStateAndUr[0],
  9282       postsPageId: _postsPageId,
  4027           url = _getHistoryStateAndUr[1]; // TODO: Support forced reloading
  9283       url: base?.home,
  4028       // try...catch because iOS limits us to 100 pushState calls :/
  9284       frontPageTemplateId: _frontPageTemplateId
  4029 
  9285     };
  4030 
  9286   }, []);
  4031       try {
  9287 
  4032         globalHistory.pushState(historyState, '', url);
  9288   /**
  4033       } catch (error) {
  9289    * This is a hook that recreates the logic to resolve a template for a given WordPress postID postTypeId
  4034         // They are going to lose state here, but there is no real
  9290    * in order to match the frontend as closely as possible in the site editor.
  4035         // way to warn them about it since the page will refresh...
  9291    *
  4036         window.location.assign(url);
  9292    * It is not possible to rely on the server logic because there maybe unsaved changes that impact the template resolution.
       
  9293    */
       
  9294   const resolvedTemplateId = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9295     // If we're rendering a post type that doesn't have a template
       
  9296     // no need to resolve its template.
       
  9297     if (postTypesWithoutParentTemplate.includes(postType) && postId) {
       
  9298       return undefined;
       
  9299     }
       
  9300     const {
       
  9301       getEditedEntityRecord,
       
  9302       getEntityRecords,
       
  9303       getDefaultTemplateId,
       
  9304       __experimentalGetTemplateForLink
       
  9305     } = select(external_wp_coreData_namespaceObject.store);
       
  9306     function resolveTemplateForPostTypeAndId(postTypeToResolve, postIdToResolve) {
       
  9307       // For the front page, we always use the front page template if existing.
       
  9308       if (postTypeToResolve === 'page' && homepageId === postIdToResolve) {
       
  9309         // We're still checking whether the front page template exists.
       
  9310         // Don't resolve the template yet.
       
  9311         if (frontPageTemplateId === undefined) {
       
  9312           return undefined;
       
  9313         }
       
  9314         if (!!frontPageTemplateId) {
       
  9315           return frontPageTemplateId;
       
  9316         }
  4037       }
  9317       }
  4038 
  9318       const editedEntity = getEditedEntityRecord('postType', postTypeToResolve, postIdToResolve);
  4039       applyTx(nextAction);
  9319       if (!editedEntity) {
       
  9320         return undefined;
       
  9321       }
       
  9322       // Check if the current page is the posts page.
       
  9323       if (postTypeToResolve === 'page' && postsPageId === postIdToResolve) {
       
  9324         return __experimentalGetTemplateForLink(editedEntity.link)?.id;
       
  9325       }
       
  9326       // First see if the post/page has an assigned template and fetch it.
       
  9327       const currentTemplateSlug = editedEntity.template;
       
  9328       if (currentTemplateSlug) {
       
  9329         const currentTemplate = getEntityRecords('postType', TEMPLATE_POST_TYPE, {
       
  9330           per_page: -1
       
  9331         })?.find(({
       
  9332           slug
       
  9333         }) => slug === currentTemplateSlug);
       
  9334         if (currentTemplate) {
       
  9335           return currentTemplate.id;
       
  9336         }
       
  9337       }
       
  9338       // If no template is assigned, use the default template.
       
  9339       let slugToCheck;
       
  9340       // In `draft` status we might not have a slug available, so we use the `single`
       
  9341       // post type templates slug(ex page, single-post, single-product etc..).
       
  9342       // Pages do not need the `single` prefix in the slug to be prioritized
       
  9343       // through template hierarchy.
       
  9344       if (editedEntity.slug) {
       
  9345         slugToCheck = postTypeToResolve === 'page' ? `${postTypeToResolve}-${editedEntity.slug}` : `single-${postTypeToResolve}-${editedEntity.slug}`;
       
  9346       } else {
       
  9347         slugToCheck = postTypeToResolve === 'page' ? 'page' : `single-${postTypeToResolve}`;
       
  9348       }
       
  9349       return getDefaultTemplateId({
       
  9350         slug: slugToCheck
       
  9351       });
  4040     }
  9352     }
  4041   }
  9353     if (!hasLoadedAllDependencies) {
  4042 
  9354       return undefined;
  4043   function replace(to, state) {
       
  4044     var nextAction = Action.Replace;
       
  4045     var nextLocation = getNextLocation(to, state);
       
  4046 
       
  4047     function retry() {
       
  4048       replace(to, state);
       
  4049     }
  9355     }
  4050 
  9356 
  4051     if (allowTx(nextAction, nextLocation, retry)) {
  9357     // If we're rendering a specific page, we need to resolve its template.
  4052       var _getHistoryStateAndUr2 = getHistoryStateAndUrl(nextLocation, index),
  9358     // The site editor only supports pages for now, not other CPTs.
  4053           historyState = _getHistoryStateAndUr2[0],
  9359     if (postType && postId && authorizedPostTypes.includes(postType)) {
  4054           url = _getHistoryStateAndUr2[1]; // TODO: Support forced reloading
  9360       return resolveTemplateForPostTypeAndId(postType, postId);
  4055 
       
  4056 
       
  4057       globalHistory.replaceState(historyState, '', url);
       
  4058       applyTx(nextAction);
       
  4059     }
  9361     }
  4060   }
  9362 
  4061 
  9363     // If we're rendering the home page, and we have a static home page, resolve its template.
  4062   function go(delta) {
  9364     if (homepageId) {
  4063     globalHistory.go(delta);
  9365       return resolveTemplateForPostTypeAndId('page', homepageId);
  4064   }
  9366     }
  4065 
  9367 
  4066   var history = {
  9368     // If we're not rendering a specific page, use the front page template.
  4067     get action() {
  9369     if (url) {
  4068       return action;
  9370       const template = __experimentalGetTemplateForLink(url);
  4069     },
  9371       return template?.id;
  4070 
  9372     }
  4071     get location() {
  9373   }, [homepageId, postsPageId, hasLoadedAllDependencies, url, postId, postType, frontPageTemplateId]);
  4072       return location;
  9374   const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
  4073     },
  9375     if (postTypesWithoutParentTemplate.includes(postType) && postId) {
  4074 
  9376       return {};
  4075     createHref: createHref,
  9377     }
  4076     push: push,
  9378     if (postType && postId && authorizedPostTypes.includes(postType)) {
  4077     replace: replace,
  9379       return {
  4078     go: go,
  9380         postType,
  4079     back: function back() {
  9381         postId
  4080       go(-1);
       
  4081     },
       
  4082     forward: function forward() {
       
  4083       go(1);
       
  4084     },
       
  4085     listen: function listen(listener) {
       
  4086       return listeners.push(listener);
       
  4087     },
       
  4088     block: function block(blocker) {
       
  4089       var unblock = blockers.push(blocker);
       
  4090 
       
  4091       if (blockers.length === 1) {
       
  4092         window.addEventListener(BeforeUnloadEventType, promptBeforeUnload);
       
  4093       }
       
  4094 
       
  4095       return function () {
       
  4096         unblock(); // Remove the beforeunload listener so the document may
       
  4097         // still be salvageable in the pagehide event.
       
  4098         // See https://html.spec.whatwg.org/#unloading-documents
       
  4099 
       
  4100         if (!blockers.length) {
       
  4101           window.removeEventListener(BeforeUnloadEventType, promptBeforeUnload);
       
  4102         }
       
  4103       };
  9382       };
  4104     }
  9383     }
  4105   };
  9384     if (homepageId) {
  4106   return history;
  9385       return {
  4107 }
  9386         postType: 'page',
  4108 /**
  9387         postId: homepageId
  4109  * Hash history stores the location in window.location.hash. This makes it ideal
       
  4110  * for situations where you don't want to send the location to the server for
       
  4111  * some reason, either because you do cannot configure it or the URL space is
       
  4112  * reserved for something else.
       
  4113  *
       
  4114  * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
       
  4115  */
       
  4116 
       
  4117 function createHashHistory(options) {
       
  4118   if (options === void 0) {
       
  4119     options = {};
       
  4120   }
       
  4121 
       
  4122   var _options2 = options,
       
  4123       _options2$window = _options2.window,
       
  4124       window = _options2$window === void 0 ? document.defaultView : _options2$window;
       
  4125   var globalHistory = window.history;
       
  4126 
       
  4127   function getIndexAndLocation() {
       
  4128     var _parsePath = parsePath(window.location.hash.substr(1)),
       
  4129         _parsePath$pathname = _parsePath.pathname,
       
  4130         pathname = _parsePath$pathname === void 0 ? '/' : _parsePath$pathname,
       
  4131         _parsePath$search = _parsePath.search,
       
  4132         search = _parsePath$search === void 0 ? '' : _parsePath$search,
       
  4133         _parsePath$hash = _parsePath.hash,
       
  4134         hash = _parsePath$hash === void 0 ? '' : _parsePath$hash;
       
  4135 
       
  4136     var state = globalHistory.state || {};
       
  4137     return [state.idx, readOnly({
       
  4138       pathname: pathname,
       
  4139       search: search,
       
  4140       hash: hash,
       
  4141       state: state.usr || null,
       
  4142       key: state.key || 'default'
       
  4143     })];
       
  4144   }
       
  4145 
       
  4146   var blockedPopTx = null;
       
  4147 
       
  4148   function handlePop() {
       
  4149     if (blockedPopTx) {
       
  4150       blockers.call(blockedPopTx);
       
  4151       blockedPopTx = null;
       
  4152     } else {
       
  4153       var nextAction = Action.Pop;
       
  4154 
       
  4155       var _getIndexAndLocation4 = getIndexAndLocation(),
       
  4156           nextIndex = _getIndexAndLocation4[0],
       
  4157           nextLocation = _getIndexAndLocation4[1];
       
  4158 
       
  4159       if (blockers.length) {
       
  4160         if (nextIndex != null) {
       
  4161           var delta = index - nextIndex;
       
  4162 
       
  4163           if (delta) {
       
  4164             // Revert the POP
       
  4165             blockedPopTx = {
       
  4166               action: nextAction,
       
  4167               location: nextLocation,
       
  4168               retry: function retry() {
       
  4169                 go(delta * -1);
       
  4170               }
       
  4171             };
       
  4172             go(delta);
       
  4173           }
       
  4174         } else {
       
  4175           // Trying to POP to a location with no index. We did not create
       
  4176           // this location, so we can't effectively block the navigation.
       
  4177            false ? 0 : void 0;
       
  4178         }
       
  4179       } else {
       
  4180         applyTx(nextAction);
       
  4181       }
       
  4182     }
       
  4183   }
       
  4184 
       
  4185   window.addEventListener(PopStateEventType, handlePop); // popstate does not fire on hashchange in IE 11 and old (trident) Edge
       
  4186   // https://developer.mozilla.org/de/docs/Web/API/Window/popstate_event
       
  4187 
       
  4188   window.addEventListener(HashChangeEventType, function () {
       
  4189     var _getIndexAndLocation5 = getIndexAndLocation(),
       
  4190         nextLocation = _getIndexAndLocation5[1]; // Ignore extraneous hashchange events.
       
  4191 
       
  4192 
       
  4193     if (createPath(nextLocation) !== createPath(location)) {
       
  4194       handlePop();
       
  4195     }
       
  4196   });
       
  4197   var action = Action.Pop;
       
  4198 
       
  4199   var _getIndexAndLocation6 = getIndexAndLocation(),
       
  4200       index = _getIndexAndLocation6[0],
       
  4201       location = _getIndexAndLocation6[1];
       
  4202 
       
  4203   var listeners = createEvents();
       
  4204   var blockers = createEvents();
       
  4205 
       
  4206   if (index == null) {
       
  4207     index = 0;
       
  4208     globalHistory.replaceState(_extends({}, globalHistory.state, {
       
  4209       idx: index
       
  4210     }), '');
       
  4211   }
       
  4212 
       
  4213   function getBaseHref() {
       
  4214     var base = document.querySelector('base');
       
  4215     var href = '';
       
  4216 
       
  4217     if (base && base.getAttribute('href')) {
       
  4218       var url = window.location.href;
       
  4219       var hashIndex = url.indexOf('#');
       
  4220       href = hashIndex === -1 ? url : url.slice(0, hashIndex);
       
  4221     }
       
  4222 
       
  4223     return href;
       
  4224   }
       
  4225 
       
  4226   function createHref(to) {
       
  4227     return getBaseHref() + '#' + (typeof to === 'string' ? to : createPath(to));
       
  4228   }
       
  4229 
       
  4230   function getNextLocation(to, state) {
       
  4231     if (state === void 0) {
       
  4232       state = null;
       
  4233     }
       
  4234 
       
  4235     return readOnly(_extends({
       
  4236       pathname: location.pathname,
       
  4237       hash: '',
       
  4238       search: ''
       
  4239     }, typeof to === 'string' ? parsePath(to) : to, {
       
  4240       state: state,
       
  4241       key: createKey()
       
  4242     }));
       
  4243   }
       
  4244 
       
  4245   function getHistoryStateAndUrl(nextLocation, index) {
       
  4246     return [{
       
  4247       usr: nextLocation.state,
       
  4248       key: nextLocation.key,
       
  4249       idx: index
       
  4250     }, createHref(nextLocation)];
       
  4251   }
       
  4252 
       
  4253   function allowTx(action, location, retry) {
       
  4254     return !blockers.length || (blockers.call({
       
  4255       action: action,
       
  4256       location: location,
       
  4257       retry: retry
       
  4258     }), false);
       
  4259   }
       
  4260 
       
  4261   function applyTx(nextAction) {
       
  4262     action = nextAction;
       
  4263 
       
  4264     var _getIndexAndLocation7 = getIndexAndLocation();
       
  4265 
       
  4266     index = _getIndexAndLocation7[0];
       
  4267     location = _getIndexAndLocation7[1];
       
  4268     listeners.call({
       
  4269       action: action,
       
  4270       location: location
       
  4271     });
       
  4272   }
       
  4273 
       
  4274   function push(to, state) {
       
  4275     var nextAction = Action.Push;
       
  4276     var nextLocation = getNextLocation(to, state);
       
  4277 
       
  4278     function retry() {
       
  4279       push(to, state);
       
  4280     }
       
  4281 
       
  4282      false ? 0 : void 0;
       
  4283 
       
  4284     if (allowTx(nextAction, nextLocation, retry)) {
       
  4285       var _getHistoryStateAndUr3 = getHistoryStateAndUrl(nextLocation, index + 1),
       
  4286           historyState = _getHistoryStateAndUr3[0],
       
  4287           url = _getHistoryStateAndUr3[1]; // TODO: Support forced reloading
       
  4288       // try...catch because iOS limits us to 100 pushState calls :/
       
  4289 
       
  4290 
       
  4291       try {
       
  4292         globalHistory.pushState(historyState, '', url);
       
  4293       } catch (error) {
       
  4294         // They are going to lose state here, but there is no real
       
  4295         // way to warn them about it since the page will refresh...
       
  4296         window.location.assign(url);
       
  4297       }
       
  4298 
       
  4299       applyTx(nextAction);
       
  4300     }
       
  4301   }
       
  4302 
       
  4303   function replace(to, state) {
       
  4304     var nextAction = Action.Replace;
       
  4305     var nextLocation = getNextLocation(to, state);
       
  4306 
       
  4307     function retry() {
       
  4308       replace(to, state);
       
  4309     }
       
  4310 
       
  4311      false ? 0 : void 0;
       
  4312 
       
  4313     if (allowTx(nextAction, nextLocation, retry)) {
       
  4314       var _getHistoryStateAndUr4 = getHistoryStateAndUrl(nextLocation, index),
       
  4315           historyState = _getHistoryStateAndUr4[0],
       
  4316           url = _getHistoryStateAndUr4[1]; // TODO: Support forced reloading
       
  4317 
       
  4318 
       
  4319       globalHistory.replaceState(historyState, '', url);
       
  4320       applyTx(nextAction);
       
  4321     }
       
  4322   }
       
  4323 
       
  4324   function go(delta) {
       
  4325     globalHistory.go(delta);
       
  4326   }
       
  4327 
       
  4328   var history = {
       
  4329     get action() {
       
  4330       return action;
       
  4331     },
       
  4332 
       
  4333     get location() {
       
  4334       return location;
       
  4335     },
       
  4336 
       
  4337     createHref: createHref,
       
  4338     push: push,
       
  4339     replace: replace,
       
  4340     go: go,
       
  4341     back: function back() {
       
  4342       go(-1);
       
  4343     },
       
  4344     forward: function forward() {
       
  4345       go(1);
       
  4346     },
       
  4347     listen: function listen(listener) {
       
  4348       return listeners.push(listener);
       
  4349     },
       
  4350     block: function block(blocker) {
       
  4351       var unblock = blockers.push(blocker);
       
  4352 
       
  4353       if (blockers.length === 1) {
       
  4354         window.addEventListener(BeforeUnloadEventType, promptBeforeUnload);
       
  4355       }
       
  4356 
       
  4357       return function () {
       
  4358         unblock(); // Remove the beforeunload listener so the document may
       
  4359         // still be salvageable in the pagehide event.
       
  4360         // See https://html.spec.whatwg.org/#unloading-documents
       
  4361 
       
  4362         if (!blockers.length) {
       
  4363           window.removeEventListener(BeforeUnloadEventType, promptBeforeUnload);
       
  4364         }
       
  4365       };
  9388       };
  4366     }
  9389     }
  4367   };
  9390     return {};
  4368   return history;
  9391   }, [homepageId, postType, postId]);
  4369 }
  9392   if (postTypesWithoutParentTemplate.includes(postType) && postId) {
  4370 /**
       
  4371  * Memory history stores the current location in memory. It is designed for use
       
  4372  * in stateful non-browser environments like tests and React Native.
       
  4373  *
       
  4374  * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#creatememoryhistory
       
  4375  */
       
  4376 
       
  4377 function createMemoryHistory(options) {
       
  4378   if (options === void 0) {
       
  4379     options = {};
       
  4380   }
       
  4381 
       
  4382   var _options3 = options,
       
  4383       _options3$initialEntr = _options3.initialEntries,
       
  4384       initialEntries = _options3$initialEntr === void 0 ? ['/'] : _options3$initialEntr,
       
  4385       initialIndex = _options3.initialIndex;
       
  4386   var entries = initialEntries.map(function (entry) {
       
  4387     var location = readOnly(_extends({
       
  4388       pathname: '/',
       
  4389       search: '',
       
  4390       hash: '',
       
  4391       state: null,
       
  4392       key: createKey()
       
  4393     }, typeof entry === 'string' ? parsePath(entry) : entry));
       
  4394      false ? 0 : void 0;
       
  4395     return location;
       
  4396   });
       
  4397   var index = clamp(initialIndex == null ? entries.length - 1 : initialIndex, 0, entries.length - 1);
       
  4398   var action = Action.Pop;
       
  4399   var location = entries[index];
       
  4400   var listeners = createEvents();
       
  4401   var blockers = createEvents();
       
  4402 
       
  4403   function createHref(to) {
       
  4404     return typeof to === 'string' ? to : createPath(to);
       
  4405   }
       
  4406 
       
  4407   function getNextLocation(to, state) {
       
  4408     if (state === void 0) {
       
  4409       state = null;
       
  4410     }
       
  4411 
       
  4412     return readOnly(_extends({
       
  4413       pathname: location.pathname,
       
  4414       search: '',
       
  4415       hash: ''
       
  4416     }, typeof to === 'string' ? parsePath(to) : to, {
       
  4417       state: state,
       
  4418       key: createKey()
       
  4419     }));
       
  4420   }
       
  4421 
       
  4422   function allowTx(action, location, retry) {
       
  4423     return !blockers.length || (blockers.call({
       
  4424       action: action,
       
  4425       location: location,
       
  4426       retry: retry
       
  4427     }), false);
       
  4428   }
       
  4429 
       
  4430   function applyTx(nextAction, nextLocation) {
       
  4431     action = nextAction;
       
  4432     location = nextLocation;
       
  4433     listeners.call({
       
  4434       action: action,
       
  4435       location: location
       
  4436     });
       
  4437   }
       
  4438 
       
  4439   function push(to, state) {
       
  4440     var nextAction = Action.Push;
       
  4441     var nextLocation = getNextLocation(to, state);
       
  4442 
       
  4443     function retry() {
       
  4444       push(to, state);
       
  4445     }
       
  4446 
       
  4447      false ? 0 : void 0;
       
  4448 
       
  4449     if (allowTx(nextAction, nextLocation, retry)) {
       
  4450       index += 1;
       
  4451       entries.splice(index, entries.length, nextLocation);
       
  4452       applyTx(nextAction, nextLocation);
       
  4453     }
       
  4454   }
       
  4455 
       
  4456   function replace(to, state) {
       
  4457     var nextAction = Action.Replace;
       
  4458     var nextLocation = getNextLocation(to, state);
       
  4459 
       
  4460     function retry() {
       
  4461       replace(to, state);
       
  4462     }
       
  4463 
       
  4464      false ? 0 : void 0;
       
  4465 
       
  4466     if (allowTx(nextAction, nextLocation, retry)) {
       
  4467       entries[index] = nextLocation;
       
  4468       applyTx(nextAction, nextLocation);
       
  4469     }
       
  4470   }
       
  4471 
       
  4472   function go(delta) {
       
  4473     var nextIndex = clamp(index + delta, 0, entries.length - 1);
       
  4474     var nextAction = Action.Pop;
       
  4475     var nextLocation = entries[nextIndex];
       
  4476 
       
  4477     function retry() {
       
  4478       go(delta);
       
  4479     }
       
  4480 
       
  4481     if (allowTx(nextAction, nextLocation, retry)) {
       
  4482       index = nextIndex;
       
  4483       applyTx(nextAction, nextLocation);
       
  4484     }
       
  4485   }
       
  4486 
       
  4487   var history = {
       
  4488     get index() {
       
  4489       return index;
       
  4490     },
       
  4491 
       
  4492     get action() {
       
  4493       return action;
       
  4494     },
       
  4495 
       
  4496     get location() {
       
  4497       return location;
       
  4498     },
       
  4499 
       
  4500     createHref: createHref,
       
  4501     push: push,
       
  4502     replace: replace,
       
  4503     go: go,
       
  4504     back: function back() {
       
  4505       go(-1);
       
  4506     },
       
  4507     forward: function forward() {
       
  4508       go(1);
       
  4509     },
       
  4510     listen: function listen(listener) {
       
  4511       return listeners.push(listener);
       
  4512     },
       
  4513     block: function block(blocker) {
       
  4514       return blockers.push(blocker);
       
  4515     }
       
  4516   };
       
  4517   return history;
       
  4518 } ////////////////////////////////////////////////////////////////////////////////
       
  4519 // UTILS
       
  4520 ////////////////////////////////////////////////////////////////////////////////
       
  4521 
       
  4522 function clamp(n, lowerBound, upperBound) {
       
  4523   return Math.min(Math.max(n, lowerBound), upperBound);
       
  4524 }
       
  4525 
       
  4526 function promptBeforeUnload(event) {
       
  4527   // Cancel the event.
       
  4528   event.preventDefault(); // Chrome (and legacy IE) requires returnValue to be set.
       
  4529 
       
  4530   event.returnValue = '';
       
  4531 }
       
  4532 
       
  4533 function createEvents() {
       
  4534   var handlers = [];
       
  4535   return {
       
  4536     get length() {
       
  4537       return handlers.length;
       
  4538     },
       
  4539 
       
  4540     push: function push(fn) {
       
  4541       handlers.push(fn);
       
  4542       return function () {
       
  4543         handlers = handlers.filter(function (handler) {
       
  4544           return handler !== fn;
       
  4545         });
       
  4546       };
       
  4547     },
       
  4548     call: function call(arg) {
       
  4549       handlers.forEach(function (fn) {
       
  4550         return fn && fn(arg);
       
  4551       });
       
  4552     }
       
  4553   };
       
  4554 }
       
  4555 
       
  4556 function createKey() {
       
  4557   return Math.random().toString(36).substr(2, 8);
       
  4558 }
       
  4559 /**
       
  4560  * Creates a string URL path from the given pathname, search, and hash components.
       
  4561  *
       
  4562  * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createpath
       
  4563  */
       
  4564 
       
  4565 
       
  4566 function createPath(_ref) {
       
  4567   var _ref$pathname = _ref.pathname,
       
  4568       pathname = _ref$pathname === void 0 ? '/' : _ref$pathname,
       
  4569       _ref$search = _ref.search,
       
  4570       search = _ref$search === void 0 ? '' : _ref$search,
       
  4571       _ref$hash = _ref.hash,
       
  4572       hash = _ref$hash === void 0 ? '' : _ref$hash;
       
  4573   if (search && search !== '?') pathname += search.charAt(0) === '?' ? search : '?' + search;
       
  4574   if (hash && hash !== '#') pathname += hash.charAt(0) === '#' ? hash : '#' + hash;
       
  4575   return pathname;
       
  4576 }
       
  4577 /**
       
  4578  * Parses a string URL path into its separate pathname, search, and hash components.
       
  4579  *
       
  4580  * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#parsepath
       
  4581  */
       
  4582 
       
  4583 function parsePath(path) {
       
  4584   var parsedPath = {};
       
  4585 
       
  4586   if (path) {
       
  4587     var hashIndex = path.indexOf('#');
       
  4588 
       
  4589     if (hashIndex >= 0) {
       
  4590       parsedPath.hash = path.substr(hashIndex);
       
  4591       path = path.substr(0, hashIndex);
       
  4592     }
       
  4593 
       
  4594     var searchIndex = path.indexOf('?');
       
  4595 
       
  4596     if (searchIndex >= 0) {
       
  4597       parsedPath.search = path.substr(searchIndex);
       
  4598       path = path.substr(0, searchIndex);
       
  4599     }
       
  4600 
       
  4601     if (path) {
       
  4602       parsedPath.pathname = path;
       
  4603     }
       
  4604   }
       
  4605 
       
  4606   return parsedPath;
       
  4607 }
       
  4608 
       
  4609 
       
  4610 
       
  4611 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/history.js
       
  4612 /**
       
  4613  * External dependencies
       
  4614  */
       
  4615 
       
  4616 /**
       
  4617  * WordPress dependencies
       
  4618  */
       
  4619 
       
  4620 
       
  4621 const history_history = createBrowserHistory();
       
  4622 const originalHistoryPush = history_history.push;
       
  4623 const originalHistoryReplace = history_history.replace;
       
  4624 
       
  4625 function push(params, state) {
       
  4626   return originalHistoryPush.call(history_history, (0,external_wp_url_namespaceObject.addQueryArgs)(window.location.href, params), state);
       
  4627 }
       
  4628 
       
  4629 function replace(params, state) {
       
  4630   return originalHistoryReplace.call(history_history, (0,external_wp_url_namespaceObject.addQueryArgs)(window.location.href, params), state);
       
  4631 }
       
  4632 
       
  4633 history_history.push = push;
       
  4634 history_history.replace = replace;
       
  4635 /* harmony default export */ var utils_history = (history_history);
       
  4636 
       
  4637 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/index.js
       
  4638 
       
  4639 
       
  4640 /**
       
  4641  * WordPress dependencies
       
  4642  */
       
  4643 
       
  4644 /**
       
  4645  * Internal dependencies
       
  4646  */
       
  4647 
       
  4648 
       
  4649 const RoutesContext = (0,external_wp_element_namespaceObject.createContext)();
       
  4650 const HistoryContext = (0,external_wp_element_namespaceObject.createContext)();
       
  4651 function useLocation() {
       
  4652   return (0,external_wp_element_namespaceObject.useContext)(RoutesContext);
       
  4653 }
       
  4654 function useHistory() {
       
  4655   return (0,external_wp_element_namespaceObject.useContext)(HistoryContext);
       
  4656 }
       
  4657 
       
  4658 function getLocationWithParams(location) {
       
  4659   const searchParams = new URLSearchParams(location.search);
       
  4660   return { ...location,
       
  4661     params: Object.fromEntries(searchParams.entries())
       
  4662   };
       
  4663 }
       
  4664 
       
  4665 function Routes(_ref) {
       
  4666   let {
       
  4667     children
       
  4668   } = _ref;
       
  4669   const [location, setLocation] = (0,external_wp_element_namespaceObject.useState)(() => getLocationWithParams(utils_history.location));
       
  4670   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
  4671     return utils_history.listen(_ref2 => {
       
  4672       let {
       
  4673         location: updatedLocation
       
  4674       } = _ref2;
       
  4675       setLocation(getLocationWithParams(updatedLocation));
       
  4676     });
       
  4677   }, []);
       
  4678   return (0,external_wp_element_namespaceObject.createElement)(HistoryContext.Provider, {
       
  4679     value: utils_history
       
  4680   }, (0,external_wp_element_namespaceObject.createElement)(RoutesContext.Provider, {
       
  4681     value: location
       
  4682   }, children(location)));
       
  4683 }
       
  4684 
       
  4685 ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
       
  4686 var external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
       
  4687 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
       
  4688 
       
  4689 
       
  4690 /**
       
  4691  * WordPress dependencies
       
  4692  */
       
  4693 
       
  4694 const plus = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  4695   xmlns: "http://www.w3.org/2000/svg",
       
  4696   viewBox: "0 0 24 24"
       
  4697 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  4698   d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
       
  4699 }));
       
  4700 /* harmony default export */ var library_plus = (plus);
       
  4701 
       
  4702 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
       
  4703 
       
  4704 
       
  4705 /**
       
  4706  * WordPress dependencies
       
  4707  */
       
  4708 
       
  4709 const listView = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  4710   viewBox: "0 0 24 24",
       
  4711   xmlns: "http://www.w3.org/2000/svg"
       
  4712 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  4713   d: "M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"
       
  4714 }));
       
  4715 /* harmony default export */ var list_view = (listView);
       
  4716 
       
  4717 ;// CONCATENATED MODULE: external ["wp","keycodes"]
       
  4718 var external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
       
  4719 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
       
  4720 
       
  4721 
       
  4722 /**
       
  4723  * WordPress dependencies
       
  4724  */
       
  4725 
       
  4726 const external = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  4727   xmlns: "http://www.w3.org/2000/svg",
       
  4728   viewBox: "0 0 24 24"
       
  4729 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  4730   d: "M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"
       
  4731 }));
       
  4732 /* harmony default export */ var library_external = (external);
       
  4733 
       
  4734 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcut-help-modal/config.js
       
  4735 /**
       
  4736  * WordPress dependencies
       
  4737  */
       
  4738 
       
  4739 const textFormattingShortcuts = [{
       
  4740   keyCombination: {
       
  4741     modifier: 'primary',
       
  4742     character: 'b'
       
  4743   },
       
  4744   description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text bold.')
       
  4745 }, {
       
  4746   keyCombination: {
       
  4747     modifier: 'primary',
       
  4748     character: 'i'
       
  4749   },
       
  4750   description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text italic.')
       
  4751 }, {
       
  4752   keyCombination: {
       
  4753     modifier: 'primary',
       
  4754     character: 'k'
       
  4755   },
       
  4756   description: (0,external_wp_i18n_namespaceObject.__)('Convert the selected text into a link.')
       
  4757 }, {
       
  4758   keyCombination: {
       
  4759     modifier: 'primaryShift',
       
  4760     character: 'k'
       
  4761   },
       
  4762   description: (0,external_wp_i18n_namespaceObject.__)('Remove a link.')
       
  4763 }, {
       
  4764   keyCombination: {
       
  4765     modifier: 'primary',
       
  4766     character: 'u'
       
  4767   },
       
  4768   description: (0,external_wp_i18n_namespaceObject.__)('Underline the selected text.')
       
  4769 }];
       
  4770 
       
  4771 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcut-help-modal/shortcut.js
       
  4772 
       
  4773 
       
  4774 /**
       
  4775  * External dependencies
       
  4776  */
       
  4777 
       
  4778 /**
       
  4779  * WordPress dependencies
       
  4780  */
       
  4781 
       
  4782 
       
  4783 
       
  4784 
       
  4785 function KeyCombination(_ref) {
       
  4786   let {
       
  4787     keyCombination,
       
  4788     forceAriaLabel
       
  4789   } = _ref;
       
  4790   const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
       
  4791   const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
       
  4792   return (0,external_wp_element_namespaceObject.createElement)("kbd", {
       
  4793     className: "edit-site-keyboard-shortcut-help-modal__shortcut-key-combination",
       
  4794     "aria-label": forceAriaLabel || ariaLabel
       
  4795   }, (0,external_lodash_namespaceObject.castArray)(shortcut).map((character, index) => {
       
  4796     if (character === '+') {
       
  4797       return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, {
       
  4798         key: index
       
  4799       }, character);
       
  4800     }
       
  4801 
       
  4802     return (0,external_wp_element_namespaceObject.createElement)("kbd", {
       
  4803       key: index,
       
  4804       className: "edit-site-keyboard-shortcut-help-modal__shortcut-key"
       
  4805     }, character);
       
  4806   }));
       
  4807 }
       
  4808 
       
  4809 function Shortcut(_ref2) {
       
  4810   let {
       
  4811     description,
       
  4812     keyCombination,
       
  4813     aliases = [],
       
  4814     ariaLabel
       
  4815   } = _ref2;
       
  4816   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  4817     className: "edit-site-keyboard-shortcut-help-modal__shortcut-description"
       
  4818   }, description), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  4819     className: "edit-site-keyboard-shortcut-help-modal__shortcut-term"
       
  4820   }, (0,external_wp_element_namespaceObject.createElement)(KeyCombination, {
       
  4821     keyCombination: keyCombination,
       
  4822     forceAriaLabel: ariaLabel
       
  4823   }), aliases.map((alias, index) => (0,external_wp_element_namespaceObject.createElement)(KeyCombination, {
       
  4824     keyCombination: alias,
       
  4825     forceAriaLabel: ariaLabel,
       
  4826     key: index
       
  4827   }))));
       
  4828 }
       
  4829 
       
  4830 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
       
  4831 
       
  4832 
       
  4833 /**
       
  4834  * WordPress dependencies
       
  4835  */
       
  4836 
       
  4837 
       
  4838 /**
       
  4839  * Internal dependencies
       
  4840  */
       
  4841 
       
  4842 
       
  4843 function DynamicShortcut(_ref) {
       
  4844   let {
       
  4845     name
       
  4846   } = _ref;
       
  4847   const {
       
  4848     keyCombination,
       
  4849     description,
       
  4850     aliases
       
  4851   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  4852     const {
       
  4853       getShortcutKeyCombination,
       
  4854       getShortcutDescription,
       
  4855       getShortcutAliases
       
  4856     } = select(external_wp_keyboardShortcuts_namespaceObject.store);
       
  4857     return {
  9393     return {
  4858       keyCombination: getShortcutKeyCombination(name),
  9394       isReady: true,
  4859       aliases: getShortcutAliases(name),
  9395       postType,
  4860       description: getShortcutDescription(name)
  9396       postId,
  4861     };
  9397       context
  4862   }, [name]);
       
  4863 
       
  4864   if (!keyCombination) {
       
  4865     return null;
       
  4866   }
       
  4867 
       
  4868   return (0,external_wp_element_namespaceObject.createElement)(Shortcut, {
       
  4869     keyCombination: keyCombination,
       
  4870     description: description,
       
  4871     aliases: aliases
       
  4872   });
       
  4873 }
       
  4874 
       
  4875 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcut-help-modal/index.js
       
  4876 
       
  4877 
       
  4878 /**
       
  4879  * External dependencies
       
  4880  */
       
  4881 
       
  4882 
       
  4883 /**
       
  4884  * WordPress dependencies
       
  4885  */
       
  4886 
       
  4887 
       
  4888 
       
  4889 
       
  4890 
       
  4891 /**
       
  4892  * Internal dependencies
       
  4893  */
       
  4894 
       
  4895 
       
  4896 
       
  4897 
       
  4898 
       
  4899 const ShortcutList = _ref => {
       
  4900   let {
       
  4901     shortcuts
       
  4902   } = _ref;
       
  4903   return (
       
  4904     /*
       
  4905      * Disable reason: The `list` ARIA role is redundant but
       
  4906      * Safari+VoiceOver won't announce the list otherwise.
       
  4907      */
       
  4908 
       
  4909     /* eslint-disable jsx-a11y/no-redundant-roles */
       
  4910     (0,external_wp_element_namespaceObject.createElement)("ul", {
       
  4911       className: "edit-site-keyboard-shortcut-help-modal__shortcut-list",
       
  4912       role: "list"
       
  4913     }, shortcuts.map((shortcut, index) => (0,external_wp_element_namespaceObject.createElement)("li", {
       
  4914       className: "edit-site-keyboard-shortcut-help-modal__shortcut",
       
  4915       key: index
       
  4916     }, (0,external_lodash_namespaceObject.isString)(shortcut) ? (0,external_wp_element_namespaceObject.createElement)(DynamicShortcut, {
       
  4917       name: shortcut
       
  4918     }) : (0,external_wp_element_namespaceObject.createElement)(Shortcut, shortcut))))
       
  4919     /* eslint-enable jsx-a11y/no-redundant-roles */
       
  4920 
       
  4921   );
       
  4922 };
       
  4923 
       
  4924 const ShortcutSection = _ref2 => {
       
  4925   let {
       
  4926     title,
       
  4927     shortcuts,
       
  4928     className
       
  4929   } = _ref2;
       
  4930   return (0,external_wp_element_namespaceObject.createElement)("section", {
       
  4931     className: classnames_default()('edit-site-keyboard-shortcut-help-modal__section', className)
       
  4932   }, !!title && (0,external_wp_element_namespaceObject.createElement)("h2", {
       
  4933     className: "edit-site-keyboard-shortcut-help-modal__section-title"
       
  4934   }, title), (0,external_wp_element_namespaceObject.createElement)(ShortcutList, {
       
  4935     shortcuts: shortcuts
       
  4936   }));
       
  4937 };
       
  4938 
       
  4939 const ShortcutCategorySection = _ref3 => {
       
  4940   let {
       
  4941     title,
       
  4942     categoryName,
       
  4943     additionalShortcuts = []
       
  4944   } = _ref3;
       
  4945   const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  4946     return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName);
       
  4947   }, [categoryName]);
       
  4948   return (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
       
  4949     title: title,
       
  4950     shortcuts: categoryShortcuts.concat(additionalShortcuts)
       
  4951   });
       
  4952 };
       
  4953 
       
  4954 function KeyboardShortcutHelpModal(_ref4) {
       
  4955   let {
       
  4956     isModalActive,
       
  4957     toggleModal
       
  4958   } = _ref4;
       
  4959 
       
  4960   if (!isModalActive) {
       
  4961     return null;
       
  4962   }
       
  4963 
       
  4964   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
       
  4965     className: "edit-site-keyboard-shortcut-help-modal",
       
  4966     title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'),
       
  4967     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close'),
       
  4968     onRequestClose: toggleModal
       
  4969   }, (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
       
  4970     className: "edit-site-keyboard-shortcut-help-modal__main-shortcuts",
       
  4971     shortcuts: ['core/edit-site/keyboard-shortcuts']
       
  4972   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
       
  4973     title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'),
       
  4974     categoryName: "global"
       
  4975   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
       
  4976     title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'),
       
  4977     categoryName: "selection"
       
  4978   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
       
  4979     title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'),
       
  4980     categoryName: "block",
       
  4981     additionalShortcuts: [{
       
  4982       keyCombination: {
       
  4983         character: '/'
       
  4984       },
       
  4985       description: (0,external_wp_i18n_namespaceObject.__)('Change the block type after adding a new paragraph.'),
       
  4986 
       
  4987       /* translators: The forward-slash character. e.g. '/'. */
       
  4988       ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash')
       
  4989     }]
       
  4990   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
       
  4991     title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'),
       
  4992     shortcuts: textFormattingShortcuts
       
  4993   }));
       
  4994 }
       
  4995 
       
  4996 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/preferences-modal/enable-feature.js
       
  4997 
       
  4998 
       
  4999 
       
  5000 /**
       
  5001  * WordPress dependencies
       
  5002  */
       
  5003 
       
  5004 
       
  5005 
       
  5006 function EnableFeature(props) {
       
  5007   const {
       
  5008     featureName,
       
  5009     ...remainingProps
       
  5010   } = props;
       
  5011   const isChecked = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', featureName), [featureName]);
       
  5012   const {
       
  5013     toggle
       
  5014   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
  5015 
       
  5016   const onChange = () => toggle('core/edit-site', featureName);
       
  5017 
       
  5018   return (0,external_wp_element_namespaceObject.createElement)(preferences_modal_base_option, extends_extends({
       
  5019     onChange: onChange,
       
  5020     isChecked: isChecked
       
  5021   }, remainingProps));
       
  5022 }
       
  5023 
       
  5024 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/preferences-modal/index.js
       
  5025 
       
  5026 
       
  5027 /**
       
  5028  * WordPress dependencies
       
  5029  */
       
  5030 
       
  5031 
       
  5032 
       
  5033 /**
       
  5034  * Internal dependencies
       
  5035  */
       
  5036 
       
  5037 
       
  5038 function EditSitePreferencesModal(_ref) {
       
  5039   let {
       
  5040     isModalActive,
       
  5041     toggleModal
       
  5042   } = _ref;
       
  5043   const sections = (0,external_wp_element_namespaceObject.useMemo)(() => [{
       
  5044     name: 'general',
       
  5045     tabLabel: (0,external_wp_i18n_namespaceObject.__)('General'),
       
  5046     content: (0,external_wp_element_namespaceObject.createElement)(preferences_modal_section, {
       
  5047       title: (0,external_wp_i18n_namespaceObject.__)('Appearance'),
       
  5048       description: (0,external_wp_i18n_namespaceObject.__)('Customize options related to the block editor interface and editing flow.')
       
  5049     }, (0,external_wp_element_namespaceObject.createElement)(EnableFeature, {
       
  5050       featureName: "focusMode",
       
  5051       help: (0,external_wp_i18n_namespaceObject.__)('Highlights the current block and fades other content.'),
       
  5052       label: (0,external_wp_i18n_namespaceObject.__)('Spotlight mode')
       
  5053     }), (0,external_wp_element_namespaceObject.createElement)(EnableFeature, {
       
  5054       featureName: "showIconLabels",
       
  5055       label: (0,external_wp_i18n_namespaceObject.__)('Show button text labels'),
       
  5056       help: (0,external_wp_i18n_namespaceObject.__)('Show text instead of icons on buttons')
       
  5057     }))
       
  5058   }, {
       
  5059     name: 'blocks',
       
  5060     tabLabel: (0,external_wp_i18n_namespaceObject.__)('Blocks'),
       
  5061     content: (0,external_wp_element_namespaceObject.createElement)(preferences_modal_section, {
       
  5062       title: (0,external_wp_i18n_namespaceObject.__)('Block interactions'),
       
  5063       description: (0,external_wp_i18n_namespaceObject.__)('Customize how you interact with blocks in the block library and editing canvas.')
       
  5064     }, (0,external_wp_element_namespaceObject.createElement)(EnableFeature, {
       
  5065       featureName: "keepCaretInsideBlock",
       
  5066       help: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'),
       
  5067       label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block')
       
  5068     }))
       
  5069   }]);
       
  5070 
       
  5071   if (!isModalActive) {
       
  5072     return null;
       
  5073   }
       
  5074 
       
  5075   return (0,external_wp_element_namespaceObject.createElement)(PreferencesModal, {
       
  5076     closeModal: toggleModal
       
  5077   }, (0,external_wp_element_namespaceObject.createElement)(PreferencesModalTabs, {
       
  5078     sections: sections
       
  5079   }));
       
  5080 }
       
  5081 
       
  5082 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/tools-more-menu-group/index.js
       
  5083 
       
  5084 
       
  5085 /**
       
  5086  * External dependencies
       
  5087  */
       
  5088 
       
  5089 /**
       
  5090  * WordPress dependencies
       
  5091  */
       
  5092 
       
  5093 
       
  5094 const {
       
  5095   Fill: ToolsMoreMenuGroup,
       
  5096   Slot
       
  5097 } = (0,external_wp_components_namespaceObject.createSlotFill)('EditSiteToolsMoreMenuGroup');
       
  5098 
       
  5099 ToolsMoreMenuGroup.Slot = _ref => {
       
  5100   let {
       
  5101     fillProps
       
  5102   } = _ref;
       
  5103   return (0,external_wp_element_namespaceObject.createElement)(Slot, {
       
  5104     fillProps: fillProps
       
  5105   }, fills => !(0,external_lodash_namespaceObject.isEmpty)(fills) && fills);
       
  5106 };
       
  5107 
       
  5108 /* harmony default export */ var tools_more_menu_group = (ToolsMoreMenuGroup);
       
  5109 
       
  5110 // EXTERNAL MODULE: ./node_modules/downloadjs/download.js
       
  5111 var download = __webpack_require__(8981);
       
  5112 var download_default = /*#__PURE__*/__webpack_require__.n(download);
       
  5113 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/download.js
       
  5114 
       
  5115 
       
  5116 /**
       
  5117  * WordPress dependencies
       
  5118  */
       
  5119 
       
  5120 const download_download = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  5121   xmlns: "http://www.w3.org/2000/svg",
       
  5122   viewBox: "0 0 24 24"
       
  5123 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  5124   d: "M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"
       
  5125 }));
       
  5126 /* harmony default export */ var library_download = (download_download);
       
  5127 
       
  5128 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/more-menu/site-export.js
       
  5129 
       
  5130 
       
  5131 /**
       
  5132  * External dependencies
       
  5133  */
       
  5134 
       
  5135 /**
       
  5136  * WordPress dependencies
       
  5137  */
       
  5138 
       
  5139 
       
  5140 
       
  5141 
       
  5142 
       
  5143 
       
  5144 
       
  5145 function SiteExport() {
       
  5146   const {
       
  5147     createErrorNotice
       
  5148   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
  5149 
       
  5150   async function handleExport() {
       
  5151     try {
       
  5152       const response = await external_wp_apiFetch_default()({
       
  5153         path: '/wp-block-editor/v1/export',
       
  5154         parse: false
       
  5155       });
       
  5156       const blob = await response.blob();
       
  5157       const contentDisposition = response.headers.get('content-disposition');
       
  5158       const contentDispositionMatches = contentDisposition.match(/=(.+)\.zip/);
       
  5159       const fileName = contentDispositionMatches[1] ? contentDispositionMatches[1] : 'edit-site-export';
       
  5160       download_default()(blob, fileName + '.zip', 'application/zip');
       
  5161     } catch (errorResponse) {
       
  5162       let error = {};
       
  5163 
       
  5164       try {
       
  5165         error = await errorResponse.json();
       
  5166       } catch (e) {}
       
  5167 
       
  5168       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while creating the site export.');
       
  5169       createErrorNotice(errorMessage, {
       
  5170         type: 'snackbar'
       
  5171       });
       
  5172     }
       
  5173   }
       
  5174 
       
  5175   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5176     role: "menuitem",
       
  5177     icon: library_download,
       
  5178     onClick: handleExport,
       
  5179     info: (0,external_wp_i18n_namespaceObject.__)('Download your theme with updated templates and styles.')
       
  5180   }, (0,external_wp_i18n_namespaceObject._x)('Export', 'site exporter menu item'));
       
  5181 }
       
  5182 
       
  5183 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/more-menu/welcome-guide-menu-item.js
       
  5184 
       
  5185 
       
  5186 /**
       
  5187  * WordPress dependencies
       
  5188  */
       
  5189 
       
  5190 
       
  5191 
       
  5192 
       
  5193 function WelcomeGuideMenuItem() {
       
  5194   const {
       
  5195     toggle
       
  5196   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
  5197   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5198     onClick: () => toggle('core/edit-site', 'welcomeGuide')
       
  5199   }, (0,external_wp_i18n_namespaceObject.__)('Welcome Guide'));
       
  5200 }
       
  5201 
       
  5202 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/more-menu/copy-content-menu-item.js
       
  5203 
       
  5204 
       
  5205 /**
       
  5206  * WordPress dependencies
       
  5207  */
       
  5208 
       
  5209 
       
  5210 
       
  5211 
       
  5212 
       
  5213 
       
  5214 
       
  5215 /**
       
  5216  * Internal dependencies
       
  5217  */
       
  5218 
       
  5219 
       
  5220 function CopyContentMenuItem() {
       
  5221   const {
       
  5222     createNotice
       
  5223   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
  5224   const getText = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  5225     return () => {
       
  5226       const {
       
  5227         getEditedPostId,
       
  5228         getEditedPostType
       
  5229       } = select(store_store);
       
  5230       const {
       
  5231         getEditedEntityRecord
       
  5232       } = select(external_wp_coreData_namespaceObject.store);
       
  5233       const record = getEditedEntityRecord('postType', getEditedPostType(), getEditedPostId());
       
  5234 
       
  5235       if (record) {
       
  5236         if (typeof record.content === 'function') {
       
  5237           return record.content(record);
       
  5238         } else if (record.blocks) {
       
  5239           return (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(record.blocks);
       
  5240         } else if (record.content) {
       
  5241           return record.content;
       
  5242         }
       
  5243       }
       
  5244 
       
  5245       return '';
       
  5246     };
       
  5247   }, []);
       
  5248 
       
  5249   function onSuccess() {
       
  5250     createNotice('info', (0,external_wp_i18n_namespaceObject.__)('All content copied.'), {
       
  5251       isDismissible: true,
       
  5252       type: 'snackbar'
       
  5253     });
       
  5254   }
       
  5255 
       
  5256   const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(getText, onSuccess);
       
  5257   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5258     ref: ref
       
  5259   }, (0,external_wp_i18n_namespaceObject.__)('Copy all content'));
       
  5260 }
       
  5261 
       
  5262 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/mode-switcher/index.js
       
  5263 
       
  5264 
       
  5265 /**
       
  5266  * WordPress dependencies
       
  5267  */
       
  5268 
       
  5269 
       
  5270 
       
  5271 
       
  5272 /**
       
  5273  * Internal dependencies
       
  5274  */
       
  5275 
       
  5276 /**
       
  5277  * Internal dependencies
       
  5278  */
       
  5279 
       
  5280 
       
  5281 /**
       
  5282  * Set of available mode options.
       
  5283  *
       
  5284  * @type {Array}
       
  5285  */
       
  5286 
       
  5287 const MODES = [{
       
  5288   value: 'visual',
       
  5289   label: (0,external_wp_i18n_namespaceObject.__)('Visual editor')
       
  5290 }, {
       
  5291   value: 'text',
       
  5292   label: (0,external_wp_i18n_namespaceObject.__)('Code editor')
       
  5293 }];
       
  5294 
       
  5295 function ModeSwitcher() {
       
  5296   const {
       
  5297     shortcut,
       
  5298     mode
       
  5299   } = (0,external_wp_data_namespaceObject.useSelect)(select => ({
       
  5300     shortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getShortcutRepresentation('core/edit-site/toggle-mode'),
       
  5301     isRichEditingEnabled: select(store_store).getSettings().richEditingEnabled,
       
  5302     isCodeEditingEnabled: select(store_store).getSettings().codeEditingEnabled,
       
  5303     mode: select(store_store).getEditorMode()
       
  5304   }), []);
       
  5305   const {
       
  5306     switchEditorMode
       
  5307   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
  5308   const choices = MODES.map(choice => {
       
  5309     if (choice.value !== mode) {
       
  5310       return { ...choice,
       
  5311         shortcut
       
  5312       };
       
  5313     }
       
  5314 
       
  5315     return choice;
       
  5316   });
       
  5317   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
       
  5318     label: (0,external_wp_i18n_namespaceObject.__)('Editor')
       
  5319   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItemsChoice, {
       
  5320     choices: choices,
       
  5321     value: mode,
       
  5322     onSelect: switchEditorMode
       
  5323   }));
       
  5324 }
       
  5325 
       
  5326 /* harmony default export */ var mode_switcher = (ModeSwitcher);
       
  5327 
       
  5328 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/more-menu/index.js
       
  5329 
       
  5330 
       
  5331 /**
       
  5332  * WordPress dependencies
       
  5333  */
       
  5334 
       
  5335 
       
  5336 
       
  5337 
       
  5338 
       
  5339 
       
  5340 
       
  5341 
       
  5342 /**
       
  5343  * Internal dependencies
       
  5344  */
       
  5345 
       
  5346 
       
  5347 
       
  5348 
       
  5349 
       
  5350 
       
  5351 
       
  5352 
       
  5353 function MoreMenu() {
       
  5354   const [isModalActive, toggleModal] = (0,external_wp_element_namespaceObject.useReducer)(isActive => !isActive, false);
       
  5355   const [isPreferencesModalActive, togglePreferencesModal] = (0,external_wp_element_namespaceObject.useReducer)(isActive => !isActive, false);
       
  5356   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/keyboard-shortcuts', toggleModal);
       
  5357   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(MoreMenuDropdown, null, _ref => {
       
  5358     let {
       
  5359       onClose
       
  5360     } = _ref;
       
  5361     return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
       
  5362       label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun')
       
  5363     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
       
  5364       scope: "core/edit-site",
       
  5365       name: "fixedToolbar",
       
  5366       label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'),
       
  5367       info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'),
       
  5368       messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'),
       
  5369       messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated')
       
  5370     }), (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
       
  5371       scope: "core/edit-site",
       
  5372       name: "focusMode",
       
  5373       label: (0,external_wp_i18n_namespaceObject.__)('Spotlight mode'),
       
  5374       info: (0,external_wp_i18n_namespaceObject.__)('Focus on one block at a time'),
       
  5375       messageActivated: (0,external_wp_i18n_namespaceObject.__)('Spotlight mode activated'),
       
  5376       messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Spotlight mode deactivated')
       
  5377     }), (0,external_wp_element_namespaceObject.createElement)(mode_switcher, null), (0,external_wp_element_namespaceObject.createElement)(action_item.Slot, {
       
  5378       name: "core/edit-site/plugin-more-menu",
       
  5379       label: (0,external_wp_i18n_namespaceObject.__)('Plugins'),
       
  5380       as: external_wp_components_namespaceObject.MenuGroup,
       
  5381       fillProps: {
       
  5382         onClick: onClose
       
  5383       }
       
  5384     })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
       
  5385       label: (0,external_wp_i18n_namespaceObject.__)('Tools')
       
  5386     }, (0,external_wp_element_namespaceObject.createElement)(SiteExport, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5387       onClick: toggleModal,
       
  5388       shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h')
       
  5389     }, (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')), (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideMenuItem, null), (0,external_wp_element_namespaceObject.createElement)(CopyContentMenuItem, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5390       icon: library_external,
       
  5391       role: "menuitem",
       
  5392       href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/site-editor/'),
       
  5393       target: "_blank",
       
  5394       rel: "noopener noreferrer"
       
  5395     }, (0,external_wp_i18n_namespaceObject.__)('Help'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
       
  5396       as: "span"
       
  5397     },
       
  5398     /* translators: accessibility text */
       
  5399     (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)'))), (0,external_wp_element_namespaceObject.createElement)(tools_more_menu_group.Slot, {
       
  5400       fillProps: {
       
  5401         onClose
       
  5402       }
       
  5403     })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5404       onClick: togglePreferencesModal
       
  5405     }, (0,external_wp_i18n_namespaceObject.__)('Preferences'))));
       
  5406   }), (0,external_wp_element_namespaceObject.createElement)(KeyboardShortcutHelpModal, {
       
  5407     isModalActive: isModalActive,
       
  5408     toggleModal: toggleModal
       
  5409   }), (0,external_wp_element_namespaceObject.createElement)(EditSitePreferencesModal, {
       
  5410     isModalActive: isPreferencesModalActive,
       
  5411     toggleModal: togglePreferencesModal
       
  5412   }));
       
  5413 }
       
  5414 
       
  5415 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/save-button/index.js
       
  5416 
       
  5417 
       
  5418 /**
       
  5419  * External dependencies
       
  5420  */
       
  5421 
       
  5422 /**
       
  5423  * WordPress dependencies
       
  5424  */
       
  5425 
       
  5426 
       
  5427 
       
  5428 
       
  5429 
       
  5430 function SaveButton(_ref) {
       
  5431   let {
       
  5432     openEntitiesSavedStates,
       
  5433     isEntitiesSavedStatesOpen
       
  5434   } = _ref;
       
  5435   const {
       
  5436     isDirty,
       
  5437     isSaving
       
  5438   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  5439     const {
       
  5440       __experimentalGetDirtyEntityRecords,
       
  5441       isSavingEntityRecord
       
  5442     } = select(external_wp_coreData_namespaceObject.store);
       
  5443 
       
  5444     const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
       
  5445 
       
  5446     return {
       
  5447       isDirty: dirtyEntityRecords.length > 0,
       
  5448       isSaving: (0,external_lodash_namespaceObject.some)(dirtyEntityRecords, record => isSavingEntityRecord(record.kind, record.name, record.key))
       
  5449     };
       
  5450   }, []);
       
  5451   const disabled = !isDirty || isSaving;
       
  5452   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  5453     variant: "primary",
       
  5454     className: "edit-site-save-button__button",
       
  5455     "aria-disabled": disabled,
       
  5456     "aria-expanded": isEntitiesSavedStatesOpen,
       
  5457     disabled: disabled,
       
  5458     isBusy: isSaving,
       
  5459     onClick: disabled ? undefined : openEntitiesSavedStates
       
  5460   }, (0,external_wp_i18n_namespaceObject.__)('Save')));
       
  5461 }
       
  5462 
       
  5463 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
       
  5464 
       
  5465 
       
  5466 /**
       
  5467  * WordPress dependencies
       
  5468  */
       
  5469 
       
  5470 const undo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  5471   xmlns: "http://www.w3.org/2000/svg",
       
  5472   viewBox: "0 0 24 24"
       
  5473 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  5474   d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
       
  5475 }));
       
  5476 /* harmony default export */ var library_undo = (undo);
       
  5477 
       
  5478 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
       
  5479 
       
  5480 
       
  5481 /**
       
  5482  * WordPress dependencies
       
  5483  */
       
  5484 
       
  5485 const redo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  5486   xmlns: "http://www.w3.org/2000/svg",
       
  5487   viewBox: "0 0 24 24"
       
  5488 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  5489   d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
       
  5490 }));
       
  5491 /* harmony default export */ var library_redo = (redo);
       
  5492 
       
  5493 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/undo-redo/undo.js
       
  5494 
       
  5495 
       
  5496 /**
       
  5497  * WordPress dependencies
       
  5498  */
       
  5499 
       
  5500 
       
  5501 
       
  5502 
       
  5503 
       
  5504 
       
  5505 function UndoButton() {
       
  5506   const hasUndo = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).hasUndo(), []);
       
  5507   const {
       
  5508     undo
       
  5509   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
  5510   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  5511     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo,
       
  5512     label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
       
  5513     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z') // If there are no undo levels we don't want to actually disable this
       
  5514     // button, because it will remove focus for keyboard users.
       
  5515     // See: https://github.com/WordPress/gutenberg/issues/3486
       
  5516     ,
       
  5517     "aria-disabled": !hasUndo,
       
  5518     onClick: hasUndo ? undo : undefined
       
  5519   });
       
  5520 }
       
  5521 
       
  5522 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/undo-redo/redo.js
       
  5523 
       
  5524 
       
  5525 /**
       
  5526  * WordPress dependencies
       
  5527  */
       
  5528 
       
  5529 
       
  5530 
       
  5531 
       
  5532 
       
  5533 
       
  5534 function RedoButton() {
       
  5535   const hasRedo = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).hasRedo(), []);
       
  5536   const {
       
  5537     redo
       
  5538   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
  5539   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  5540     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo,
       
  5541     label: (0,external_wp_i18n_namespaceObject.__)('Redo'),
       
  5542     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') // If there are no undo levels we don't want to actually disable this
       
  5543     // button, because it will remove focus for keyboard users.
       
  5544     // See: https://github.com/WordPress/gutenberg/issues/3486
       
  5545     ,
       
  5546     "aria-disabled": !hasRedo,
       
  5547     onClick: hasRedo ? redo : undefined
       
  5548   });
       
  5549 }
       
  5550 
       
  5551 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
       
  5552 
       
  5553 
       
  5554 /**
       
  5555  * WordPress dependencies
       
  5556  */
       
  5557 
       
  5558 const chevronDown = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  5559   viewBox: "0 0 24 24",
       
  5560   xmlns: "http://www.w3.org/2000/svg"
       
  5561 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  5562   d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
       
  5563 }));
       
  5564 /* harmony default export */ var chevron_down = (chevronDown);
       
  5565 
       
  5566 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/document-actions/index.js
       
  5567 
       
  5568 
       
  5569 /**
       
  5570  * External dependencies
       
  5571  */
       
  5572 
       
  5573 /**
       
  5574  * WordPress dependencies
       
  5575  */
       
  5576 
       
  5577 
       
  5578 
       
  5579 
       
  5580 
       
  5581 
       
  5582 
       
  5583 
       
  5584 
       
  5585 function getBlockDisplayText(block) {
       
  5586   if (block) {
       
  5587     const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(block.name);
       
  5588     return blockType ? (0,external_wp_blocks_namespaceObject.__experimentalGetBlockLabel)(blockType, block.attributes) : null;
       
  5589   }
       
  5590 
       
  5591   return null;
       
  5592 }
       
  5593 
       
  5594 function useSecondaryText() {
       
  5595   const {
       
  5596     getBlock
       
  5597   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
       
  5598   const activeEntityBlockId = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).__experimentalGetActiveBlockIdByBlockNames(['core/template-part']), []);
       
  5599 
       
  5600   if (activeEntityBlockId) {
       
  5601     return {
       
  5602       label: getBlockDisplayText(getBlock(activeEntityBlockId)),
       
  5603       isActive: true
       
  5604     };
  9398     };
  5605   }
  9399   }
  5606 
  9400   if (hasLoadedAllDependencies) {
  5607   return {};
       
  5608 }
       
  5609 /**
       
  5610  * @param {Object}   props                Props for the DocumentActions component.
       
  5611  * @param {string}   props.entityTitle    The title to display.
       
  5612  * @param {string}   props.entityLabel    A label to use for entity-related options.
       
  5613  *                                        E.g. "template" would be used for "edit
       
  5614  *                                        template" and "show template details".
       
  5615  * @param {boolean}  props.isLoaded       Whether the data is available.
       
  5616  * @param {Function} props.children       React component to use for the
       
  5617  *                                        information dropdown area. Should be a
       
  5618  *                                        function which accepts dropdown props.
       
  5619  * @param {boolean}  props.showIconLabels Whether buttons display icons or text labels.
       
  5620  */
       
  5621 
       
  5622 
       
  5623 function DocumentActions(_ref) {
       
  5624   let {
       
  5625     entityTitle,
       
  5626     entityLabel,
       
  5627     isLoaded,
       
  5628     children: dropdownContent,
       
  5629     showIconLabels
       
  5630   } = _ref;
       
  5631   const {
       
  5632     label
       
  5633   } = useSecondaryText(); // The title ref is passed to the popover as the anchorRef so that the
       
  5634   // dropdown is centered over the whole title area rather than just one
       
  5635   // part of it.
       
  5636 
       
  5637   const titleRef = (0,external_wp_element_namespaceObject.useRef)(); // Return a simple loading indicator until we have information to show.
       
  5638 
       
  5639   if (!isLoaded) {
       
  5640     return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  5641       className: "edit-site-document-actions"
       
  5642     }, (0,external_wp_i18n_namespaceObject.__)('Loading…'));
       
  5643   } // Return feedback that the template does not seem to exist.
       
  5644 
       
  5645 
       
  5646   if (!entityTitle) {
       
  5647     return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  5648       className: "edit-site-document-actions"
       
  5649     }, (0,external_wp_i18n_namespaceObject.__)('Template not found'));
       
  5650   }
       
  5651 
       
  5652   return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  5653     className: classnames_default()('edit-site-document-actions', {
       
  5654       'has-secondary-label': !!label
       
  5655     })
       
  5656   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  5657     ref: titleRef,
       
  5658     className: "edit-site-document-actions__title-wrapper"
       
  5659   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
       
  5660     size: "body",
       
  5661     className: "edit-site-document-actions__title",
       
  5662     as: "h1"
       
  5663   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
       
  5664     as: "span"
       
  5665   }, (0,external_wp_i18n_namespaceObject.sprintf)(
       
  5666   /* translators: %s: the entity being edited, like "template"*/
       
  5667   (0,external_wp_i18n_namespaceObject.__)('Editing %s: '), entityLabel)), entityTitle), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
       
  5668     size: "body",
       
  5669     className: "edit-site-document-actions__secondary-item"
       
  5670   }, label !== null && label !== void 0 ? label : ''), dropdownContent && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, {
       
  5671     popoverProps: {
       
  5672       anchorRef: titleRef.current
       
  5673     },
       
  5674     position: "bottom center",
       
  5675     renderToggle: _ref2 => {
       
  5676       let {
       
  5677         isOpen,
       
  5678         onToggle
       
  5679       } = _ref2;
       
  5680       return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  5681         className: "edit-site-document-actions__get-info",
       
  5682         icon: chevron_down,
       
  5683         "aria-expanded": isOpen,
       
  5684         "aria-haspopup": "true",
       
  5685         onClick: onToggle,
       
  5686         label: (0,external_wp_i18n_namespaceObject.sprintf)(
       
  5687         /* translators: %s: the entity to see details about, like "template"*/
       
  5688         (0,external_wp_i18n_namespaceObject.__)('Show %s details'), entityLabel)
       
  5689       }, showIconLabels && (0,external_wp_i18n_namespaceObject.__)('Details'));
       
  5690     },
       
  5691     contentClassName: "edit-site-document-actions__info-dropdown",
       
  5692     renderContent: dropdownContent
       
  5693   })));
       
  5694 }
       
  5695 
       
  5696 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/link.js
       
  5697 
       
  5698 
       
  5699 
       
  5700 /**
       
  5701  * WordPress dependencies
       
  5702  */
       
  5703 
       
  5704 /**
       
  5705  * Internal dependencies
       
  5706  */
       
  5707 
       
  5708 
       
  5709 function useLink() {
       
  5710   let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  5711   let state = arguments.length > 1 ? arguments[1] : undefined;
       
  5712   let shouldReplace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
       
  5713   const history = useHistory();
       
  5714 
       
  5715   function onClick(event) {
       
  5716     event.preventDefault();
       
  5717 
       
  5718     if (shouldReplace) {
       
  5719       history.replace(params, state);
       
  5720     } else {
       
  5721       history.push(params, state);
       
  5722     }
       
  5723   }
       
  5724 
       
  5725   return {
       
  5726     href: (0,external_wp_url_namespaceObject.addQueryArgs)(window.location.href, params),
       
  5727     onClick
       
  5728   };
       
  5729 }
       
  5730 function Link(_ref) {
       
  5731   let {
       
  5732     params = {},
       
  5733     state,
       
  5734     replace: shouldReplace = false,
       
  5735     children,
       
  5736     ...props
       
  5737   } = _ref;
       
  5738   const {
       
  5739     href,
       
  5740     onClick
       
  5741   } = useLink(params, state, shouldReplace);
       
  5742   return (0,external_wp_element_namespaceObject.createElement)("a", extends_extends({
       
  5743     href: href,
       
  5744     onClick: onClick
       
  5745   }, props), children);
       
  5746 }
       
  5747 
       
  5748 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-details/template-areas.js
       
  5749 
       
  5750 
       
  5751 
       
  5752 /**
       
  5753  * WordPress dependencies
       
  5754  */
       
  5755 
       
  5756 
       
  5757 
       
  5758 
       
  5759 
       
  5760 
       
  5761 /**
       
  5762  * Internal dependencies
       
  5763  */
       
  5764 
       
  5765 
       
  5766 
       
  5767 
       
  5768 
       
  5769 
       
  5770 function TemplatePartItemMore(_ref) {
       
  5771   var _templatePart$title;
       
  5772 
       
  5773   let {
       
  5774     onClose,
       
  5775     templatePart,
       
  5776     closeTemplateDetailsDropdown
       
  5777   } = _ref;
       
  5778   const {
       
  5779     revertTemplate
       
  5780   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
  5781   const {
       
  5782     params
       
  5783   } = useLocation();
       
  5784   const editLinkProps = useLink({
       
  5785     postId: templatePart.id,
       
  5786     postType: templatePart.type
       
  5787   }, {
       
  5788     fromTemplateId: params.postId
       
  5789   });
       
  5790 
       
  5791   function editTemplatePart(event) {
       
  5792     editLinkProps.onClick(event);
       
  5793     onClose();
       
  5794     closeTemplateDetailsDropdown();
       
  5795   }
       
  5796 
       
  5797   function clearCustomizations() {
       
  5798     revertTemplate(templatePart);
       
  5799     onClose();
       
  5800     closeTemplateDetailsDropdown();
       
  5801   }
       
  5802 
       
  5803   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, extends_extends({}, editLinkProps, {
       
  5804     onClick: editTemplatePart
       
  5805   }), (0,external_wp_i18n_namespaceObject.sprintf)(
       
  5806   /* translators: %s: template part title */
       
  5807   (0,external_wp_i18n_namespaceObject.__)('Edit %s'), (_templatePart$title = templatePart.title) === null || _templatePart$title === void 0 ? void 0 : _templatePart$title.rendered))), isTemplateRevertable(templatePart) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5808     info: (0,external_wp_i18n_namespaceObject.__)('Restore template to default state'),
       
  5809     onClick: clearCustomizations
       
  5810   }, (0,external_wp_i18n_namespaceObject.__)('Clear customizations'))));
       
  5811 }
       
  5812 
       
  5813 function TemplatePartItem(_ref2) {
       
  5814   let {
       
  5815     templatePart,
       
  5816     clientId,
       
  5817     closeTemplateDetailsDropdown
       
  5818   } = _ref2;
       
  5819   const {
       
  5820     selectBlock,
       
  5821     toggleBlockHighlight
       
  5822   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
  5823   const templatePartArea = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  5824     const defaultAreas = select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplatePartAreas();
       
  5825 
       
  5826     return defaultAreas.find(defaultArea => defaultArea.area === templatePart.area);
       
  5827   }, [templatePart.area]);
       
  5828 
       
  5829   const highlightBlock = () => toggleBlockHighlight(clientId, true);
       
  5830 
       
  5831   const cancelHighlightBlock = () => toggleBlockHighlight(clientId, false);
       
  5832 
       
  5833   return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  5834     role: "menuitem",
       
  5835     className: "edit-site-template-details__template-areas-item"
       
  5836   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5837     role: "button",
       
  5838     icon: templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.icon,
       
  5839     iconPosition: "left",
       
  5840     onClick: () => {
       
  5841       selectBlock(clientId);
       
  5842     },
       
  5843     onMouseOver: highlightBlock,
       
  5844     onMouseLeave: cancelHighlightBlock,
       
  5845     onFocus: highlightBlock,
       
  5846     onBlur: cancelHighlightBlock
       
  5847   }, templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.label), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, {
       
  5848     icon: more_vertical,
       
  5849     label: (0,external_wp_i18n_namespaceObject.__)('More options'),
       
  5850     className: "edit-site-template-details__template-areas-item-more"
       
  5851   }, _ref3 => {
       
  5852     let {
       
  5853       onClose
       
  5854     } = _ref3;
       
  5855     return (0,external_wp_element_namespaceObject.createElement)(TemplatePartItemMore, {
       
  5856       onClose: onClose,
       
  5857       templatePart: templatePart,
       
  5858       closeTemplateDetailsDropdown: closeTemplateDetailsDropdown
       
  5859     });
       
  5860   }));
       
  5861 }
       
  5862 
       
  5863 function TemplateAreas(_ref4) {
       
  5864   let {
       
  5865     closeTemplateDetailsDropdown
       
  5866   } = _ref4;
       
  5867   const templateParts = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getCurrentTemplateTemplateParts(), []);
       
  5868 
       
  5869   if (!templateParts.length) {
       
  5870     return null;
       
  5871   }
       
  5872 
       
  5873   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
       
  5874     label: (0,external_wp_i18n_namespaceObject.__)('Areas'),
       
  5875     className: "edit-site-template-details__group edit-site-template-details__template-areas"
       
  5876   }, templateParts.map(_ref5 => {
       
  5877     let {
       
  5878       templatePart,
       
  5879       block
       
  5880     } = _ref5;
       
  5881     return (0,external_wp_element_namespaceObject.createElement)(TemplatePartItem, {
       
  5882       key: templatePart.slug,
       
  5883       clientId: block.clientId,
       
  5884       templatePart: templatePart,
       
  5885       closeTemplateDetailsDropdown: closeTemplateDetailsDropdown
       
  5886     });
       
  5887   }));
       
  5888 }
       
  5889 
       
  5890 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-details/edit-template-title.js
       
  5891 
       
  5892 
       
  5893 /**
       
  5894  * WordPress dependencies
       
  5895  */
       
  5896 
       
  5897 
       
  5898 
       
  5899 function EditTemplateTitle(_ref) {
       
  5900   let {
       
  5901     template
       
  5902   } = _ref;
       
  5903   const [title, setTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', template.type, 'title', template.id);
       
  5904   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
       
  5905     label: (0,external_wp_i18n_namespaceObject.__)('Title'),
       
  5906     value: title,
       
  5907     help: (0,external_wp_i18n_namespaceObject.__)('Give the template a title that indicates its purpose, e.g. "Full Width".'),
       
  5908     onChange: newTitle => {
       
  5909       setTitle(newTitle || template.slug);
       
  5910     }
       
  5911   });
       
  5912 }
       
  5913 
       
  5914 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-details/index.js
       
  5915 
       
  5916 
       
  5917 
       
  5918 /**
       
  5919  * WordPress dependencies
       
  5920  */
       
  5921 
       
  5922 
       
  5923 
       
  5924 
       
  5925 
       
  5926 /**
       
  5927  * Internal dependencies
       
  5928  */
       
  5929 
       
  5930 
       
  5931 
       
  5932 
       
  5933 
       
  5934 
       
  5935 
       
  5936 function TemplateDetails(_ref) {
       
  5937   let {
       
  5938     template,
       
  5939     onClose
       
  5940   } = _ref;
       
  5941   const {
       
  5942     title,
       
  5943     description
       
  5944   } = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).__experimentalGetTemplateInfo(template), []);
       
  5945   const {
       
  5946     revertTemplate
       
  5947   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
  5948   const templateSubMenu = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  5949     if ((template === null || template === void 0 ? void 0 : template.type) === 'wp_template') {
       
  5950       return {
       
  5951         title: (0,external_wp_i18n_namespaceObject.__)('templates'),
       
  5952         menu: MENU_TEMPLATES
       
  5953       };
       
  5954     }
       
  5955 
       
  5956     return TEMPLATE_PARTS_SUB_MENUS.find(_ref2 => {
       
  5957       let {
       
  5958         area
       
  5959       } = _ref2;
       
  5960       return area === (template === null || template === void 0 ? void 0 : template.area);
       
  5961     });
       
  5962   }, [template]);
       
  5963   const browseAllLinkProps = useLink({
       
  5964     // TODO: We should update this to filter by template part's areas as well.
       
  5965     postType: template.type,
       
  5966     postId: undefined
       
  5967   }); // Only user-created and non-default templates can change the name.
       
  5968 
       
  5969   const canEditTitle = template.is_custom && !template.has_theme_file;
       
  5970 
       
  5971   if (!template) {
       
  5972     return null;
       
  5973   }
       
  5974 
       
  5975   const revert = () => {
       
  5976     revertTemplate(template);
       
  5977     onClose();
       
  5978   };
       
  5979 
       
  5980   return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  5981     className: "edit-site-template-details"
       
  5982   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  5983     className: "edit-site-template-details__group"
       
  5984   }, canEditTitle ? (0,external_wp_element_namespaceObject.createElement)(EditTemplateTitle, {
       
  5985     template: template
       
  5986   }) : (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
       
  5987     level: 4,
       
  5988     weight: 600,
       
  5989     className: "edit-site-template-details__title"
       
  5990   }, title), description && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
       
  5991     size: "body",
       
  5992     className: "edit-site-template-details__description",
       
  5993     as: "p"
       
  5994   }, description)), (0,external_wp_element_namespaceObject.createElement)(TemplateAreas, {
       
  5995     closeTemplateDetailsDropdown: onClose
       
  5996   }), isTemplateRevertable(template) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
       
  5997     className: "edit-site-template-details__group edit-site-template-details__revert"
       
  5998   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
  5999     className: "edit-site-template-details__revert-button",
       
  6000     info: (0,external_wp_i18n_namespaceObject.__)('Restore template to default state'),
       
  6001     onClick: revert
       
  6002   }, (0,external_wp_i18n_namespaceObject.__)('Clear customizations'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, extends_extends({
       
  6003     className: "edit-site-template-details__show-all-button"
       
  6004   }, browseAllLinkProps), (0,external_wp_i18n_namespaceObject.sprintf)(
       
  6005   /* translators: the template part's area name ("Headers", "Sidebars") or "templates". */
       
  6006   (0,external_wp_i18n_namespaceObject.__)('Browse all %s'), templateSubMenu.title)));
       
  6007 }
       
  6008 
       
  6009 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/index.js
       
  6010 
       
  6011 
       
  6012 /**
       
  6013  * WordPress dependencies
       
  6014  */
       
  6015 
       
  6016 
       
  6017 
       
  6018 
       
  6019 
       
  6020 
       
  6021 
       
  6022 
       
  6023 
       
  6024 
       
  6025 
       
  6026 /**
       
  6027  * Internal dependencies
       
  6028  */
       
  6029 
       
  6030 
       
  6031 
       
  6032 
       
  6033 
       
  6034 
       
  6035 
       
  6036 
       
  6037 
       
  6038 const preventDefault = event => {
       
  6039   event.preventDefault();
       
  6040 };
       
  6041 
       
  6042 function Header(_ref) {
       
  6043   let {
       
  6044     openEntitiesSavedStates,
       
  6045     isEntitiesSavedStatesOpen,
       
  6046     showIconLabels
       
  6047   } = _ref;
       
  6048   const inserterButton = (0,external_wp_element_namespaceObject.useRef)();
       
  6049   const {
       
  6050     deviceType,
       
  6051     entityTitle,
       
  6052     template,
       
  6053     templateType,
       
  6054     isInserterOpen,
       
  6055     isListViewOpen,
       
  6056     listViewShortcut,
       
  6057     isLoaded,
       
  6058     isVisualMode
       
  6059   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  6060     const {
       
  6061       __experimentalGetPreviewDeviceType,
       
  6062       getEditedPostType,
       
  6063       getEditedPostId,
       
  6064       isInserterOpened,
       
  6065       isListViewOpened,
       
  6066       getEditorMode
       
  6067     } = select(store_store);
       
  6068     const {
       
  6069       getEditedEntityRecord
       
  6070     } = select(external_wp_coreData_namespaceObject.store);
       
  6071     const {
       
  6072       __experimentalGetTemplateInfo: getTemplateInfo
       
  6073     } = select(external_wp_editor_namespaceObject.store);
       
  6074     const {
       
  6075       getShortcutRepresentation
       
  6076     } = select(external_wp_keyboardShortcuts_namespaceObject.store);
       
  6077     const postType = getEditedPostType();
       
  6078     const postId = getEditedPostId();
       
  6079     const record = getEditedEntityRecord('postType', postType, postId);
       
  6080 
       
  6081     const _isLoaded = !!postId;
       
  6082 
       
  6083     return {
  9401     return {
  6084       deviceType: __experimentalGetPreviewDeviceType(),
  9402       isReady: resolvedTemplateId !== undefined,
  6085       entityTitle: getTemplateInfo(record).title,
  9403       postType: TEMPLATE_POST_TYPE,
  6086       isLoaded: _isLoaded,
  9404       postId: resolvedTemplateId,
  6087       template: record,
  9405       context
  6088       templateType: postType,
       
  6089       isInserterOpen: isInserterOpened(),
       
  6090       isListViewOpen: isListViewOpened(),
       
  6091       listViewShortcut: getShortcutRepresentation('core/edit-site/toggle-list-view'),
       
  6092       isVisualMode: getEditorMode() === 'visual'
       
  6093     };
       
  6094   }, []);
       
  6095   const {
       
  6096     __experimentalSetPreviewDeviceType: setPreviewDeviceType,
       
  6097     setIsInserterOpened,
       
  6098     setIsListViewOpened
       
  6099   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
  6100   const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
       
  6101   const openInserter = (0,external_wp_element_namespaceObject.useCallback)(() => {
       
  6102     if (isInserterOpen) {
       
  6103       // Focusing the inserter button closes the inserter popover.
       
  6104       inserterButton.current.focus();
       
  6105     } else {
       
  6106       setIsInserterOpened(true);
       
  6107     }
       
  6108   }, [isInserterOpen, setIsInserterOpened]);
       
  6109   const toggleListView = (0,external_wp_element_namespaceObject.useCallback)(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
       
  6110   const isFocusMode = templateType === 'wp_template_part';
       
  6111   return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  6112     className: "edit-site-header"
       
  6113   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  6114     className: "edit-site-header_start"
       
  6115   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  6116     className: "edit-site-header__toolbar"
       
  6117   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  6118     ref: inserterButton,
       
  6119     variant: "primary",
       
  6120     isPressed: isInserterOpen,
       
  6121     className: "edit-site-header-toolbar__inserter-toggle",
       
  6122     disabled: !isVisualMode,
       
  6123     onMouseDown: preventDefault,
       
  6124     onClick: openInserter,
       
  6125     icon: library_plus,
       
  6126     label: (0,external_wp_i18n_namespaceObject._x)('Toggle block inserter', 'Generic label for block inserter button')
       
  6127   }, showIconLabels && (!isInserterOpen ? (0,external_wp_i18n_namespaceObject.__)('Add') : (0,external_wp_i18n_namespaceObject.__)('Close'))), isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
       
  6128     as: external_wp_blockEditor_namespaceObject.ToolSelector,
       
  6129     disabled: !isVisualMode
       
  6130   }), (0,external_wp_element_namespaceObject.createElement)(UndoButton, null), (0,external_wp_element_namespaceObject.createElement)(RedoButton, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  6131     className: "edit-site-header-toolbar__list-view-toggle",
       
  6132     disabled: !isVisualMode,
       
  6133     icon: list_view,
       
  6134     isPressed: isListViewOpen
       
  6135     /* translators: button label text should, if possible, be under 16 characters. */
       
  6136     ,
       
  6137     label: (0,external_wp_i18n_namespaceObject.__)('List View'),
       
  6138     onClick: toggleListView,
       
  6139     shortcut: listViewShortcut
       
  6140   })))), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  6141     className: "edit-site-header_center"
       
  6142   }, (0,external_wp_element_namespaceObject.createElement)(DocumentActions, {
       
  6143     entityTitle: entityTitle,
       
  6144     entityLabel: templateType === 'wp_template_part' ? 'template part' : 'template',
       
  6145     isLoaded: isLoaded,
       
  6146     showIconLabels: showIconLabels
       
  6147   }, _ref2 => {
       
  6148     let {
       
  6149       onClose
       
  6150     } = _ref2;
       
  6151     return (0,external_wp_element_namespaceObject.createElement)(TemplateDetails, {
       
  6152       template: template,
       
  6153       onClose: onClose
       
  6154     });
       
  6155   })), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  6156     className: "edit-site-header_end"
       
  6157   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  6158     className: "edit-site-header__actions"
       
  6159   }, !isFocusMode && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalPreviewOptions, {
       
  6160     deviceType: deviceType,
       
  6161     setDeviceType: setPreviewDeviceType
       
  6162   }), (0,external_wp_element_namespaceObject.createElement)(SaveButton, {
       
  6163     openEntitiesSavedStates: openEntitiesSavedStates,
       
  6164     isEntitiesSavedStatesOpen: isEntitiesSavedStatesOpen
       
  6165   }), (0,external_wp_element_namespaceObject.createElement)(pinned_items.Slot, {
       
  6166     scope: "core/edit-site"
       
  6167   }), (0,external_wp_element_namespaceObject.createElement)(MoreMenu, null))));
       
  6168 }
       
  6169 
       
  6170 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cog.js
       
  6171 
       
  6172 
       
  6173 /**
       
  6174  * WordPress dependencies
       
  6175  */
       
  6176 
       
  6177 const cog = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  6178   xmlns: "http://www.w3.org/2000/svg",
       
  6179   viewBox: "0 0 24 24"
       
  6180 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  6181   fillRule: "evenodd",
       
  6182   d: "M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",
       
  6183   clipRule: "evenodd"
       
  6184 }));
       
  6185 /* harmony default export */ var library_cog = (cog);
       
  6186 
       
  6187 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/default-sidebar.js
       
  6188 
       
  6189 
       
  6190 /**
       
  6191  * WordPress dependencies
       
  6192  */
       
  6193 
       
  6194 function default_sidebar_DefaultSidebar(_ref) {
       
  6195   let {
       
  6196     className,
       
  6197     identifier,
       
  6198     title,
       
  6199     icon,
       
  6200     children,
       
  6201     closeLabel,
       
  6202     header,
       
  6203     headerClassName,
       
  6204     panelClassName
       
  6205   } = _ref;
       
  6206   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(complementary_area, {
       
  6207     className: className,
       
  6208     scope: "core/edit-site",
       
  6209     identifier: identifier,
       
  6210     title: title,
       
  6211     icon: icon,
       
  6212     closeLabel: closeLabel,
       
  6213     header: header,
       
  6214     headerClassName: headerClassName,
       
  6215     panelClassName: panelClassName
       
  6216   }, children), (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaMoreMenuItem, {
       
  6217     scope: "core/edit-site",
       
  6218     identifier: identifier,
       
  6219     icon: icon
       
  6220   }, title));
       
  6221 }
       
  6222 
       
  6223 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/styles.js
       
  6224 
       
  6225 
       
  6226 /**
       
  6227  * WordPress dependencies
       
  6228  */
       
  6229 
       
  6230 const styles = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  6231   viewBox: "0 0 24 24",
       
  6232   xmlns: "http://www.w3.org/2000/svg"
       
  6233 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  6234   d: "M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"
       
  6235 }));
       
  6236 /* harmony default export */ var library_styles = (styles);
       
  6237 
       
  6238 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/icon-with-current-color.js
       
  6239 
       
  6240 
       
  6241 
       
  6242 /**
       
  6243  * External dependencies
       
  6244  */
       
  6245 
       
  6246 /**
       
  6247  * WordPress dependencies
       
  6248  */
       
  6249 
       
  6250 
       
  6251 function IconWithCurrentColor(_ref) {
       
  6252   let {
       
  6253     className,
       
  6254     ...props
       
  6255   } = _ref;
       
  6256   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, extends_extends({
       
  6257     className: classnames_default()(className, 'edit-site-global-styles-icon-with-current-color')
       
  6258   }, props));
       
  6259 }
       
  6260 
       
  6261 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/navigation-button.js
       
  6262 
       
  6263 
       
  6264 
       
  6265 /**
       
  6266  * WordPress dependencies
       
  6267  */
       
  6268 
       
  6269 /**
       
  6270  * Internal dependencies
       
  6271  */
       
  6272 
       
  6273 
       
  6274 
       
  6275 function GenericNavigationButton(_ref) {
       
  6276   let {
       
  6277     icon,
       
  6278     children,
       
  6279     ...props
       
  6280   } = _ref;
       
  6281   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItem, props, icon && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  6282     justify: "flex-start"
       
  6283   }, (0,external_wp_element_namespaceObject.createElement)(IconWithCurrentColor, {
       
  6284     icon: icon,
       
  6285     size: 24
       
  6286   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, children)), !icon && children);
       
  6287 }
       
  6288 
       
  6289 function NavigationButton(props) {
       
  6290   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorButton, extends_extends({
       
  6291     as: GenericNavigationButton
       
  6292   }, props));
       
  6293 }
       
  6294 
       
  6295 function NavigationBackButton(props) {
       
  6296   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorBackButton, extends_extends({
       
  6297     as: GenericNavigationButton
       
  6298   }, props));
       
  6299 }
       
  6300 
       
  6301 
       
  6302 
       
  6303 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/typography.js
       
  6304 
       
  6305 
       
  6306 /**
       
  6307  * WordPress dependencies
       
  6308  */
       
  6309 
       
  6310 const typography = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  6311   xmlns: "http://www.w3.org/2000/svg",
       
  6312   viewBox: "0 0 24 24"
       
  6313 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  6314   d: "M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"
       
  6315 }));
       
  6316 /* harmony default export */ var library_typography = (typography);
       
  6317 
       
  6318 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/color.js
       
  6319 
       
  6320 
       
  6321 /**
       
  6322  * WordPress dependencies
       
  6323  */
       
  6324 
       
  6325 const color = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  6326   viewBox: "0 0 24 24",
       
  6327   xmlns: "http://www.w3.org/2000/svg"
       
  6328 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  6329   d: "M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"
       
  6330 }));
       
  6331 /* harmony default export */ var library_color = (color);
       
  6332 
       
  6333 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
       
  6334 
       
  6335 
       
  6336 /**
       
  6337  * WordPress dependencies
       
  6338  */
       
  6339 
       
  6340 const layout = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  6341   xmlns: "http://www.w3.org/2000/svg",
       
  6342   viewBox: "0 0 24 24"
       
  6343 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  6344   d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
       
  6345 }));
       
  6346 /* harmony default export */ var library_layout = (layout);
       
  6347 
       
  6348 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/utils.js
       
  6349 /**
       
  6350  * External dependencies
       
  6351  */
       
  6352 
       
  6353 /* Supporting data. */
       
  6354 
       
  6355 const ROOT_BLOCK_NAME = 'root';
       
  6356 const ROOT_BLOCK_SELECTOR = 'body';
       
  6357 const ROOT_BLOCK_SUPPORTS = (/* unused pure expression or super */ null && (['background', 'backgroundColor', 'color', 'linkColor', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform', 'padding']));
       
  6358 const PRESET_METADATA = [{
       
  6359   path: ['color', 'palette'],
       
  6360   valueKey: 'color',
       
  6361   cssVarInfix: 'color',
       
  6362   classes: [{
       
  6363     classSuffix: 'color',
       
  6364     propertyName: 'color'
       
  6365   }, {
       
  6366     classSuffix: 'background-color',
       
  6367     propertyName: 'background-color'
       
  6368   }, {
       
  6369     classSuffix: 'border-color',
       
  6370     propertyName: 'border-color'
       
  6371   }]
       
  6372 }, {
       
  6373   path: ['color', 'gradients'],
       
  6374   valueKey: 'gradient',
       
  6375   cssVarInfix: 'gradient',
       
  6376   classes: [{
       
  6377     classSuffix: 'gradient-background',
       
  6378     propertyName: 'background'
       
  6379   }]
       
  6380 }, {
       
  6381   path: ['color', 'duotone'],
       
  6382   cssVarInfix: 'duotone',
       
  6383   valueFunc: _ref => {
       
  6384     let {
       
  6385       slug
       
  6386     } = _ref;
       
  6387     return `url( '#wp-duotone-${slug}' )`;
       
  6388   },
       
  6389   classes: []
       
  6390 }, {
       
  6391   path: ['typography', 'fontSizes'],
       
  6392   valueKey: 'size',
       
  6393   cssVarInfix: 'font-size',
       
  6394   classes: [{
       
  6395     classSuffix: 'font-size',
       
  6396     propertyName: 'font-size'
       
  6397   }]
       
  6398 }, {
       
  6399   path: ['typography', 'fontFamilies'],
       
  6400   valueKey: 'fontFamily',
       
  6401   cssVarInfix: 'font-family',
       
  6402   classes: [{
       
  6403     classSuffix: 'font-family',
       
  6404     propertyName: 'font-family'
       
  6405   }]
       
  6406 }];
       
  6407 const STYLE_PATH_TO_CSS_VAR_INFIX = {
       
  6408   'color.background': 'color',
       
  6409   'color.text': 'color',
       
  6410   'elements.link.color.text': 'color',
       
  6411   'color.gradient': 'gradient',
       
  6412   'typography.fontSize': 'font-size',
       
  6413   'typography.fontFamily': 'font-family'
       
  6414 };
       
  6415 
       
  6416 function findInPresetsBy(features, blockName, presetPath, presetProperty, presetValueValue) {
       
  6417   // Block presets take priority above root level presets.
       
  6418   const orderedPresetsByOrigin = [(0,external_lodash_namespaceObject.get)(features, ['blocks', blockName, ...presetPath]), (0,external_lodash_namespaceObject.get)(features, presetPath)];
       
  6419 
       
  6420   for (const presetByOrigin of orderedPresetsByOrigin) {
       
  6421     if (presetByOrigin) {
       
  6422       // Preset origins ordered by priority.
       
  6423       const origins = ['custom', 'theme', 'default'];
       
  6424 
       
  6425       for (const origin of origins) {
       
  6426         const presets = presetByOrigin[origin];
       
  6427 
       
  6428         if (presets) {
       
  6429           const presetObject = (0,external_lodash_namespaceObject.find)(presets, preset => preset[presetProperty] === presetValueValue);
       
  6430 
       
  6431           if (presetObject) {
       
  6432             if (presetProperty === 'slug') {
       
  6433               return presetObject;
       
  6434             } // If there is a highest priority preset with the same slug but different value the preset we found was overwritten and should be ignored.
       
  6435 
       
  6436 
       
  6437             const highestPresetObjectWithSameSlug = findInPresetsBy(features, blockName, presetPath, 'slug', presetObject.slug);
       
  6438 
       
  6439             if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
       
  6440               return presetObject;
       
  6441             }
       
  6442 
       
  6443             return undefined;
       
  6444           }
       
  6445         }
       
  6446       }
       
  6447     }
       
  6448   }
       
  6449 }
       
  6450 
       
  6451 function getPresetVariableFromValue(features, blockName, variableStylePath, presetPropertyValue) {
       
  6452   if (!presetPropertyValue) {
       
  6453     return presetPropertyValue;
       
  6454   }
       
  6455 
       
  6456   const cssVarInfix = STYLE_PATH_TO_CSS_VAR_INFIX[variableStylePath];
       
  6457   const metadata = (0,external_lodash_namespaceObject.find)(PRESET_METADATA, ['cssVarInfix', cssVarInfix]);
       
  6458 
       
  6459   if (!metadata) {
       
  6460     // The property doesn't have preset data
       
  6461     // so the value should be returned as it is.
       
  6462     return presetPropertyValue;
       
  6463   }
       
  6464 
       
  6465   const {
       
  6466     valueKey,
       
  6467     path
       
  6468   } = metadata;
       
  6469   const presetObject = findInPresetsBy(features, blockName, path, valueKey, presetPropertyValue);
       
  6470 
       
  6471   if (!presetObject) {
       
  6472     // Value wasn't found in the presets,
       
  6473     // so it must be a custom value.
       
  6474     return presetPropertyValue;
       
  6475   }
       
  6476 
       
  6477   return `var:preset|${cssVarInfix}|${presetObject.slug}`;
       
  6478 }
       
  6479 
       
  6480 function getValueFromPresetVariable(features, blockName, variable, _ref2) {
       
  6481   let [presetType, slug] = _ref2;
       
  6482   const metadata = (0,external_lodash_namespaceObject.find)(PRESET_METADATA, ['cssVarInfix', presetType]);
       
  6483 
       
  6484   if (!metadata) {
       
  6485     return variable;
       
  6486   }
       
  6487 
       
  6488   const presetObject = findInPresetsBy(features, blockName, metadata.path, 'slug', slug);
       
  6489 
       
  6490   if (presetObject) {
       
  6491     const {
       
  6492       valueKey
       
  6493     } = metadata;
       
  6494     const result = presetObject[valueKey];
       
  6495     return getValueFromVariable(features, blockName, result);
       
  6496   }
       
  6497 
       
  6498   return variable;
       
  6499 }
       
  6500 
       
  6501 function getValueFromCustomVariable(features, blockName, variable, path) {
       
  6502   var _get;
       
  6503 
       
  6504   const result = (_get = (0,external_lodash_namespaceObject.get)(features, ['blocks', blockName, 'custom', ...path])) !== null && _get !== void 0 ? _get : (0,external_lodash_namespaceObject.get)(features, ['custom', ...path]);
       
  6505 
       
  6506   if (!result) {
       
  6507     return variable;
       
  6508   } // A variable may reference another variable so we need recursion until we find the value.
       
  6509 
       
  6510 
       
  6511   return getValueFromVariable(features, blockName, result);
       
  6512 }
       
  6513 
       
  6514 function getValueFromVariable(features, blockName, variable) {
       
  6515   if (!variable || !(0,external_lodash_namespaceObject.isString)(variable)) {
       
  6516     return variable;
       
  6517   }
       
  6518 
       
  6519   const USER_VALUE_PREFIX = 'var:';
       
  6520   const THEME_VALUE_PREFIX = 'var(--wp--';
       
  6521   const THEME_VALUE_SUFFIX = ')';
       
  6522   let parsedVar;
       
  6523 
       
  6524   if (variable.startsWith(USER_VALUE_PREFIX)) {
       
  6525     parsedVar = variable.slice(USER_VALUE_PREFIX.length).split('|');
       
  6526   } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
       
  6527     parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split('--');
       
  6528   } else {
       
  6529     // We don't know how to parse the value: either is raw of uses complex CSS such as `calc(1px * var(--wp--variable) )`
       
  6530     return variable;
       
  6531   }
       
  6532 
       
  6533   const [type, ...path] = parsedVar;
       
  6534 
       
  6535   if (type === 'preset') {
       
  6536     return getValueFromPresetVariable(features, blockName, variable, path);
       
  6537   }
       
  6538 
       
  6539   if (type === 'custom') {
       
  6540     return getValueFromCustomVariable(features, blockName, variable, path);
       
  6541   }
       
  6542 
       
  6543   return variable;
       
  6544 }
       
  6545 
       
  6546 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/context.js
       
  6547 /**
       
  6548  * WordPress dependencies
       
  6549  */
       
  6550 
       
  6551 const DEFAULT_GLOBAL_STYLES_CONTEXT = {
       
  6552   user: {},
       
  6553   base: {},
       
  6554   merged: {},
       
  6555   setUserConfig: () => {}
       
  6556 };
       
  6557 const GlobalStylesContext = (0,external_wp_element_namespaceObject.createContext)(DEFAULT_GLOBAL_STYLES_CONTEXT);
       
  6558 
       
  6559 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/hooks.js
       
  6560 /**
       
  6561  * External dependencies
       
  6562  */
       
  6563 
       
  6564 /**
       
  6565  * WordPress dependencies
       
  6566  */
       
  6567 
       
  6568 
       
  6569 
       
  6570 
       
  6571 /**
       
  6572  * Internal dependencies
       
  6573  */
       
  6574 
       
  6575 
       
  6576 
       
  6577 const EMPTY_CONFIG = {
       
  6578   settings: {},
       
  6579   styles: {}
       
  6580 };
       
  6581 const useGlobalStylesReset = () => {
       
  6582   const {
       
  6583     user: config,
       
  6584     setUserConfig
       
  6585   } = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
       
  6586   const canReset = !!config && !(0,external_lodash_namespaceObject.isEqual)(config, EMPTY_CONFIG);
       
  6587   return [canReset, (0,external_wp_element_namespaceObject.useCallback)(() => setUserConfig(() => EMPTY_CONFIG), [setUserConfig])];
       
  6588 };
       
  6589 function useSetting(path, blockName) {
       
  6590   var _getSettingValueForCo;
       
  6591 
       
  6592   let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'all';
       
  6593   const {
       
  6594     merged: mergedConfig,
       
  6595     base: baseConfig,
       
  6596     user: userConfig,
       
  6597     setUserConfig
       
  6598   } = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
       
  6599   const fullPath = !blockName ? `settings.${path}` : `settings.blocks.${blockName}.${path}`;
       
  6600 
       
  6601   const setSetting = newValue => {
       
  6602     setUserConfig(currentConfig => {
       
  6603       const newUserConfig = (0,external_lodash_namespaceObject.cloneDeep)(currentConfig);
       
  6604       const pathToSet = external_wp_blocks_namespaceObject.__EXPERIMENTAL_PATHS_WITH_MERGE[path] ? fullPath + '.custom' : fullPath;
       
  6605       (0,external_lodash_namespaceObject.set)(newUserConfig, pathToSet, newValue);
       
  6606       return newUserConfig;
       
  6607     });
       
  6608   };
       
  6609 
       
  6610   const getSettingValueForContext = name => {
       
  6611     const currentPath = !name ? `settings.${path}` : `settings.blocks.${name}.${path}`;
       
  6612 
       
  6613     const getSettingValue = configToUse => {
       
  6614       const result = (0,external_lodash_namespaceObject.get)(configToUse, currentPath);
       
  6615 
       
  6616       if (external_wp_blocks_namespaceObject.__EXPERIMENTAL_PATHS_WITH_MERGE[path]) {
       
  6617         var _ref, _result$custom;
       
  6618 
       
  6619         return (_ref = (_result$custom = result === null || result === void 0 ? void 0 : result.custom) !== null && _result$custom !== void 0 ? _result$custom : result === null || result === void 0 ? void 0 : result.theme) !== null && _ref !== void 0 ? _ref : result === null || result === void 0 ? void 0 : result.default;
       
  6620       }
       
  6621 
       
  6622       return result;
       
  6623     };
       
  6624 
       
  6625     let result;
       
  6626 
       
  6627     switch (source) {
       
  6628       case 'all':
       
  6629         result = getSettingValue(mergedConfig);
       
  6630         break;
       
  6631 
       
  6632       case 'user':
       
  6633         result = getSettingValue(userConfig);
       
  6634         break;
       
  6635 
       
  6636       case 'base':
       
  6637         result = getSettingValue(baseConfig);
       
  6638         break;
       
  6639 
       
  6640       default:
       
  6641         throw 'Unsupported source';
       
  6642     }
       
  6643 
       
  6644     return result;
       
  6645   }; // Unlike styles settings get inherited from top level settings.
       
  6646 
       
  6647 
       
  6648   const resultWithFallback = (_getSettingValueForCo = getSettingValueForContext(blockName)) !== null && _getSettingValueForCo !== void 0 ? _getSettingValueForCo : getSettingValueForContext();
       
  6649   return [resultWithFallback, setSetting];
       
  6650 }
       
  6651 function useStyle(path, blockName) {
       
  6652   var _get;
       
  6653 
       
  6654   let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'all';
       
  6655   const {
       
  6656     merged: mergedConfig,
       
  6657     base: baseConfig,
       
  6658     user: userConfig,
       
  6659     setUserConfig
       
  6660   } = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
       
  6661   const finalPath = !blockName ? `styles.${path}` : `styles.blocks.${blockName}.${path}`;
       
  6662 
       
  6663   const setStyle = newValue => {
       
  6664     setUserConfig(currentConfig => {
       
  6665       const newUserConfig = (0,external_lodash_namespaceObject.cloneDeep)(currentConfig);
       
  6666       (0,external_lodash_namespaceObject.set)(newUserConfig, finalPath, getPresetVariableFromValue(mergedConfig.settings, blockName, path, newValue));
       
  6667       return newUserConfig;
       
  6668     });
       
  6669   };
       
  6670 
       
  6671   let result;
       
  6672 
       
  6673   switch (source) {
       
  6674     case 'all':
       
  6675       result = getValueFromVariable(mergedConfig.settings, blockName, (_get = (0,external_lodash_namespaceObject.get)(userConfig, finalPath)) !== null && _get !== void 0 ? _get : (0,external_lodash_namespaceObject.get)(baseConfig, finalPath));
       
  6676       break;
       
  6677 
       
  6678     case 'user':
       
  6679       result = getValueFromVariable(mergedConfig.settings, blockName, (0,external_lodash_namespaceObject.get)(userConfig, finalPath));
       
  6680       break;
       
  6681 
       
  6682     case 'base':
       
  6683       result = getValueFromVariable(baseConfig.settings, blockName, (0,external_lodash_namespaceObject.get)(baseConfig, finalPath));
       
  6684       break;
       
  6685 
       
  6686     default:
       
  6687       throw 'Unsupported source';
       
  6688   }
       
  6689 
       
  6690   return [result, setStyle];
       
  6691 }
       
  6692 const hooks_ROOT_BLOCK_SUPPORTS = ['background', 'backgroundColor', 'color', 'linkColor', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform', 'padding'];
       
  6693 function getSupportedGlobalStylesPanels(name) {
       
  6694   if (!name) {
       
  6695     return hooks_ROOT_BLOCK_SUPPORTS;
       
  6696   }
       
  6697 
       
  6698   const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
       
  6699 
       
  6700   if (!blockType) {
       
  6701     return [];
       
  6702   }
       
  6703 
       
  6704   const supportKeys = [];
       
  6705   Object.keys(external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY).forEach(styleName => {
       
  6706     if (!external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[styleName].support) {
       
  6707       return;
       
  6708     } // Opting out means that, for certain support keys like background color,
       
  6709     // blocks have to explicitly set the support value false. If the key is
       
  6710     // unset, we still enable it.
       
  6711 
       
  6712 
       
  6713     if (external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[styleName].requiresOptOut) {
       
  6714       if ((0,external_lodash_namespaceObject.has)(blockType.supports, external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[styleName].support[0]) && (0,external_lodash_namespaceObject.get)(blockType.supports, external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[styleName].support) !== false) {
       
  6715         return supportKeys.push(styleName);
       
  6716       }
       
  6717     }
       
  6718 
       
  6719     if ((0,external_lodash_namespaceObject.get)(blockType.supports, external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[styleName].support, false)) {
       
  6720       return supportKeys.push(styleName);
       
  6721     }
       
  6722   });
       
  6723   return supportKeys;
       
  6724 }
       
  6725 function useColorsPerOrigin(name) {
       
  6726   const [customColors] = useSetting('color.palette.custom', name);
       
  6727   const [themeColors] = useSetting('color.palette.theme', name);
       
  6728   const [defaultColors] = useSetting('color.palette.default', name);
       
  6729   const [shouldDisplayDefaultColors] = useSetting('color.defaultPalette');
       
  6730   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  6731     const result = [];
       
  6732 
       
  6733     if (themeColors && themeColors.length) {
       
  6734       result.push({
       
  6735         name: (0,external_wp_i18n_namespaceObject._x)('Theme', 'Indicates this palette comes from the theme.'),
       
  6736         colors: themeColors
       
  6737       });
       
  6738     }
       
  6739 
       
  6740     if (shouldDisplayDefaultColors && defaultColors && defaultColors.length) {
       
  6741       result.push({
       
  6742         name: (0,external_wp_i18n_namespaceObject._x)('Default', 'Indicates this palette comes from WordPress.'),
       
  6743         colors: defaultColors
       
  6744       });
       
  6745     }
       
  6746 
       
  6747     if (customColors && customColors.length) {
       
  6748       result.push({
       
  6749         name: (0,external_wp_i18n_namespaceObject._x)('Custom', 'Indicates this palette is created by the user.'),
       
  6750         colors: customColors
       
  6751       });
       
  6752     }
       
  6753 
       
  6754     return result;
       
  6755   }, [customColors, themeColors, defaultColors]);
       
  6756 }
       
  6757 function useGradientsPerOrigin(name) {
       
  6758   const [customGradients] = useSetting('color.gradients.custom', name);
       
  6759   const [themeGradients] = useSetting('color.gradients.theme', name);
       
  6760   const [defaultGradients] = useSetting('color.gradients.default', name);
       
  6761   const [shouldDisplayDefaultGradients] = useSetting('color.defaultGradients');
       
  6762   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  6763     const result = [];
       
  6764 
       
  6765     if (themeGradients && themeGradients.length) {
       
  6766       result.push({
       
  6767         name: (0,external_wp_i18n_namespaceObject._x)('Theme', 'Indicates this palette comes from the theme.'),
       
  6768         gradients: themeGradients
       
  6769       });
       
  6770     }
       
  6771 
       
  6772     if (shouldDisplayDefaultGradients && defaultGradients && defaultGradients.length) {
       
  6773       result.push({
       
  6774         name: (0,external_wp_i18n_namespaceObject._x)('Default', 'Indicates this palette comes from WordPress.'),
       
  6775         gradients: defaultGradients
       
  6776       });
       
  6777     }
       
  6778 
       
  6779     if (customGradients && customGradients.length) {
       
  6780       result.push({
       
  6781         name: (0,external_wp_i18n_namespaceObject._x)('Custom', 'Indicates this palette is created by the user.'),
       
  6782         gradients: customGradients
       
  6783       });
       
  6784     }
       
  6785 
       
  6786     return result;
       
  6787   }, [customGradients, themeGradients, defaultGradients]);
       
  6788 }
       
  6789 
       
  6790 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/border-panel.js
       
  6791 
       
  6792 
       
  6793 /**
       
  6794  * WordPress dependencies
       
  6795  */
       
  6796 
       
  6797 
       
  6798 
       
  6799 /**
       
  6800  * Internal dependencies
       
  6801  */
       
  6802 
       
  6803 
       
  6804 const MIN_BORDER_WIDTH = 0;
       
  6805 function useHasBorderPanel(name) {
       
  6806   const controls = [useHasBorderColorControl(name), useHasBorderRadiusControl(name), useHasBorderStyleControl(name), useHasBorderWidthControl(name)];
       
  6807   return controls.some(Boolean);
       
  6808 }
       
  6809 
       
  6810 function useHasBorderColorControl(name) {
       
  6811   const supports = getSupportedGlobalStylesPanels(name);
       
  6812   return useSetting('border.color', name)[0] && supports.includes('borderColor');
       
  6813 }
       
  6814 
       
  6815 function useHasBorderRadiusControl(name) {
       
  6816   const supports = getSupportedGlobalStylesPanels(name);
       
  6817   return useSetting('border.radius', name)[0] && supports.includes('borderRadius');
       
  6818 }
       
  6819 
       
  6820 function useHasBorderStyleControl(name) {
       
  6821   const supports = getSupportedGlobalStylesPanels(name);
       
  6822   return useSetting('border.style', name)[0] && supports.includes('borderStyle');
       
  6823 }
       
  6824 
       
  6825 function useHasBorderWidthControl(name) {
       
  6826   const supports = getSupportedGlobalStylesPanels(name);
       
  6827   return useSetting('border.width', name)[0] && supports.includes('borderWidth');
       
  6828 }
       
  6829 
       
  6830 function BorderPanel(_ref) {
       
  6831   let {
       
  6832     name
       
  6833   } = _ref;
       
  6834   // To better reflect if the user has customized a value we need to
       
  6835   // ensure the style value being checked is from the `user` origin.
       
  6836   const [userBorderStyles] = useStyle('border', name, 'user');
       
  6837 
       
  6838   const createHasValueCallback = feature => () => !!(userBorderStyles !== null && userBorderStyles !== void 0 && userBorderStyles[feature]);
       
  6839 
       
  6840   const createResetCallback = setStyle => () => setStyle(undefined);
       
  6841 
       
  6842   const handleOnChange = setStyle => value => {
       
  6843     setStyle(value || undefined);
       
  6844   };
       
  6845 
       
  6846   const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
       
  6847     availableUnits: useSetting('spacing.units')[0] || ['px', 'em', 'rem']
       
  6848   }); // Border width.
       
  6849 
       
  6850   const showBorderWidth = useHasBorderWidthControl(name);
       
  6851   const [borderWidthValue, setBorderWidth] = useStyle('border.width', name); // Border style.
       
  6852 
       
  6853   const showBorderStyle = useHasBorderStyleControl(name);
       
  6854   const [borderStyle, setBorderStyle] = useStyle('border.style', name); // When we set a border color or width ensure we have a style so the user
       
  6855   // can see a visible border.
       
  6856 
       
  6857   const handleOnChangeWithStyle = setStyle => value => {
       
  6858     if (!!value && !borderStyle) {
       
  6859       setBorderStyle('solid');
       
  6860     }
       
  6861 
       
  6862     setStyle(value || undefined);
       
  6863   }; // Border color.
       
  6864 
       
  6865 
       
  6866   const showBorderColor = useHasBorderColorControl(name);
       
  6867   const [borderColor, setBorderColor] = useStyle('border.color', name);
       
  6868   const disableCustomColors = !useSetting('color.custom')[0];
       
  6869   const disableCustomGradients = !useSetting('color.customGradient')[0];
       
  6870   const borderColorSettings = [{
       
  6871     label: (0,external_wp_i18n_namespaceObject.__)('Color'),
       
  6872     colors: useColorsPerOrigin(name),
       
  6873     colorValue: borderColor,
       
  6874     onColorChange: handleOnChangeWithStyle(setBorderColor),
       
  6875     clearable: false
       
  6876   }]; // Border radius.
       
  6877 
       
  6878   const showBorderRadius = useHasBorderRadiusControl(name);
       
  6879   const [borderRadiusValues, setBorderRadius] = useStyle('border.radius', name);
       
  6880 
       
  6881   const hasBorderRadius = () => {
       
  6882     const borderValues = userBorderStyles === null || userBorderStyles === void 0 ? void 0 : userBorderStyles.radius;
       
  6883 
       
  6884     if (typeof borderValues === 'object') {
       
  6885       return Object.entries(borderValues).some(Boolean);
       
  6886     }
       
  6887 
       
  6888     return !!borderValues;
       
  6889   };
       
  6890 
       
  6891   const resetAll = () => {
       
  6892     setBorderColor(undefined);
       
  6893     setBorderRadius(undefined);
       
  6894     setBorderStyle(undefined);
       
  6895     setBorderWidth(undefined);
       
  6896   };
       
  6897 
       
  6898   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
       
  6899     label: (0,external_wp_i18n_namespaceObject.__)('Border'),
       
  6900     resetAll: resetAll
       
  6901   }, showBorderWidth && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
       
  6902     className: "single-column",
       
  6903     hasValue: createHasValueCallback('width'),
       
  6904     label: (0,external_wp_i18n_namespaceObject.__)('Width'),
       
  6905     onDeselect: createResetCallback(setBorderWidth),
       
  6906     isShownByDefault: true
       
  6907   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, {
       
  6908     value: borderWidthValue,
       
  6909     label: (0,external_wp_i18n_namespaceObject.__)('Width'),
       
  6910     min: MIN_BORDER_WIDTH,
       
  6911     onChange: handleOnChangeWithStyle(setBorderWidth),
       
  6912     units: units
       
  6913   })), showBorderStyle && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
       
  6914     className: "single-column",
       
  6915     hasValue: createHasValueCallback('style'),
       
  6916     label: (0,external_wp_i18n_namespaceObject.__)('Style'),
       
  6917     onDeselect: createResetCallback(setBorderStyle),
       
  6918     isShownByDefault: true
       
  6919   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBorderStyleControl, {
       
  6920     value: borderStyle,
       
  6921     onChange: handleOnChange(setBorderStyle)
       
  6922   })), showBorderColor && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
       
  6923     hasValue: createHasValueCallback('color'),
       
  6924     label: (0,external_wp_i18n_namespaceObject.__)('Color'),
       
  6925     onDeselect: createResetCallback(setBorderColor),
       
  6926     isShownByDefault: true
       
  6927   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
       
  6928     __experimentalHasMultipleOrigins: true,
       
  6929     __experimentalIsRenderedInSidebar: true,
       
  6930     disableCustomColors: disableCustomColors,
       
  6931     disableCustomGradients: disableCustomGradients,
       
  6932     enableAlpha: true,
       
  6933     settings: borderColorSettings
       
  6934   })), showBorderRadius && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
       
  6935     hasValue: hasBorderRadius,
       
  6936     label: (0,external_wp_i18n_namespaceObject.__)('Radius'),
       
  6937     onDeselect: createResetCallback(setBorderRadius),
       
  6938     isShownByDefault: true
       
  6939   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBorderRadiusControl, {
       
  6940     values: borderRadiusValues,
       
  6941     onChange: handleOnChange(setBorderRadius)
       
  6942   })));
       
  6943 }
       
  6944 
       
  6945 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/color-utils.js
       
  6946 /**
       
  6947  * Internal dependencies
       
  6948  */
       
  6949 
       
  6950 function useHasColorPanel(name) {
       
  6951   const supports = getSupportedGlobalStylesPanels(name);
       
  6952   return supports.includes('color') || supports.includes('backgroundColor') || supports.includes('background') || supports.includes('linkColor');
       
  6953 }
       
  6954 
       
  6955 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/dimensions-panel.js
       
  6956 
       
  6957 
       
  6958 /**
       
  6959  * WordPress dependencies
       
  6960  */
       
  6961 
       
  6962 
       
  6963 
       
  6964 /**
       
  6965  * Internal dependencies
       
  6966  */
       
  6967 
       
  6968 
       
  6969 const AXIAL_SIDES = ['horizontal', 'vertical'];
       
  6970 function useHasDimensionsPanel(name) {
       
  6971   const hasPadding = useHasPadding(name);
       
  6972   const hasMargin = useHasMargin(name);
       
  6973   const hasGap = useHasGap(name);
       
  6974   return hasPadding || hasMargin || hasGap;
       
  6975 }
       
  6976 
       
  6977 function useHasPadding(name) {
       
  6978   const supports = getSupportedGlobalStylesPanels(name);
       
  6979   const [settings] = useSetting('spacing.padding', name);
       
  6980   return settings && supports.includes('padding');
       
  6981 }
       
  6982 
       
  6983 function useHasMargin(name) {
       
  6984   const supports = getSupportedGlobalStylesPanels(name);
       
  6985   const [settings] = useSetting('spacing.margin', name);
       
  6986   return settings && supports.includes('margin');
       
  6987 }
       
  6988 
       
  6989 function useHasGap(name) {
       
  6990   const supports = getSupportedGlobalStylesPanels(name);
       
  6991   const [settings] = useSetting('spacing.blockGap', name); // Do not show the gap control panel for block-level global styles
       
  6992   // as they do not work on the frontend.
       
  6993   // See: https://github.com/WordPress/gutenberg/pull/39845.
       
  6994   // We can revert this condition when they're working again.
       
  6995 
       
  6996   return !!name ? false : settings && supports.includes('--wp--style--block-gap');
       
  6997 }
       
  6998 
       
  6999 function filterValuesBySides(values, sides) {
       
  7000   if (!sides) {
       
  7001     // If no custom side configuration all sides are opted into by default.
       
  7002     return values;
       
  7003   } // Only include sides opted into within filtered values.
       
  7004 
       
  7005 
       
  7006   const filteredValues = {};
       
  7007   sides.forEach(side => {
       
  7008     if (side === 'vertical') {
       
  7009       filteredValues.top = values.top;
       
  7010       filteredValues.bottom = values.bottom;
       
  7011     }
       
  7012 
       
  7013     if (side === 'horizontal') {
       
  7014       filteredValues.left = values.left;
       
  7015       filteredValues.right = values.right;
       
  7016     }
       
  7017 
       
  7018     filteredValues[side] = values[side];
       
  7019   });
       
  7020   return filteredValues;
       
  7021 }
       
  7022 
       
  7023 function splitStyleValue(value) {
       
  7024   // Check for shorthand value ( a string value ).
       
  7025   if (value && typeof value === 'string') {
       
  7026     // Convert to value for individual sides for BoxControl.
       
  7027     return {
       
  7028       top: value,
       
  7029       right: value,
       
  7030       bottom: value,
       
  7031       left: value
       
  7032     };
  9406     };
  7033   }
  9407   }
  7034 
  9408   return {
  7035   return value;
  9409     isReady: false
  7036 }
       
  7037 
       
  7038 function DimensionsPanel(_ref) {
       
  7039   let {
       
  7040     name
       
  7041   } = _ref;
       
  7042   const showPaddingControl = useHasPadding(name);
       
  7043   const showMarginControl = useHasMargin(name);
       
  7044   const showGapControl = useHasGap(name);
       
  7045   const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
       
  7046     availableUnits: useSetting('spacing.units', name)[0] || ['%', 'px', 'em', 'rem', 'vw']
       
  7047   });
       
  7048   const [rawPadding, setRawPadding] = useStyle('spacing.padding', name);
       
  7049   const paddingValues = splitStyleValue(rawPadding);
       
  7050   const paddingSides = (0,external_wp_blockEditor_namespaceObject.__experimentalUseCustomSides)(name, 'padding');
       
  7051   const isAxialPadding = paddingSides && paddingSides.some(side => AXIAL_SIDES.includes(side));
       
  7052 
       
  7053   const setPaddingValues = newPaddingValues => {
       
  7054     const padding = filterValuesBySides(newPaddingValues, paddingSides);
       
  7055     setRawPadding(padding);
       
  7056   };
  9410   };
  7057 
  9411 }
  7058   const resetPaddingValue = () => setPaddingValues({});
  9412 function useInitEditedEntityFromURL() {
  7059 
       
  7060   const hasPaddingValue = () => !!paddingValues && Object.keys(paddingValues).length;
       
  7061 
       
  7062   const [rawMargin, setRawMargin] = useStyle('spacing.margin', name);
       
  7063   const marginValues = splitStyleValue(rawMargin);
       
  7064   const marginSides = (0,external_wp_blockEditor_namespaceObject.__experimentalUseCustomSides)(name, 'margin');
       
  7065   const isAxialMargin = marginSides && marginSides.some(side => AXIAL_SIDES.includes(side));
       
  7066 
       
  7067   const setMarginValues = newMarginValues => {
       
  7068     const margin = filterValuesBySides(newMarginValues, marginSides);
       
  7069     setRawMargin(margin);
       
  7070   };
       
  7071 
       
  7072   const resetMarginValue = () => setMarginValues({});
       
  7073 
       
  7074   const hasMarginValue = () => !!marginValues && Object.keys(marginValues).length;
       
  7075 
       
  7076   const [gapValue, setGapValue] = useStyle('spacing.blockGap', name);
       
  7077 
       
  7078   const resetGapValue = () => setGapValue(undefined);
       
  7079 
       
  7080   const hasGapValue = () => !!gapValue;
       
  7081 
       
  7082   const resetAll = () => {
       
  7083     resetPaddingValue();
       
  7084     resetMarginValue();
       
  7085     resetGapValue();
       
  7086   };
       
  7087 
       
  7088   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
       
  7089     label: (0,external_wp_i18n_namespaceObject.__)('Dimensions'),
       
  7090     resetAll: resetAll
       
  7091   }, showPaddingControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
       
  7092     hasValue: hasPaddingValue,
       
  7093     label: (0,external_wp_i18n_namespaceObject.__)('Padding'),
       
  7094     onDeselect: resetPaddingValue,
       
  7095     isShownByDefault: true
       
  7096   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalBoxControl, {
       
  7097     values: paddingValues,
       
  7098     onChange: setPaddingValues,
       
  7099     label: (0,external_wp_i18n_namespaceObject.__)('Padding'),
       
  7100     sides: paddingSides,
       
  7101     units: units,
       
  7102     allowReset: false,
       
  7103     splitOnAxis: isAxialPadding
       
  7104   })), showMarginControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
       
  7105     hasValue: hasMarginValue,
       
  7106     label: (0,external_wp_i18n_namespaceObject.__)('Margin'),
       
  7107     onDeselect: resetMarginValue,
       
  7108     isShownByDefault: true
       
  7109   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalBoxControl, {
       
  7110     values: marginValues,
       
  7111     onChange: setMarginValues,
       
  7112     label: (0,external_wp_i18n_namespaceObject.__)('Margin'),
       
  7113     sides: marginSides,
       
  7114     units: units,
       
  7115     allowReset: false,
       
  7116     splitOnAxis: isAxialMargin
       
  7117   })), showGapControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
       
  7118     hasValue: hasGapValue,
       
  7119     label: (0,external_wp_i18n_namespaceObject.__)('Block spacing'),
       
  7120     onDeselect: resetGapValue,
       
  7121     isShownByDefault: true
       
  7122   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, {
       
  7123     label: (0,external_wp_i18n_namespaceObject.__)('Block spacing'),
       
  7124     __unstableInputWidth: "80px",
       
  7125     min: 0,
       
  7126     onChange: setGapValue,
       
  7127     units: units,
       
  7128     value: gapValue
       
  7129   })));
       
  7130 }
       
  7131 
       
  7132 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typography-panel.js
       
  7133 
       
  7134 
       
  7135 /**
       
  7136  * WordPress dependencies
       
  7137  */
       
  7138 
       
  7139 
       
  7140 /**
       
  7141  * Internal dependencies
       
  7142  */
       
  7143 
       
  7144 
       
  7145 function useHasTypographyPanel(name) {
       
  7146   const hasLineHeight = useHasLineHeightControl(name);
       
  7147   const hasFontAppearance = useHasAppearanceControl(name);
       
  7148   const hasLetterSpacing = useHasLetterSpacingControl(name);
       
  7149   const supports = getSupportedGlobalStylesPanels(name);
       
  7150   return hasLineHeight || hasFontAppearance || hasLetterSpacing || supports.includes('fontSize');
       
  7151 }
       
  7152 
       
  7153 function useHasLineHeightControl(name) {
       
  7154   const supports = getSupportedGlobalStylesPanels(name);
       
  7155   return useSetting('typography.lineHeight', name)[0] && supports.includes('lineHeight');
       
  7156 }
       
  7157 
       
  7158 function useHasAppearanceControl(name) {
       
  7159   const supports = getSupportedGlobalStylesPanels(name);
       
  7160   const hasFontStyles = useSetting('typography.fontStyle', name)[0] && supports.includes('fontStyle');
       
  7161   const hasFontWeights = useSetting('typography.fontWeight', name)[0] && supports.includes('fontWeight');
       
  7162   return hasFontStyles || hasFontWeights;
       
  7163 }
       
  7164 
       
  7165 function useHasLetterSpacingControl(name) {
       
  7166   const supports = getSupportedGlobalStylesPanels(name);
       
  7167   return useSetting('typography.letterSpacing', name)[0] && supports.includes('letterSpacing');
       
  7168 }
       
  7169 
       
  7170 function TypographyPanel(_ref) {
       
  7171   let {
       
  7172     name,
       
  7173     element
       
  7174   } = _ref;
       
  7175   const supports = getSupportedGlobalStylesPanels(name);
       
  7176   const prefix = element === 'text' || !element ? '' : `elements.${element}.`;
       
  7177   const [fontSizes] = useSetting('typography.fontSizes', name);
       
  7178   const disableCustomFontSizes = !useSetting('typography.customFontSize', name)[0];
       
  7179   const [fontFamilies] = useSetting('typography.fontFamilies', name);
       
  7180   const hasFontStyles = useSetting('typography.fontStyle', name)[0] && supports.includes('fontStyle');
       
  7181   const hasFontWeights = useSetting('typography.fontWeight', name)[0] && supports.includes('fontWeight');
       
  7182   const hasLineHeightEnabled = useHasLineHeightControl(name);
       
  7183   const hasAppearanceControl = useHasAppearanceControl(name);
       
  7184   const hasLetterSpacingControl = useHasLetterSpacingControl(name);
       
  7185   const [fontFamily, setFontFamily] = useStyle(prefix + 'typography.fontFamily', name);
       
  7186   const [fontSize, setFontSize] = useStyle(prefix + 'typography.fontSize', name);
       
  7187   const [fontStyle, setFontStyle] = useStyle(prefix + 'typography.fontStyle', name);
       
  7188   const [fontWeight, setFontWeight] = useStyle(prefix + 'typography.fontWeight', name);
       
  7189   const [lineHeight, setLineHeight] = useStyle(prefix + 'typography.lineHeight', name);
       
  7190   const [letterSpacing, setLetterSpacing] = useStyle(prefix + 'typography.letterSpacing', name);
       
  7191   const [backgroundColor] = useStyle(prefix + 'color.background', name);
       
  7192   const [gradientValue] = useStyle(prefix + 'color.gradient', name);
       
  7193   const [color] = useStyle(prefix + 'color.text', name);
       
  7194   const extraStyles = element === 'link' ? {
       
  7195     textDecoration: 'underline'
       
  7196   } : {};
       
  7197   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
       
  7198     className: "edit-site-typography-panel",
       
  7199     initialOpen: true
       
  7200   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  7201     className: "edit-site-typography-panel__preview",
       
  7202     style: {
       
  7203       fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
       
  7204       background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor,
       
  7205       color,
       
  7206       fontSize,
       
  7207       fontStyle,
       
  7208       fontWeight,
       
  7209       letterSpacing,
       
  7210       ...extraStyles
       
  7211     }
       
  7212   }, "Aa"), supports.includes('fontFamily') && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalFontFamilyControl, {
       
  7213     fontFamilies: fontFamilies,
       
  7214     value: fontFamily,
       
  7215     onChange: setFontFamily
       
  7216   }), supports.includes('fontSize') && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FontSizePicker, {
       
  7217     value: fontSize,
       
  7218     onChange: setFontSize,
       
  7219     fontSizes: fontSizes,
       
  7220     disableCustomFontSizes: disableCustomFontSizes
       
  7221   }), hasLineHeightEnabled && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
  7222     marginBottom: 6
       
  7223   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.LineHeightControl, {
       
  7224     __nextHasNoMarginBottom: true,
       
  7225     value: lineHeight,
       
  7226     onChange: setLineHeight
       
  7227   })), hasAppearanceControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalFontAppearanceControl, {
       
  7228     value: {
       
  7229       fontStyle,
       
  7230       fontWeight
       
  7231     },
       
  7232     onChange: _ref2 => {
       
  7233       let {
       
  7234         fontStyle: newFontStyle,
       
  7235         fontWeight: newFontWeight
       
  7236       } = _ref2;
       
  7237       setFontStyle(newFontStyle);
       
  7238       setFontWeight(newFontWeight);
       
  7239     },
       
  7240     hasFontStyles: hasFontStyles,
       
  7241     hasFontWeights: hasFontWeights
       
  7242   }), hasLetterSpacingControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLetterSpacingControl, {
       
  7243     value: letterSpacing,
       
  7244     onChange: setLetterSpacing
       
  7245   }));
       
  7246 }
       
  7247 
       
  7248 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/context-menu.js
       
  7249 
       
  7250 
       
  7251 /**
       
  7252  * WordPress dependencies
       
  7253  */
       
  7254 
       
  7255 
       
  7256 
       
  7257 /**
       
  7258  * Internal dependencies
       
  7259  */
       
  7260 
       
  7261 
       
  7262 
       
  7263 
       
  7264 
       
  7265 
       
  7266 
       
  7267 function ContextMenu(_ref) {
       
  7268   let {
       
  7269     name,
       
  7270     parentMenu = ''
       
  7271   } = _ref;
       
  7272   const hasTypographyPanel = useHasTypographyPanel(name);
       
  7273   const hasColorPanel = useHasColorPanel(name);
       
  7274   const hasBorderPanel = useHasBorderPanel(name);
       
  7275   const hasDimensionsPanel = useHasDimensionsPanel(name);
       
  7276   const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
       
  7277   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, null, hasTypographyPanel && (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  7278     icon: library_typography,
       
  7279     path: parentMenu + '/typography'
       
  7280   }, (0,external_wp_i18n_namespaceObject.__)('Typography')), hasColorPanel && (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  7281     icon: library_color,
       
  7282     path: parentMenu + '/colors'
       
  7283   }, (0,external_wp_i18n_namespaceObject.__)('Colors')), hasLayoutPanel && (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  7284     icon: library_layout,
       
  7285     path: parentMenu + '/layout'
       
  7286   }, (0,external_wp_i18n_namespaceObject.__)('Layout')));
       
  7287 }
       
  7288 
       
  7289 /* harmony default export */ var context_menu = (ContextMenu);
       
  7290 
       
  7291 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/utils.js
       
  7292 /**
       
  7293  * External dependencies
       
  7294  */
       
  7295 
       
  7296 /**
       
  7297  * Internal dependencies
       
  7298  */
       
  7299 
       
  7300 function generateBoxRules(style, options, path, ruleKey) {
       
  7301   const boxStyle = (0,external_lodash_namespaceObject.get)(style, path);
       
  7302 
       
  7303   if (!boxStyle) {
       
  7304     return [];
       
  7305   }
       
  7306 
       
  7307   const rules = [];
       
  7308 
       
  7309   if (typeof boxStyle === 'string') {
       
  7310     rules.push({
       
  7311       selector: options.selector,
       
  7312       key: ruleKey,
       
  7313       value: boxStyle
       
  7314     });
       
  7315   } else {
       
  7316     const sideRules = ['top', 'right', 'bottom', 'left'].reduce((acc, side) => {
       
  7317       const value = (0,external_lodash_namespaceObject.get)(boxStyle, [side]);
       
  7318 
       
  7319       if (value) {
       
  7320         acc.push({
       
  7321           selector: options.selector,
       
  7322           key: `${ruleKey}${(0,external_lodash_namespaceObject.upperFirst)(side)}`,
       
  7323           value
       
  7324         });
       
  7325       }
       
  7326 
       
  7327       return acc;
       
  7328     }, []);
       
  7329     rules.push(...sideRules);
       
  7330   }
       
  7331 
       
  7332   return rules;
       
  7333 }
       
  7334 
       
  7335 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/padding.js
       
  7336 /**
       
  7337  * Internal dependencies
       
  7338  */
       
  7339 
       
  7340 const padding = {
       
  7341   name: 'padding',
       
  7342   generate: (style, options) => {
       
  7343     return generateBoxRules(style, options, ['spacing', 'padding'], 'padding');
       
  7344   }
       
  7345 };
       
  7346 /* harmony default export */ var styles_padding = (padding);
       
  7347 
       
  7348 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/margin.js
       
  7349 /**
       
  7350  * Internal dependencies
       
  7351  */
       
  7352 
       
  7353 const margin = {
       
  7354   name: 'margin',
       
  7355   generate: (style, options) => {
       
  7356     return generateBoxRules(style, options, ['spacing', 'margin'], 'margin');
       
  7357   }
       
  7358 };
       
  7359 /* harmony default export */ var styles_margin = (margin);
       
  7360 
       
  7361 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/index.js
       
  7362 /**
       
  7363  * Internal dependencies
       
  7364  */
       
  7365 
       
  7366 
       
  7367 const styleDefinitions = [styles_margin, styles_padding];
       
  7368 
       
  7369 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/index.js
       
  7370 /**
       
  7371  * External dependencies
       
  7372  */
       
  7373 
       
  7374 /**
       
  7375  * Internal dependencies
       
  7376  */
       
  7377 
       
  7378 
       
  7379 /**
       
  7380  * Generates a stylesheet for a given style object and selector.
       
  7381  *
       
  7382  * @param  style   Style object.
       
  7383  * @param  options Options object with settings to adjust how the styles are generated.
       
  7384  *
       
  7385  * @return generated stylesheet.
       
  7386  */
       
  7387 
       
  7388 function generate(style, options) {
       
  7389   const rules = getCSSRules(style, options);
       
  7390   const groupedRules = groupBy(rules, 'selector');
       
  7391   const selectorRules = Object.keys(groupedRules).reduce((acc, subSelector) => {
       
  7392     acc.push(`${subSelector} { ${groupedRules[subSelector].map(rule => `${kebabCase(rule.key)}: ${rule.value};`).join(' ')} }`);
       
  7393     return acc;
       
  7394   }, []);
       
  7395   return selectorRules.join('\n');
       
  7396 }
       
  7397 /**
       
  7398  * Returns a JSON representation of the generated CSS rules.
       
  7399  *
       
  7400  * @param  style   Style object.
       
  7401  * @param  options Options object with settings to adjust how the styles are generated.
       
  7402  *
       
  7403  * @return generated styles.
       
  7404  */
       
  7405 
       
  7406 function getCSSRules(style, options) {
       
  7407   const rules = [];
       
  7408   styleDefinitions.forEach(definition => {
       
  7409     rules.push(...definition.generate(style, options));
       
  7410   });
       
  7411   return rules;
       
  7412 }
       
  7413 
       
  7414 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/use-global-styles-output.js
       
  7415 
       
  7416 
       
  7417 /**
       
  7418  * External dependencies
       
  7419  */
       
  7420 
       
  7421 /**
       
  7422  * WordPress dependencies
       
  7423  */
       
  7424 
       
  7425 
       
  7426 
       
  7427 
       
  7428 
       
  7429 /**
       
  7430  * Internal dependencies
       
  7431  */
       
  7432 
       
  7433 /**
       
  7434  * Internal dependencies
       
  7435  */
       
  7436 
       
  7437 
       
  7438 
       
  7439 
       
  7440 function compileStyleValue(uncompiledValue) {
       
  7441   const VARIABLE_REFERENCE_PREFIX = 'var:';
       
  7442   const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';
       
  7443   const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';
       
  7444 
       
  7445   if ((0,external_lodash_namespaceObject.startsWith)(uncompiledValue, VARIABLE_REFERENCE_PREFIX)) {
       
  7446     const variable = uncompiledValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
       
  7447     return `var(--wp--${variable})`;
       
  7448   }
       
  7449 
       
  7450   return uncompiledValue;
       
  7451 }
       
  7452 /**
       
  7453  * Transform given preset tree into a set of style declarations.
       
  7454  *
       
  7455  * @param {Object} blockPresets
       
  7456  *
       
  7457  * @return {Array} An array of style declarations.
       
  7458  */
       
  7459 
       
  7460 
       
  7461 function getPresetsDeclarations() {
       
  7462   let blockPresets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  7463   return (0,external_lodash_namespaceObject.reduce)(PRESET_METADATA, (declarations, _ref) => {
       
  7464     let {
       
  7465       path,
       
  7466       valueKey,
       
  7467       valueFunc,
       
  7468       cssVarInfix
       
  7469     } = _ref;
       
  7470     const presetByOrigin = (0,external_lodash_namespaceObject.get)(blockPresets, path, []);
       
  7471     ['default', 'theme', 'custom'].forEach(origin => {
       
  7472       if (presetByOrigin[origin]) {
       
  7473         presetByOrigin[origin].forEach(value => {
       
  7474           if (valueKey) {
       
  7475             declarations.push(`--wp--preset--${cssVarInfix}--${(0,external_lodash_namespaceObject.kebabCase)(value.slug)}: ${value[valueKey]}`);
       
  7476           } else if (valueFunc && typeof valueFunc === 'function') {
       
  7477             declarations.push(`--wp--preset--${cssVarInfix}--${(0,external_lodash_namespaceObject.kebabCase)(value.slug)}: ${valueFunc(value)}`);
       
  7478           }
       
  7479         });
       
  7480       }
       
  7481     });
       
  7482     return declarations;
       
  7483   }, []);
       
  7484 }
       
  7485 /**
       
  7486  * Transform given preset tree into a set of preset class declarations.
       
  7487  *
       
  7488  * @param {string} blockSelector
       
  7489  * @param {Object} blockPresets
       
  7490  * @return {string} CSS declarations for the preset classes.
       
  7491  */
       
  7492 
       
  7493 
       
  7494 function getPresetsClasses(blockSelector) {
       
  7495   let blockPresets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
  7496   return (0,external_lodash_namespaceObject.reduce)(PRESET_METADATA, (declarations, _ref2) => {
       
  7497     let {
       
  7498       path,
       
  7499       cssVarInfix,
       
  7500       classes
       
  7501     } = _ref2;
       
  7502 
       
  7503     if (!classes) {
       
  7504       return declarations;
       
  7505     }
       
  7506 
       
  7507     const presetByOrigin = (0,external_lodash_namespaceObject.get)(blockPresets, path, []);
       
  7508     ['default', 'theme', 'custom'].forEach(origin => {
       
  7509       if (presetByOrigin[origin]) {
       
  7510         presetByOrigin[origin].forEach(_ref3 => {
       
  7511           let {
       
  7512             slug
       
  7513           } = _ref3;
       
  7514           classes.forEach(_ref4 => {
       
  7515             let {
       
  7516               classSuffix,
       
  7517               propertyName
       
  7518             } = _ref4;
       
  7519             const classSelectorToUse = `.has-${(0,external_lodash_namespaceObject.kebabCase)(slug)}-${classSuffix}`;
       
  7520             const selectorToUse = blockSelector.split(',') // Selector can be "h1, h2, h3"
       
  7521             .map(selector => `${selector}${classSelectorToUse}`).join(',');
       
  7522             const value = `var(--wp--preset--${cssVarInfix}--${(0,external_lodash_namespaceObject.kebabCase)(slug)})`;
       
  7523             declarations += `${selectorToUse}{${propertyName}: ${value} !important;}`;
       
  7524           });
       
  7525         });
       
  7526       }
       
  7527     });
       
  7528     return declarations;
       
  7529   }, '');
       
  7530 }
       
  7531 
       
  7532 function getPresetsSvgFilters() {
       
  7533   let blockPresets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  7534   return PRESET_METADATA.filter( // Duotone are the only type of filters for now.
       
  7535   metadata => metadata.path.at(-1) === 'duotone').flatMap(metadata => {
       
  7536     const presetByOrigin = (0,external_lodash_namespaceObject.get)(blockPresets, metadata.path, {});
       
  7537     return ['default', 'theme'].filter(origin => presetByOrigin[origin]).flatMap(origin => presetByOrigin[origin].map(preset => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstablePresetDuotoneFilter, {
       
  7538       preset: preset,
       
  7539       key: preset.slug
       
  7540     })));
       
  7541   });
       
  7542 }
       
  7543 
       
  7544 function flattenTree() {
       
  7545   let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  7546   let prefix = arguments.length > 1 ? arguments[1] : undefined;
       
  7547   let token = arguments.length > 2 ? arguments[2] : undefined;
       
  7548   let result = [];
       
  7549   Object.keys(input).forEach(key => {
       
  7550     const newKey = prefix + (0,external_lodash_namespaceObject.kebabCase)(key.replace('/', '-'));
       
  7551     const newLeaf = input[key];
       
  7552 
       
  7553     if (newLeaf instanceof Object) {
       
  7554       const newPrefix = newKey + token;
       
  7555       result = [...result, ...flattenTree(newLeaf, newPrefix, token)];
       
  7556     } else {
       
  7557       result.push(`${newKey}: ${newLeaf}`);
       
  7558     }
       
  7559   });
       
  7560   return result;
       
  7561 }
       
  7562 /**
       
  7563  * Transform given style tree into a set of style declarations.
       
  7564  *
       
  7565  * @param {Object} blockStyles Block styles.
       
  7566  *
       
  7567  * @return {Array} An array of style declarations.
       
  7568  */
       
  7569 
       
  7570 
       
  7571 function getStylesDeclarations() {
       
  7572   let blockStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  7573   const output = (0,external_lodash_namespaceObject.reduce)(external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY, (declarations, _ref5, key) => {
       
  7574     let {
       
  7575       value,
       
  7576       properties,
       
  7577       useEngine
       
  7578     } = _ref5;
       
  7579     const pathToValue = value;
       
  7580 
       
  7581     if ((0,external_lodash_namespaceObject.first)(pathToValue) === 'elements' || useEngine) {
       
  7582       return declarations;
       
  7583     }
       
  7584 
       
  7585     const styleValue = (0,external_lodash_namespaceObject.get)(blockStyles, pathToValue);
       
  7586 
       
  7587     if (!!properties && !(0,external_lodash_namespaceObject.isString)(styleValue)) {
       
  7588       Object.entries(properties).forEach(entry => {
       
  7589         const [name, prop] = entry;
       
  7590 
       
  7591         if (!(0,external_lodash_namespaceObject.get)(styleValue, [prop], false)) {
       
  7592           // Do not create a declaration
       
  7593           // for sub-properties that don't have any value.
       
  7594           return;
       
  7595         }
       
  7596 
       
  7597         const cssProperty = (0,external_lodash_namespaceObject.kebabCase)(name);
       
  7598         declarations.push(`${cssProperty}: ${compileStyleValue((0,external_lodash_namespaceObject.get)(styleValue, [prop]))}`);
       
  7599       });
       
  7600     } else if ((0,external_lodash_namespaceObject.get)(blockStyles, pathToValue, false)) {
       
  7601       const cssProperty = key.startsWith('--') ? key : (0,external_lodash_namespaceObject.kebabCase)(key);
       
  7602       declarations.push(`${cssProperty}: ${compileStyleValue((0,external_lodash_namespaceObject.get)(blockStyles, pathToValue))}`);
       
  7603     }
       
  7604 
       
  7605     return declarations;
       
  7606   }, []); // The goal is to move everything to server side generated engine styles
       
  7607   // This is temporary as we absorb more and more styles into the engine.
       
  7608 
       
  7609   const extraRules = getCSSRules(blockStyles, {
       
  7610     selector: 'self'
       
  7611   });
       
  7612   extraRules.forEach(rule => {
       
  7613     if (rule.selector !== 'self') {
       
  7614       throw "This style can't be added as inline style";
       
  7615     }
       
  7616 
       
  7617     const cssProperty = rule.key.startsWith('--') ? rule.key : (0,external_lodash_namespaceObject.kebabCase)(rule.key);
       
  7618     output.push(`${cssProperty}: ${compileStyleValue(rule.value)}`);
       
  7619   });
       
  7620   return output;
       
  7621 }
       
  7622 
       
  7623 const getNodesWithStyles = (tree, blockSelectors) => {
       
  7624   var _tree$styles, _tree$styles2;
       
  7625 
       
  7626   const nodes = [];
       
  7627 
       
  7628   if (!(tree !== null && tree !== void 0 && tree.styles)) {
       
  7629     return nodes;
       
  7630   }
       
  7631 
       
  7632   const pickStyleKeys = treeToPickFrom => (0,external_lodash_namespaceObject.pickBy)(treeToPickFrom, (value, key) => ['border', 'color', 'spacing', 'typography', 'filter'].includes(key)); // Top-level.
       
  7633 
       
  7634 
       
  7635   const styles = pickStyleKeys(tree.styles);
       
  7636 
       
  7637   if (!!styles) {
       
  7638     nodes.push({
       
  7639       styles,
       
  7640       selector: ROOT_BLOCK_SELECTOR
       
  7641     });
       
  7642   }
       
  7643 
       
  7644   (0,external_lodash_namespaceObject.forEach)((_tree$styles = tree.styles) === null || _tree$styles === void 0 ? void 0 : _tree$styles.elements, (value, key) => {
       
  7645     if (!!value && !!external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS[key]) {
       
  7646       nodes.push({
       
  7647         styles: value,
       
  7648         selector: external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS[key]
       
  7649       });
       
  7650     }
       
  7651   }); // Iterate over blocks: they can have styles & elements.
       
  7652 
       
  7653   (0,external_lodash_namespaceObject.forEach)((_tree$styles2 = tree.styles) === null || _tree$styles2 === void 0 ? void 0 : _tree$styles2.blocks, (node, blockName) => {
       
  7654     var _blockSelectors$block;
       
  7655 
       
  7656     const blockStyles = pickStyleKeys(node);
       
  7657 
       
  7658     if (!!blockStyles && !!(blockSelectors !== null && blockSelectors !== void 0 && (_blockSelectors$block = blockSelectors[blockName]) !== null && _blockSelectors$block !== void 0 && _blockSelectors$block.selector)) {
       
  7659       nodes.push({
       
  7660         styles: blockStyles,
       
  7661         selector: blockSelectors[blockName].selector,
       
  7662         duotoneSelector: blockSelectors[blockName].duotoneSelector
       
  7663       });
       
  7664     }
       
  7665 
       
  7666     (0,external_lodash_namespaceObject.forEach)(node === null || node === void 0 ? void 0 : node.elements, (value, elementName) => {
       
  7667       if (!!value && !!(blockSelectors !== null && blockSelectors !== void 0 && blockSelectors[blockName]) && !!(external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS !== null && external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS !== void 0 && external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS[elementName])) {
       
  7668         nodes.push({
       
  7669           styles: value,
       
  7670           selector: blockSelectors[blockName].selector.split(',').map(sel => sel + ' ' + external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS[elementName]).join(',')
       
  7671         });
       
  7672       }
       
  7673     });
       
  7674   });
       
  7675   return nodes;
       
  7676 };
       
  7677 const getNodesWithSettings = (tree, blockSelectors) => {
       
  7678   var _tree$settings, _tree$settings2;
       
  7679 
       
  7680   const nodes = [];
       
  7681 
       
  7682   if (!(tree !== null && tree !== void 0 && tree.settings)) {
       
  7683     return nodes;
       
  7684   }
       
  7685 
       
  7686   const pickPresets = treeToPickFrom => {
       
  7687     const presets = {};
       
  7688     PRESET_METADATA.forEach(_ref6 => {
       
  7689       let {
       
  7690         path
       
  7691       } = _ref6;
       
  7692       const value = (0,external_lodash_namespaceObject.get)(treeToPickFrom, path, false);
       
  7693 
       
  7694       if (value !== false) {
       
  7695         (0,external_lodash_namespaceObject.set)(presets, path, value);
       
  7696       }
       
  7697     });
       
  7698     return presets;
       
  7699   }; // Top-level.
       
  7700 
       
  7701 
       
  7702   const presets = pickPresets(tree.settings);
       
  7703   const custom = (_tree$settings = tree.settings) === null || _tree$settings === void 0 ? void 0 : _tree$settings.custom;
       
  7704 
       
  7705   if (!(0,external_lodash_namespaceObject.isEmpty)(presets) || !!custom) {
       
  7706     nodes.push({
       
  7707       presets,
       
  7708       custom,
       
  7709       selector: ROOT_BLOCK_SELECTOR
       
  7710     });
       
  7711   } // Blocks.
       
  7712 
       
  7713 
       
  7714   (0,external_lodash_namespaceObject.forEach)((_tree$settings2 = tree.settings) === null || _tree$settings2 === void 0 ? void 0 : _tree$settings2.blocks, (node, blockName) => {
       
  7715     const blockPresets = pickPresets(node);
       
  7716     const blockCustom = node.custom;
       
  7717 
       
  7718     if (!(0,external_lodash_namespaceObject.isEmpty)(blockPresets) || !!blockCustom) {
       
  7719       nodes.push({
       
  7720         presets: blockPresets,
       
  7721         custom: blockCustom,
       
  7722         selector: blockSelectors[blockName].selector
       
  7723       });
       
  7724     }
       
  7725   });
       
  7726   return nodes;
       
  7727 };
       
  7728 const toCustomProperties = (tree, blockSelectors) => {
       
  7729   const settings = getNodesWithSettings(tree, blockSelectors);
       
  7730   let ruleset = '';
       
  7731   settings.forEach(_ref7 => {
       
  7732     let {
       
  7733       presets,
       
  7734       custom,
       
  7735       selector
       
  7736     } = _ref7;
       
  7737     const declarations = getPresetsDeclarations(presets);
       
  7738     const customProps = flattenTree(custom, '--wp--custom--', '--');
       
  7739 
       
  7740     if (customProps.length > 0) {
       
  7741       declarations.push(...customProps);
       
  7742     }
       
  7743 
       
  7744     if (declarations.length > 0) {
       
  7745       ruleset = ruleset + `${selector}{${declarations.join(';')};}`;
       
  7746     }
       
  7747   });
       
  7748   return ruleset;
       
  7749 };
       
  7750 const toStyles = (tree, blockSelectors) => {
       
  7751   const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
       
  7752   const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
       
  7753   /*
       
  7754    * Reset default browser margin on the root body element.
       
  7755    * This is set on the root selector **before** generating the ruleset
       
  7756    * from the `theme.json`. This is to ensure that if the `theme.json` declares
       
  7757    * `margin` in its `spacing` declaration for the `body` element then these
       
  7758    * user-generated values take precedence in the CSS cascade.
       
  7759    * @link https://github.com/WordPress/gutenberg/issues/36147.
       
  7760    */
       
  7761 
       
  7762   let ruleset = 'body {margin: 0;}';
       
  7763   nodesWithStyles.forEach(_ref8 => {
       
  7764     let {
       
  7765       selector,
       
  7766       duotoneSelector,
       
  7767       styles
       
  7768     } = _ref8;
       
  7769     const duotoneStyles = {};
       
  7770 
       
  7771     if (styles !== null && styles !== void 0 && styles.filter) {
       
  7772       duotoneStyles.filter = styles.filter;
       
  7773       delete styles.filter;
       
  7774     } // Process duotone styles (they use color.__experimentalDuotone selector).
       
  7775 
       
  7776 
       
  7777     if (duotoneSelector) {
       
  7778       const duotoneDeclarations = getStylesDeclarations(duotoneStyles);
       
  7779 
       
  7780       if (duotoneDeclarations.length === 0) {
       
  7781         return;
       
  7782       }
       
  7783 
       
  7784       ruleset = ruleset + `${duotoneSelector}{${duotoneDeclarations.join(';')};}`;
       
  7785     } // Process the remaning block styles (they use either normal block class or __experimentalSelector).
       
  7786 
       
  7787 
       
  7788     const declarations = getStylesDeclarations(styles);
       
  7789 
       
  7790     if (declarations.length === 0) {
       
  7791       return;
       
  7792     }
       
  7793 
       
  7794     ruleset = ruleset + `${selector}{${declarations.join(';')};}`;
       
  7795   });
       
  7796   nodesWithSettings.forEach(_ref9 => {
       
  7797     let {
       
  7798       selector,
       
  7799       presets
       
  7800     } = _ref9;
       
  7801 
       
  7802     if (ROOT_BLOCK_SELECTOR === selector) {
       
  7803       // Do not add extra specificity for top-level classes.
       
  7804       selector = '';
       
  7805     }
       
  7806 
       
  7807     const classes = getPresetsClasses(selector, presets);
       
  7808 
       
  7809     if (!(0,external_lodash_namespaceObject.isEmpty)(classes)) {
       
  7810       ruleset = ruleset + classes;
       
  7811     }
       
  7812   });
       
  7813   return ruleset;
       
  7814 };
       
  7815 function toSvgFilters(tree, blockSelectors) {
       
  7816   const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
       
  7817   return nodesWithSettings.flatMap(_ref10 => {
       
  7818     let {
       
  7819       presets
       
  7820     } = _ref10;
       
  7821     return getPresetsSvgFilters(presets);
       
  7822   });
       
  7823 }
       
  7824 
       
  7825 const getBlockSelectors = blockTypes => {
       
  7826   const result = {};
       
  7827   blockTypes.forEach(blockType => {
       
  7828     var _blockType$supports$_, _blockType$supports, _blockType$supports$c, _blockType$supports2, _blockType$supports2$;
       
  7829 
       
  7830     const name = blockType.name;
       
  7831     const selector = (_blockType$supports$_ = blockType === null || blockType === void 0 ? void 0 : (_blockType$supports = blockType.supports) === null || _blockType$supports === void 0 ? void 0 : _blockType$supports.__experimentalSelector) !== null && _blockType$supports$_ !== void 0 ? _blockType$supports$_ : '.wp-block-' + name.replace('core/', '').replace('/', '-');
       
  7832     const duotoneSelector = (_blockType$supports$c = blockType === null || blockType === void 0 ? void 0 : (_blockType$supports2 = blockType.supports) === null || _blockType$supports2 === void 0 ? void 0 : (_blockType$supports2$ = _blockType$supports2.color) === null || _blockType$supports2$ === void 0 ? void 0 : _blockType$supports2$.__experimentalDuotone) !== null && _blockType$supports$c !== void 0 ? _blockType$supports$c : null;
       
  7833     result[name] = {
       
  7834       name,
       
  7835       selector,
       
  7836       duotoneSelector
       
  7837     };
       
  7838   });
       
  7839   return result;
       
  7840 };
       
  7841 
       
  7842 function useGlobalStylesOutput() {
       
  7843   const [stylesheets, setStylesheets] = (0,external_wp_element_namespaceObject.useState)([]);
       
  7844   const [settings, setSettings] = (0,external_wp_element_namespaceObject.useState)({});
       
  7845   const [svgFilters, setSvgFilters] = (0,external_wp_element_namespaceObject.useState)({});
       
  7846   const {
  9413   const {
  7847     merged: mergedConfig
  9414     params = {}
  7848   } = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
  9415   } = useLocation();
  7849   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
  7850     if (!(mergedConfig !== null && mergedConfig !== void 0 && mergedConfig.styles) || !(mergedConfig !== null && mergedConfig !== void 0 && mergedConfig.settings)) {
       
  7851       return;
       
  7852     }
       
  7853 
       
  7854     const blockSelectors = getBlockSelectors((0,external_wp_blocks_namespaceObject.getBlockTypes)());
       
  7855     const customProperties = toCustomProperties(mergedConfig, blockSelectors);
       
  7856     const globalStyles = toStyles(mergedConfig, blockSelectors);
       
  7857     const filters = toSvgFilters(mergedConfig, blockSelectors);
       
  7858     setStylesheets([{
       
  7859       css: customProperties,
       
  7860       isGlobalStyles: true
       
  7861     }, {
       
  7862       css: globalStyles,
       
  7863       isGlobalStyles: true
       
  7864     }]);
       
  7865     setSettings(mergedConfig.settings);
       
  7866     setSvgFilters(filters);
       
  7867   }, [mergedConfig]);
       
  7868   return [stylesheets, settings, svgFilters];
       
  7869 }
       
  7870 
       
  7871 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preview.js
       
  7872 
       
  7873 
       
  7874 /**
       
  7875  * WordPress dependencies
       
  7876  */
       
  7877 
       
  7878 
       
  7879 
       
  7880 
       
  7881 /**
       
  7882  * Internal dependencies
       
  7883  */
       
  7884 
       
  7885 
       
  7886 
       
  7887 const firstFrame = {
       
  7888   start: {
       
  7889     opacity: 1,
       
  7890     display: 'block'
       
  7891   },
       
  7892   hover: {
       
  7893     opacity: 0,
       
  7894     display: 'none'
       
  7895   }
       
  7896 };
       
  7897 const secondFrame = {
       
  7898   hover: {
       
  7899     opacity: 1,
       
  7900     display: 'block'
       
  7901   },
       
  7902   start: {
       
  7903     opacity: 0,
       
  7904     display: 'none'
       
  7905   }
       
  7906 };
       
  7907 const normalizedWidth = 248;
       
  7908 const normalizedHeight = 152;
       
  7909 const normalizedColorSwatchSize = 32;
       
  7910 
       
  7911 const StylesPreview = _ref => {
       
  7912   let {
       
  7913     label,
       
  7914     isFocused
       
  7915   } = _ref;
       
  7916   const [fontWeight] = useStyle('typography.fontWeight');
       
  7917   const [fontFamily = 'serif'] = useStyle('typography.fontFamily');
       
  7918   const [headingFontFamily = fontFamily] = useStyle('elements.h1.typography.fontFamily');
       
  7919   const [headingFontWeight = fontWeight] = useStyle('elements.h1.typography.fontWeight');
       
  7920   const [textColor = 'black'] = useStyle('color.text');
       
  7921   const [headingColor = textColor] = useStyle('elements.h1.color.text');
       
  7922   const [linkColor = 'blue'] = useStyle('elements.link.color.text');
       
  7923   const [backgroundColor = 'white'] = useStyle('color.background');
       
  7924   const [gradientValue] = useStyle('color.gradient');
       
  7925   const [styles] = useGlobalStylesOutput();
       
  7926   const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
       
  7927   const [coreColors] = useSetting('color.palette.core');
       
  7928   const [themeColors] = useSetting('color.palette.theme');
       
  7929   const [customColors] = useSetting('color.palette.custom');
       
  7930   const [isHovered, setIsHovered] = (0,external_wp_element_namespaceObject.useState)(false);
       
  7931   const [containerResizeListener, {
       
  7932     width
       
  7933   }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
       
  7934   const ratio = width ? width / normalizedWidth : 1;
       
  7935   const paletteColors = (themeColors !== null && themeColors !== void 0 ? themeColors : []).concat(customColors !== null && customColors !== void 0 ? customColors : []).concat(coreColors !== null && coreColors !== void 0 ? coreColors : []);
       
  7936   const highlightedColors = paletteColors.filter( // we exclude these two colors because they are already visible in the preview.
       
  7937   _ref2 => {
       
  7938     let {
       
  7939       color
       
  7940     } = _ref2;
       
  7941     return color !== backgroundColor && color !== headingColor;
       
  7942   }).slice(0, 2); // Reset leaked styles from WP common.css.
       
  7943 
       
  7944   const editorStyles = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  7945     if (styles) {
       
  7946       return [...styles, {
       
  7947         css: 'body{min-width: 0;}',
       
  7948         isGlobalStyles: true
       
  7949       }];
       
  7950     }
       
  7951 
       
  7952     return styles;
       
  7953   }, [styles]);
       
  7954   return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableIframe, {
       
  7955     className: "edit-site-global-styles-preview__iframe",
       
  7956     head: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
       
  7957       styles: editorStyles
       
  7958     }),
       
  7959     style: {
       
  7960       height: normalizedHeight * ratio,
       
  7961       visibility: !width ? 'hidden' : 'visible'
       
  7962     },
       
  7963     onMouseEnter: () => setIsHovered(true),
       
  7964     onMouseLeave: () => setIsHovered(false),
       
  7965     tabIndex: -1
       
  7966   }, containerResizeListener, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
  7967     style: {
       
  7968       height: normalizedHeight * ratio,
       
  7969       width: '100%',
       
  7970       background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor,
       
  7971       cursor: 'pointer'
       
  7972     },
       
  7973     initial: "start",
       
  7974     animate: (isHovered || isFocused) && !disableMotion ? 'hover' : 'start'
       
  7975   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
  7976     variants: firstFrame,
       
  7977     style: {
       
  7978       height: '100%',
       
  7979       overflow: 'hidden'
       
  7980     }
       
  7981   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  7982     spacing: 10 * ratio,
       
  7983     justify: "center",
       
  7984     style: {
       
  7985       height: '100%',
       
  7986       overflow: 'hidden'
       
  7987     }
       
  7988   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  7989     style: {
       
  7990       fontFamily: headingFontFamily,
       
  7991       fontSize: 65 * ratio,
       
  7992       color: headingColor,
       
  7993       fontWeight: headingFontWeight
       
  7994     }
       
  7995   }, "Aa"), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  7996     spacing: 4 * ratio
       
  7997   }, highlightedColors.map(_ref3 => {
       
  7998     let {
       
  7999       slug,
       
  8000       color
       
  8001     } = _ref3;
       
  8002     return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8003       key: slug,
       
  8004       style: {
       
  8005         height: normalizedColorSwatchSize * ratio,
       
  8006         width: normalizedColorSwatchSize * ratio,
       
  8007         background: color,
       
  8008         borderRadius: normalizedColorSwatchSize * ratio / 2
       
  8009       }
       
  8010     });
       
  8011   })))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
  8012     variants: secondFrame,
       
  8013     style: {
       
  8014       height: '100%',
       
  8015       overflow: 'hidden'
       
  8016     }
       
  8017   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8018     spacing: 3 * ratio,
       
  8019     justify: "center",
       
  8020     style: {
       
  8021       height: '100%',
       
  8022       overflow: 'hidden',
       
  8023       padding: 10 * ratio,
       
  8024       boxSizing: 'border-box'
       
  8025     }
       
  8026   }, label && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8027     style: {
       
  8028       fontSize: 35 * ratio,
       
  8029       fontFamily: headingFontFamily,
       
  8030       color: headingColor,
       
  8031       fontWeight: headingFontWeight,
       
  8032       lineHeight: '1em'
       
  8033     }
       
  8034   }, label), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8035     spacing: 2 * ratio,
       
  8036     justify: "flex-start"
       
  8037   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8038     style: {
       
  8039       fontFamily,
       
  8040       fontSize: 24 * ratio,
       
  8041       color: textColor
       
  8042     }
       
  8043   }, "Aa"), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8044     style: {
       
  8045       fontFamily,
       
  8046       fontSize: 24 * ratio,
       
  8047       color: linkColor
       
  8048     }
       
  8049   }, "Aa")), paletteColors && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8050     spacing: 0
       
  8051   }, paletteColors.slice(0, 4).map((_ref4, index) => {
       
  8052     let {
       
  8053       color
       
  8054     } = _ref4;
       
  8055     return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8056       key: index,
       
  8057       style: {
       
  8058         height: 10 * ratio,
       
  8059         width: 30 * ratio,
       
  8060         background: color,
       
  8061         flexGrow: 1
       
  8062       }
       
  8063     });
       
  8064   }))))));
       
  8065 };
       
  8066 
       
  8067 /* harmony default export */ var preview = (StylesPreview);
       
  8068 
       
  8069 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-root.js
       
  8070 
       
  8071 
       
  8072 /**
       
  8073  * WordPress dependencies
       
  8074  */
       
  8075 
       
  8076 
       
  8077 
       
  8078 
       
  8079 
       
  8080 /**
       
  8081  * Internal dependencies
       
  8082  */
       
  8083 
       
  8084 
       
  8085 
       
  8086 
       
  8087 
       
  8088 
       
  8089 function ScreenRoot() {
       
  8090   const {
  9416   const {
  8091     variations
  9417     postType,
  8092   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  9418     postId,
  8093     return {
  9419     context,
  8094       variations: select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations()
  9420     isReady
  8095     };
  9421   } = useResolveEditedEntityAndContext(params);
  8096   }, []);
       
  8097   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Card, {
       
  8098     size: "small"
       
  8099   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8100     spacing: 2
       
  8101   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Card, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardMedia, null, (0,external_wp_element_namespaceObject.createElement)(preview, null))), !!(variations !== null && variations !== void 0 && variations.length) && (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8102     path: "/variations"
       
  8103   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8104     justify: "space-between"
       
  8105   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_i18n_namespaceObject.__)('Browse styles')), (0,external_wp_element_namespaceObject.createElement)(IconWithCurrentColor, {
       
  8106     icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
       
  8107   }))))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardBody, null, (0,external_wp_element_namespaceObject.createElement)(context_menu, null)), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardDivider, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItem, null, (0,external_wp_i18n_namespaceObject.__)('Customize the appearance of specific blocks for the whole site.')), (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8108     path: "/blocks"
       
  8109   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8110     justify: "space-between"
       
  8111   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_i18n_namespaceObject.__)('Blocks')), (0,external_wp_element_namespaceObject.createElement)(IconWithCurrentColor, {
       
  8112     icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
       
  8113   }))))));
       
  8114 }
       
  8115 
       
  8116 /* harmony default export */ var screen_root = (ScreenRoot);
       
  8117 
       
  8118 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/header.js
       
  8119 
       
  8120 
       
  8121 /**
       
  8122  * WordPress dependencies
       
  8123  */
       
  8124 
       
  8125 
       
  8126 
       
  8127 /**
       
  8128  * Internal dependencies
       
  8129  */
       
  8130 
       
  8131 
       
  8132 
       
  8133 function ScreenHeader(_ref) {
       
  8134   let {
       
  8135     title,
       
  8136     description
       
  8137   } = _ref;
       
  8138   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8139     spacing: 2
       
  8140   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8141     spacing: 2
       
  8142   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalView, null, (0,external_wp_element_namespaceObject.createElement)(NavigationBackButton, {
       
  8143     icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right : chevron_left,
       
  8144     size: "small",
       
  8145     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigate to the previous view')
       
  8146   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
       
  8147     level: 5
       
  8148   }, title))), description && (0,external_wp_element_namespaceObject.createElement)("p", {
       
  8149     className: "edit-site-global-styles-header__description"
       
  8150   }, description));
       
  8151 }
       
  8152 
       
  8153 /* harmony default export */ var header = (ScreenHeader);
       
  8154 
       
  8155 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-block-list.js
       
  8156 
       
  8157 
       
  8158 /**
       
  8159  * WordPress dependencies
       
  8160  */
       
  8161 
       
  8162 
       
  8163 
       
  8164 
       
  8165 
       
  8166 
       
  8167 
       
  8168 
       
  8169 /**
       
  8170  * Internal dependencies
       
  8171  */
       
  8172 
       
  8173 
       
  8174 
       
  8175 
       
  8176 
       
  8177 
       
  8178 
       
  8179 
       
  8180 function useSortedBlockTypes() {
       
  8181   const blockItems = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blocks_namespaceObject.store).getBlockTypes(), []); // Ensure core blocks are prioritized in the returned results,
       
  8182   // because third party blocks can be registered earlier than
       
  8183   // the core blocks (usually by using the `init` action),
       
  8184   // thus affecting the display order.
       
  8185   // We don't sort reusable blocks as they are handled differently.
       
  8186 
       
  8187   const groupByType = (blocks, block) => {
       
  8188     const {
       
  8189       core,
       
  8190       noncore
       
  8191     } = blocks;
       
  8192     const type = block.name.startsWith('core/') ? core : noncore;
       
  8193     type.push(block);
       
  8194     return blocks;
       
  8195   };
       
  8196 
       
  8197   const {
  9422   const {
  8198     core: coreItems,
  9423     setEditedEntity
  8199     noncore: nonCoreItems
       
  8200   } = blockItems.reduce(groupByType, {
       
  8201     core: [],
       
  8202     noncore: []
       
  8203   });
       
  8204   return [...coreItems, ...nonCoreItems];
       
  8205 }
       
  8206 
       
  8207 function BlockMenuItem(_ref) {
       
  8208   let {
       
  8209     block
       
  8210   } = _ref;
       
  8211   const hasTypographyPanel = useHasTypographyPanel(block.name);
       
  8212   const hasColorPanel = useHasColorPanel(block.name);
       
  8213   const hasBorderPanel = useHasBorderPanel(block.name);
       
  8214   const hasDimensionsPanel = useHasDimensionsPanel(block.name);
       
  8215   const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
       
  8216   const hasBlockMenuItem = hasTypographyPanel || hasColorPanel || hasLayoutPanel;
       
  8217 
       
  8218   if (!hasBlockMenuItem) {
       
  8219     return null;
       
  8220   }
       
  8221 
       
  8222   return (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8223     path: '/blocks/' + block.name
       
  8224   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8225     justify: "flex-start"
       
  8226   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
       
  8227     icon: block.icon
       
  8228   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, block.title)));
       
  8229 }
       
  8230 
       
  8231 function ScreenBlockList() {
       
  8232   const sortedBlockTypes = useSortedBlockTypes();
       
  8233   const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)('');
       
  8234   const debouncedSpeak = (0,external_wp_compose_namespaceObject.useDebounce)(external_wp_a11y_namespaceObject.speak, 500);
       
  8235   const isMatchingSearchTerm = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blocks_namespaceObject.store).isMatchingSearchTerm, []);
       
  8236   const filteredBlockTypes = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  8237     if (!filterValue) {
       
  8238       return sortedBlockTypes;
       
  8239     }
       
  8240 
       
  8241     return sortedBlockTypes.filter(blockType => isMatchingSearchTerm(blockType, filterValue));
       
  8242   }, [filterValue, sortedBlockTypes, isMatchingSearchTerm]);
       
  8243   const blockTypesListRef = (0,external_wp_element_namespaceObject.useRef)(); // Announce search results on change
       
  8244 
       
  8245   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
  8246     if (!filterValue) {
       
  8247       return;
       
  8248     } // We extract the results from the wrapper div's `ref` because
       
  8249     // filtered items can contain items that will eventually not
       
  8250     // render and there is no reliable way to detect when a child
       
  8251     // will return `null`.
       
  8252     // TODO: We should find a better way of handling this as it's
       
  8253     // fragile and depends on the number of rendered elements of `BlockMenuItem`,
       
  8254     // which is now one.
       
  8255     // @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116
       
  8256 
       
  8257 
       
  8258     const count = blockTypesListRef.current.childElementCount;
       
  8259     const resultsFoundMessage = (0,external_wp_i18n_namespaceObject.sprintf)(
       
  8260     /* translators: %d: number of results. */
       
  8261     (0,external_wp_i18n_namespaceObject._n)('%d result found.', '%d results found.', count), count);
       
  8262     debouncedSpeak(resultsFoundMessage, count);
       
  8263   }, [filterValue, debouncedSpeak]);
       
  8264   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8265     title: (0,external_wp_i18n_namespaceObject.__)('Blocks'),
       
  8266     description: (0,external_wp_i18n_namespaceObject.__)('Customize the appearance of specific blocks and for the whole site.')
       
  8267   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, {
       
  8268     className: "edit-site-block-types-search",
       
  8269     onChange: setFilterValue,
       
  8270     value: filterValue,
       
  8271     label: (0,external_wp_i18n_namespaceObject.__)('Search for blocks'),
       
  8272     placeholder: (0,external_wp_i18n_namespaceObject.__)('Search')
       
  8273   }), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8274     ref: blockTypesListRef,
       
  8275     className: "edit-site-block-types-item-list"
       
  8276   }, filteredBlockTypes.map(block => (0,external_wp_element_namespaceObject.createElement)(BlockMenuItem, {
       
  8277     block: block,
       
  8278     key: 'menu-itemblock-' + block.name
       
  8279   }))));
       
  8280 }
       
  8281 
       
  8282 /* harmony default export */ var screen_block_list = (ScreenBlockList);
       
  8283 
       
  8284 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-block.js
       
  8285 
       
  8286 
       
  8287 /**
       
  8288  * WordPress dependencies
       
  8289  */
       
  8290 
       
  8291 /**
       
  8292  * Internal dependencies
       
  8293  */
       
  8294 
       
  8295 
       
  8296 
       
  8297 
       
  8298 function ScreenBlock(_ref) {
       
  8299   let {
       
  8300     name
       
  8301   } = _ref;
       
  8302   const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
       
  8303   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8304     title: blockType.title
       
  8305   }), (0,external_wp_element_namespaceObject.createElement)(context_menu, {
       
  8306     parentMenu: '/blocks/' + name,
       
  8307     name: name
       
  8308   }));
       
  8309 }
       
  8310 
       
  8311 /* harmony default export */ var screen_block = (ScreenBlock);
       
  8312 
       
  8313 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/subtitle.js
       
  8314 
       
  8315 
       
  8316 /**
       
  8317  * WordPress dependencies
       
  8318  */
       
  8319 
       
  8320 
       
  8321 function Subtitle(_ref) {
       
  8322   let {
       
  8323     children
       
  8324   } = _ref;
       
  8325   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
       
  8326     className: "edit-site-global-styles-subtitle",
       
  8327     level: 2
       
  8328   }, children);
       
  8329 }
       
  8330 
       
  8331 /* harmony default export */ var subtitle = (Subtitle);
       
  8332 
       
  8333 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-typography.js
       
  8334 
       
  8335 
       
  8336 /**
       
  8337  * WordPress dependencies
       
  8338  */
       
  8339 
       
  8340 
       
  8341 /**
       
  8342  * Internal dependencies
       
  8343  */
       
  8344 
       
  8345 
       
  8346 
       
  8347 
       
  8348 
       
  8349 
       
  8350 
       
  8351 function Item(_ref) {
       
  8352   let {
       
  8353     name,
       
  8354     parentMenu,
       
  8355     element,
       
  8356     label
       
  8357   } = _ref;
       
  8358   const hasSupport = !name;
       
  8359   const prefix = element === 'text' || !element ? '' : `elements.${element}.`;
       
  8360   const extraStyles = element === 'link' ? {
       
  8361     textDecoration: 'underline'
       
  8362   } : {};
       
  8363   const [fontFamily] = useStyle(prefix + 'typography.fontFamily', name);
       
  8364   const [fontStyle] = useStyle(prefix + 'typography.fontStyle', name);
       
  8365   const [fontWeight] = useStyle(prefix + 'typography.fontWeight', name);
       
  8366   const [letterSpacing] = useStyle(prefix + 'typography.letterSpacing', name);
       
  8367   const [backgroundColor] = useStyle(prefix + 'color.background', name);
       
  8368   const [gradientValue] = useStyle(prefix + 'color.gradient', name);
       
  8369   const [color] = useStyle(prefix + 'color.text', name);
       
  8370 
       
  8371   if (!hasSupport) {
       
  8372     return null;
       
  8373   }
       
  8374 
       
  8375   return (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8376     path: parentMenu + '/typography/' + element
       
  8377   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8378     justify: "flex-start"
       
  8379   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, {
       
  8380     className: "edit-site-global-styles-screen-typography__indicator",
       
  8381     style: {
       
  8382       fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
       
  8383       background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor,
       
  8384       color,
       
  8385       fontStyle,
       
  8386       fontWeight,
       
  8387       letterSpacing,
       
  8388       ...extraStyles
       
  8389     }
       
  8390   }, (0,external_wp_i18n_namespaceObject.__)('Aa')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, label)));
       
  8391 }
       
  8392 
       
  8393 function ScreenTypography(_ref2) {
       
  8394   let {
       
  8395     name
       
  8396   } = _ref2;
       
  8397   const parentMenu = name === undefined ? '' : '/blocks/' + name;
       
  8398   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8399     title: (0,external_wp_i18n_namespaceObject.__)('Typography'),
       
  8400     description: (0,external_wp_i18n_namespaceObject.__)('Manage the typography settings for different elements.')
       
  8401   }), !name && (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8402     className: "edit-site-global-styles-screen-typography"
       
  8403   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8404     spacing: 3
       
  8405   }, (0,external_wp_element_namespaceObject.createElement)(subtitle, null, (0,external_wp_i18n_namespaceObject.__)('Elements')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
  8406     isBordered: true,
       
  8407     isSeparated: true
       
  8408   }, (0,external_wp_element_namespaceObject.createElement)(Item, {
       
  8409     name: name,
       
  8410     parentMenu: parentMenu,
       
  8411     element: "text",
       
  8412     label: (0,external_wp_i18n_namespaceObject.__)('Text')
       
  8413   }), (0,external_wp_element_namespaceObject.createElement)(Item, {
       
  8414     name: name,
       
  8415     parentMenu: parentMenu,
       
  8416     element: "link",
       
  8417     label: (0,external_wp_i18n_namespaceObject.__)('Links')
       
  8418   })))), !!name && (0,external_wp_element_namespaceObject.createElement)(TypographyPanel, {
       
  8419     name: name,
       
  8420     element: "text"
       
  8421   }));
       
  8422 }
       
  8423 
       
  8424 /* harmony default export */ var screen_typography = (ScreenTypography);
       
  8425 
       
  8426 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-typography-element.js
       
  8427 
       
  8428 
       
  8429 /**
       
  8430  * WordPress dependencies
       
  8431  */
       
  8432 
       
  8433 /**
       
  8434  * Internal dependencies
       
  8435  */
       
  8436 
       
  8437 
       
  8438 
       
  8439 const screen_typography_element_elements = {
       
  8440   text: {
       
  8441     description: (0,external_wp_i18n_namespaceObject.__)('Manage the fonts used on the site.'),
       
  8442     title: (0,external_wp_i18n_namespaceObject.__)('Text')
       
  8443   },
       
  8444   link: {
       
  8445     description: (0,external_wp_i18n_namespaceObject.__)('Manage the fonts and typography used on the links.'),
       
  8446     title: (0,external_wp_i18n_namespaceObject.__)('Links')
       
  8447   }
       
  8448 };
       
  8449 
       
  8450 function ScreenTypographyElement(_ref) {
       
  8451   let {
       
  8452     name,
       
  8453     element
       
  8454   } = _ref;
       
  8455   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8456     title: screen_typography_element_elements[element].title,
       
  8457     description: screen_typography_element_elements[element].description
       
  8458   }), (0,external_wp_element_namespaceObject.createElement)(TypographyPanel, {
       
  8459     name: name,
       
  8460     element: element
       
  8461   }));
       
  8462 }
       
  8463 
       
  8464 /* harmony default export */ var screen_typography_element = (ScreenTypographyElement);
       
  8465 
       
  8466 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/color-indicator-wrapper.js
       
  8467 
       
  8468 
       
  8469 
       
  8470 /**
       
  8471  * External dependencies
       
  8472  */
       
  8473 
       
  8474 /**
       
  8475  * WordPress dependencies
       
  8476  */
       
  8477 
       
  8478 
       
  8479 
       
  8480 function ColorIndicatorWrapper(_ref) {
       
  8481   let {
       
  8482     className,
       
  8483     ...props
       
  8484   } = _ref;
       
  8485   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, extends_extends({
       
  8486     className: classnames_default()('edit-site-global-styles__color-indicator-wrapper', className)
       
  8487   }, props));
       
  8488 }
       
  8489 
       
  8490 /* harmony default export */ var color_indicator_wrapper = (ColorIndicatorWrapper);
       
  8491 
       
  8492 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/palette.js
       
  8493 
       
  8494 
       
  8495 /**
       
  8496  * WordPress dependencies
       
  8497  */
       
  8498 
       
  8499 
       
  8500 
       
  8501 /**
       
  8502  * Internal dependencies
       
  8503  */
       
  8504 
       
  8505 
       
  8506 
       
  8507 
       
  8508 
       
  8509 const EMPTY_COLORS = [];
       
  8510 
       
  8511 function Palette(_ref) {
       
  8512   let {
       
  8513     name
       
  8514   } = _ref;
       
  8515   const [customColors] = useSetting('color.palette.custom');
       
  8516   const [themeColors] = useSetting('color.palette.theme');
       
  8517   const [defaultColors] = useSetting('color.palette.default');
       
  8518   const [defaultPaletteEnabled] = useSetting('color.defaultPalette', name);
       
  8519   const colors = (0,external_wp_element_namespaceObject.useMemo)(() => [...(customColors || EMPTY_COLORS), ...(themeColors || EMPTY_COLORS), ...(defaultColors && defaultPaletteEnabled ? defaultColors : EMPTY_COLORS)], [customColors, themeColors, defaultColors, defaultPaletteEnabled]);
       
  8520   const screenPath = !name ? '/colors/palette' : '/blocks/' + name + '/colors/palette';
       
  8521   const paletteButtonText = colors.length > 0 ? (0,external_wp_i18n_namespaceObject.sprintf)( // Translators: %d: Number of palette colors.
       
  8522   (0,external_wp_i18n_namespaceObject._n)('%d color', '%d colors', colors.length), colors.length) : (0,external_wp_i18n_namespaceObject.__)('Add custom colors');
       
  8523   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8524     spacing: 3
       
  8525   }, (0,external_wp_element_namespaceObject.createElement)(subtitle, null, (0,external_wp_i18n_namespaceObject.__)('Palette')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
  8526     isBordered: true,
       
  8527     isSeparated: true
       
  8528   }, (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8529     path: screenPath
       
  8530   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8531     direction: colors.length === 0 ? 'row-reverse' : 'row'
       
  8532   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalZStack, {
       
  8533     isLayered: false,
       
  8534     offset: -8
       
  8535   }, colors.slice(0, 5).map(_ref2 => {
       
  8536     let {
       
  8537       color
       
  8538     } = _ref2;
       
  8539     return (0,external_wp_element_namespaceObject.createElement)(color_indicator_wrapper, {
       
  8540       key: color
       
  8541     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ColorIndicator, {
       
  8542       colorValue: color
       
  8543     }));
       
  8544   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, paletteButtonText)))));
       
  8545 }
       
  8546 
       
  8547 /* harmony default export */ var palette = (Palette);
       
  8548 
       
  8549 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-colors.js
       
  8550 
       
  8551 
       
  8552 /**
       
  8553  * WordPress dependencies
       
  8554  */
       
  8555 
       
  8556 
       
  8557 /**
       
  8558  * Internal dependencies
       
  8559  */
       
  8560 
       
  8561 
       
  8562 
       
  8563 
       
  8564 
       
  8565 
       
  8566 
       
  8567 
       
  8568 function BackgroundColorItem(_ref) {
       
  8569   let {
       
  8570     name,
       
  8571     parentMenu
       
  8572   } = _ref;
       
  8573   const supports = getSupportedGlobalStylesPanels(name);
       
  8574   const hasSupport = supports.includes('backgroundColor') || supports.includes('background');
       
  8575   const [backgroundColor] = useStyle('color.background', name);
       
  8576   const [gradientValue] = useStyle('color.gradient', name);
       
  8577 
       
  8578   if (!hasSupport) {
       
  8579     return null;
       
  8580   }
       
  8581 
       
  8582   return (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8583     path: parentMenu + '/colors/background'
       
  8584   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8585     justify: "flex-start"
       
  8586   }, (0,external_wp_element_namespaceObject.createElement)(color_indicator_wrapper, {
       
  8587     expanded: false
       
  8588   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ColorIndicator, {
       
  8589     colorValue: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor
       
  8590   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_i18n_namespaceObject.__)('Background'))));
       
  8591 }
       
  8592 
       
  8593 function TextColorItem(_ref2) {
       
  8594   let {
       
  8595     name,
       
  8596     parentMenu
       
  8597   } = _ref2;
       
  8598   const supports = getSupportedGlobalStylesPanels(name);
       
  8599   const hasSupport = supports.includes('color');
       
  8600   const [color] = useStyle('color.text', name);
       
  8601 
       
  8602   if (!hasSupport) {
       
  8603     return null;
       
  8604   }
       
  8605 
       
  8606   return (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8607     path: parentMenu + '/colors/text'
       
  8608   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8609     justify: "flex-start"
       
  8610   }, (0,external_wp_element_namespaceObject.createElement)(color_indicator_wrapper, {
       
  8611     expanded: false
       
  8612   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ColorIndicator, {
       
  8613     colorValue: color
       
  8614   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_i18n_namespaceObject.__)('Text'))));
       
  8615 }
       
  8616 
       
  8617 function LinkColorItem(_ref3) {
       
  8618   let {
       
  8619     name,
       
  8620     parentMenu
       
  8621   } = _ref3;
       
  8622   const supports = getSupportedGlobalStylesPanels(name);
       
  8623   const hasSupport = supports.includes('linkColor');
       
  8624   const [color] = useStyle('elements.link.color.text', name);
       
  8625 
       
  8626   if (!hasSupport) {
       
  8627     return null;
       
  8628   }
       
  8629 
       
  8630   return (0,external_wp_element_namespaceObject.createElement)(NavigationButton, {
       
  8631     path: parentMenu + '/colors/link'
       
  8632   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  8633     justify: "flex-start"
       
  8634   }, (0,external_wp_element_namespaceObject.createElement)(color_indicator_wrapper, {
       
  8635     expanded: false
       
  8636   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ColorIndicator, {
       
  8637     colorValue: color
       
  8638   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_i18n_namespaceObject.__)('Links'))));
       
  8639 }
       
  8640 
       
  8641 function ScreenColors(_ref4) {
       
  8642   let {
       
  8643     name
       
  8644   } = _ref4;
       
  8645   const parentMenu = name === undefined ? '' : '/blocks/' + name;
       
  8646   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8647     title: (0,external_wp_i18n_namespaceObject.__)('Colors'),
       
  8648     description: (0,external_wp_i18n_namespaceObject.__)('Manage palettes and the default color of different global elements on the site.')
       
  8649   }), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  8650     className: "edit-site-global-styles-screen-colors"
       
  8651   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8652     spacing: 10
       
  8653   }, (0,external_wp_element_namespaceObject.createElement)(palette, {
       
  8654     name: name
       
  8655   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8656     spacing: 3
       
  8657   }, (0,external_wp_element_namespaceObject.createElement)(subtitle, null, (0,external_wp_i18n_namespaceObject.__)('Elements')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
  8658     isBordered: true,
       
  8659     isSeparated: true
       
  8660   }, (0,external_wp_element_namespaceObject.createElement)(BackgroundColorItem, {
       
  8661     name: name,
       
  8662     parentMenu: parentMenu
       
  8663   }), (0,external_wp_element_namespaceObject.createElement)(TextColorItem, {
       
  8664     name: name,
       
  8665     parentMenu: parentMenu
       
  8666   }), (0,external_wp_element_namespaceObject.createElement)(LinkColorItem, {
       
  8667     name: name,
       
  8668     parentMenu: parentMenu
       
  8669   }))))));
       
  8670 }
       
  8671 
       
  8672 /* harmony default export */ var screen_colors = (ScreenColors);
       
  8673 
       
  8674 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/color-palette-panel.js
       
  8675 
       
  8676 
       
  8677 /**
       
  8678  * WordPress dependencies
       
  8679  */
       
  8680 
       
  8681 
       
  8682 /**
       
  8683  * Internal dependencies
       
  8684  */
       
  8685 
       
  8686 
       
  8687 function ColorPalettePanel(_ref) {
       
  8688   let {
       
  8689     name
       
  8690   } = _ref;
       
  8691   const [themeColors, setThemeColors] = useSetting('color.palette.theme', name);
       
  8692   const [baseThemeColors] = useSetting('color.palette.theme', name, 'base');
       
  8693   const [defaultColors, setDefaultColors] = useSetting('color.palette.default', name);
       
  8694   const [baseDefaultColors] = useSetting('color.palette.default', name, 'base');
       
  8695   const [customColors, setCustomColors] = useSetting('color.palette.custom', name);
       
  8696   const [defaultPaletteEnabled] = useSetting('color.defaultPalette', name);
       
  8697   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8698     className: "edit-site-global-styles-color-palette-panel",
       
  8699     spacing: 10
       
  8700   }, !!themeColors && !!themeColors.length && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
  8701     canReset: themeColors !== baseThemeColors,
       
  8702     canOnlyChangeValues: true,
       
  8703     colors: themeColors,
       
  8704     onChange: setThemeColors,
       
  8705     paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Theme')
       
  8706   }), !!defaultColors && !!defaultColors.length && !!defaultPaletteEnabled && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
  8707     canReset: defaultColors !== baseDefaultColors,
       
  8708     canOnlyChangeValues: true,
       
  8709     colors: defaultColors,
       
  8710     onChange: setDefaultColors,
       
  8711     paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Default')
       
  8712   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
  8713     colors: customColors,
       
  8714     onChange: setCustomColors,
       
  8715     paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Custom'),
       
  8716     emptyMessage: (0,external_wp_i18n_namespaceObject.__)('Custom colors are empty! Add some colors to create your own color palette.'),
       
  8717     slugPrefix: "custom-"
       
  8718   }));
       
  8719 }
       
  8720 
       
  8721 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/gradients-palette-panel.js
       
  8722 
       
  8723 
       
  8724 /**
       
  8725  * External dependencies
       
  8726  */
       
  8727 
       
  8728 /**
       
  8729  * WordPress dependencies
       
  8730  */
       
  8731 
       
  8732 
       
  8733 
       
  8734 /**
       
  8735  * Internal dependencies
       
  8736  */
       
  8737 
       
  8738 
       
  8739 
       
  8740 function GradientPalettePanel(_ref) {
       
  8741   let {
       
  8742     name
       
  8743   } = _ref;
       
  8744   const [themeGradients, setThemeGradients] = useSetting('color.gradients.theme', name);
       
  8745   const [baseThemeGradients] = useSetting('color.gradients.theme', name, 'base');
       
  8746   const [defaultGradients, setDefaultGradients] = useSetting('color.gradients.default', name);
       
  8747   const [baseDefaultGradients] = useSetting('color.gradients.default', name, 'base');
       
  8748   const [customGradients, setCustomGradients] = useSetting('color.gradients.custom', name);
       
  8749   const [defaultPaletteEnabled] = useSetting('color.defaultGradients', name);
       
  8750   const [duotonePalette] = useSetting('color.duotone') || [];
       
  8751   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
       
  8752     className: "edit-site-global-styles-gradient-palette-panel",
       
  8753     spacing: 10
       
  8754   }, !!themeGradients && !!themeGradients.length && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
  8755     canReset: themeGradients !== baseThemeGradients,
       
  8756     canOnlyChangeValues: true,
       
  8757     gradients: themeGradients,
       
  8758     onChange: setThemeGradients,
       
  8759     paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Theme')
       
  8760   }), !!defaultGradients && !!defaultGradients.length && !!defaultPaletteEnabled && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
  8761     canReset: defaultGradients !== baseDefaultGradients,
       
  8762     canOnlyChangeValues: true,
       
  8763     gradients: defaultGradients,
       
  8764     onChange: setDefaultGradients,
       
  8765     paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Default')
       
  8766   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
  8767     gradients: customGradients,
       
  8768     onChange: setCustomGradients,
       
  8769     paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Custom'),
       
  8770     emptyMessage: (0,external_wp_i18n_namespaceObject.__)('Custom gradients are empty! Add some gradients to create your own palette.'),
       
  8771     slugPrefix: "custom-"
       
  8772   }), (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(subtitle, null, (0,external_wp_i18n_namespaceObject.__)('Duotone')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
  8773     margin: 3
       
  8774   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DuotonePicker, {
       
  8775     duotonePalette: duotonePalette,
       
  8776     disableCustomDuotone: true,
       
  8777     disableCustomColors: true,
       
  8778     clearable: false,
       
  8779     onChange: external_lodash_namespaceObject.noop
       
  8780   })));
       
  8781 }
       
  8782 
       
  8783 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-color-palette.js
       
  8784 
       
  8785 
       
  8786 /**
       
  8787  * WordPress dependencies
       
  8788  */
       
  8789 
       
  8790 
       
  8791 
       
  8792 /**
       
  8793  * Internal dependencies
       
  8794  */
       
  8795 
       
  8796 
       
  8797 
       
  8798 
       
  8799 
       
  8800 function ScreenColorPalette(_ref) {
       
  8801   let {
       
  8802     name
       
  8803   } = _ref;
       
  8804   const [currentTab, setCurrentTab] = (0,external_wp_element_namespaceObject.useState)('solid');
       
  8805   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8806     title: (0,external_wp_i18n_namespaceObject.__)('Palette'),
       
  8807     description: (0,external_wp_i18n_namespaceObject.__)('Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.')
       
  8808   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
       
  8809     className: "edit-site-screen-color-palette-toggle",
       
  8810     value: currentTab,
       
  8811     onChange: setCurrentTab,
       
  8812     label: (0,external_wp_i18n_namespaceObject.__)('Select palette type'),
       
  8813     hideLabelFromVision: true,
       
  8814     isBlock: true
       
  8815   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
  8816     value: "solid",
       
  8817     label: (0,external_wp_i18n_namespaceObject.__)('Solid')
       
  8818   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
  8819     value: "gradient",
       
  8820     label: (0,external_wp_i18n_namespaceObject.__)('Gradient')
       
  8821   })), currentTab === 'solid' && (0,external_wp_element_namespaceObject.createElement)(ColorPalettePanel, {
       
  8822     name: name
       
  8823   }), currentTab === 'gradient' && (0,external_wp_element_namespaceObject.createElement)(GradientPalettePanel, {
       
  8824     name: name
       
  8825   }));
       
  8826 }
       
  8827 
       
  8828 /* harmony default export */ var screen_color_palette = (ScreenColorPalette);
       
  8829 
       
  8830 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-background-color.js
       
  8831 
       
  8832 
       
  8833 
       
  8834 /**
       
  8835  * WordPress dependencies
       
  8836  */
       
  8837 
       
  8838 
       
  8839 /**
       
  8840  * Internal dependencies
       
  8841  */
       
  8842 
       
  8843 
       
  8844 
       
  8845 
       
  8846 function ScreenBackgroundColor(_ref) {
       
  8847   let {
       
  8848     name
       
  8849   } = _ref;
       
  8850   const supports = getSupportedGlobalStylesPanels(name);
       
  8851   const [solids] = useSetting('color.palette', name);
       
  8852   const [gradients] = useSetting('color.gradients', name);
       
  8853   const [areCustomSolidsEnabled] = useSetting('color.custom', name);
       
  8854   const [areCustomGradientsEnabled] = useSetting('color.customGradient', name);
       
  8855   const colorsPerOrigin = useColorsPerOrigin(name);
       
  8856   const gradientsPerOrigin = useGradientsPerOrigin(name);
       
  8857   const [isBackgroundEnabled] = useSetting('color.background', name);
       
  8858   const hasBackgroundColor = supports.includes('backgroundColor') && isBackgroundEnabled && (solids.length > 0 || areCustomSolidsEnabled);
       
  8859   const hasGradientColor = supports.includes('background') && (gradients.length > 0 || areCustomGradientsEnabled);
       
  8860   const [backgroundColor, setBackgroundColor] = useStyle('color.background', name);
       
  8861   const [userBackgroundColor] = useStyle('color.background', name, 'user');
       
  8862   const [gradient, setGradient] = useStyle('color.gradient', name);
       
  8863   const [userGradient] = useStyle('color.gradient', name, 'user');
       
  8864 
       
  8865   if (!hasBackgroundColor && !hasGradientColor) {
       
  8866     return null;
       
  8867   }
       
  8868 
       
  8869   let backgroundSettings = {};
       
  8870 
       
  8871   if (hasBackgroundColor) {
       
  8872     backgroundSettings = {
       
  8873       colorValue: backgroundColor,
       
  8874       onColorChange: setBackgroundColor
       
  8875     };
       
  8876 
       
  8877     if (backgroundColor) {
       
  8878       backgroundSettings.clearable = backgroundColor === userBackgroundColor;
       
  8879     }
       
  8880   }
       
  8881 
       
  8882   let gradientSettings = {};
       
  8883 
       
  8884   if (hasGradientColor) {
       
  8885     gradientSettings = {
       
  8886       gradientValue: gradient,
       
  8887       onGradientChange: setGradient
       
  8888     };
       
  8889 
       
  8890     if (gradient) {
       
  8891       gradientSettings.clearable = gradient === userGradient;
       
  8892     }
       
  8893   }
       
  8894 
       
  8895   const controlProps = { ...backgroundSettings,
       
  8896     ...gradientSettings
       
  8897   };
       
  8898   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8899     title: (0,external_wp_i18n_namespaceObject.__)('Background'),
       
  8900     description: (0,external_wp_i18n_namespaceObject.__)('Set a background color or gradient for the whole site.')
       
  8901   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientControl, extends_extends({
       
  8902     className: "edit-site-screen-background-color__control",
       
  8903     colors: colorsPerOrigin,
       
  8904     gradients: gradientsPerOrigin,
       
  8905     disableCustomColors: !areCustomSolidsEnabled,
       
  8906     disableCustomGradients: !areCustomGradientsEnabled,
       
  8907     __experimentalHasMultipleOrigins: true,
       
  8908     showTitle: false,
       
  8909     enableAlpha: true,
       
  8910     __experimentalIsRenderedInSidebar: true
       
  8911   }, controlProps)));
       
  8912 }
       
  8913 
       
  8914 /* harmony default export */ var screen_background_color = (ScreenBackgroundColor);
       
  8915 
       
  8916 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-text-color.js
       
  8917 
       
  8918 
       
  8919 /**
       
  8920  * WordPress dependencies
       
  8921  */
       
  8922 
       
  8923 
       
  8924 /**
       
  8925  * Internal dependencies
       
  8926  */
       
  8927 
       
  8928 
       
  8929 
       
  8930 
       
  8931 function ScreenTextColor(_ref) {
       
  8932   let {
       
  8933     name
       
  8934   } = _ref;
       
  8935   const supports = getSupportedGlobalStylesPanels(name);
       
  8936   const [solids] = useSetting('color.palette', name);
       
  8937   const [areCustomSolidsEnabled] = useSetting('color.custom', name);
       
  8938   const [isTextEnabled] = useSetting('color.text', name);
       
  8939   const colorsPerOrigin = useColorsPerOrigin(name);
       
  8940   const hasTextColor = supports.includes('color') && isTextEnabled && (solids.length > 0 || areCustomSolidsEnabled);
       
  8941   const [color, setColor] = useStyle('color.text', name);
       
  8942   const [userColor] = useStyle('color.text', name, 'user');
       
  8943 
       
  8944   if (!hasTextColor) {
       
  8945     return null;
       
  8946   }
       
  8947 
       
  8948   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  8949     title: (0,external_wp_i18n_namespaceObject.__)('Text'),
       
  8950     description: (0,external_wp_i18n_namespaceObject.__)('Set the default color used for text across the site.')
       
  8951   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientControl, {
       
  8952     className: "edit-site-screen-text-color__control",
       
  8953     colors: colorsPerOrigin,
       
  8954     disableCustomColors: !areCustomSolidsEnabled,
       
  8955     __experimentalHasMultipleOrigins: true,
       
  8956     showTitle: false,
       
  8957     enableAlpha: true,
       
  8958     __experimentalIsRenderedInSidebar: true,
       
  8959     colorValue: color,
       
  8960     onColorChange: setColor,
       
  8961     clearable: color === userColor
       
  8962   }));
       
  8963 }
       
  8964 
       
  8965 /* harmony default export */ var screen_text_color = (ScreenTextColor);
       
  8966 
       
  8967 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-link-color.js
       
  8968 
       
  8969 
       
  8970 /**
       
  8971  * WordPress dependencies
       
  8972  */
       
  8973 
       
  8974 
       
  8975 /**
       
  8976  * Internal dependencies
       
  8977  */
       
  8978 
       
  8979 
       
  8980 
       
  8981 
       
  8982 function ScreenLinkColor(_ref) {
       
  8983   let {
       
  8984     name
       
  8985   } = _ref;
       
  8986   const supports = getSupportedGlobalStylesPanels(name);
       
  8987   const [solids] = useSetting('color.palette', name);
       
  8988   const [areCustomSolidsEnabled] = useSetting('color.custom', name);
       
  8989   const colorsPerOrigin = useColorsPerOrigin(name);
       
  8990   const [isLinkEnabled] = useSetting('color.link', name);
       
  8991   const hasLinkColor = supports.includes('linkColor') && isLinkEnabled && (solids.length > 0 || areCustomSolidsEnabled);
       
  8992   const [linkColor, setLinkColor] = useStyle('elements.link.color.text', name);
       
  8993   const [userLinkColor] = useStyle('elements.link.color.text', name, 'user');
       
  8994 
       
  8995   if (!hasLinkColor) {
       
  8996     return null;
       
  8997   }
       
  8998 
       
  8999   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  9000     title: (0,external_wp_i18n_namespaceObject.__)('Links'),
       
  9001     description: (0,external_wp_i18n_namespaceObject.__)('Set the default color used for links across the site.')
       
  9002   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientControl, {
       
  9003     className: "edit-site-screen-link-color__control",
       
  9004     colors: colorsPerOrigin,
       
  9005     disableCustomColors: !areCustomSolidsEnabled,
       
  9006     __experimentalHasMultipleOrigins: true,
       
  9007     showTitle: false,
       
  9008     enableAlpha: true,
       
  9009     __experimentalIsRenderedInSidebar: true,
       
  9010     colorValue: linkColor,
       
  9011     onColorChange: setLinkColor,
       
  9012     clearable: linkColor === userLinkColor
       
  9013   }));
       
  9014 }
       
  9015 
       
  9016 /* harmony default export */ var screen_link_color = (ScreenLinkColor);
       
  9017 
       
  9018 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-layout.js
       
  9019 
       
  9020 
       
  9021 /**
       
  9022  * WordPress dependencies
       
  9023  */
       
  9024 
       
  9025 /**
       
  9026  * Internal dependencies
       
  9027  */
       
  9028 
       
  9029 
       
  9030 
       
  9031 
       
  9032 
       
  9033 function ScreenLayout(_ref) {
       
  9034   let {
       
  9035     name
       
  9036   } = _ref;
       
  9037   const hasBorderPanel = useHasBorderPanel(name);
       
  9038   const hasDimensionsPanel = useHasDimensionsPanel(name);
       
  9039   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  9040     title: (0,external_wp_i18n_namespaceObject.__)('Layout')
       
  9041   }), hasDimensionsPanel && (0,external_wp_element_namespaceObject.createElement)(DimensionsPanel, {
       
  9042     name: name
       
  9043   }), hasBorderPanel && (0,external_wp_element_namespaceObject.createElement)(BorderPanel, {
       
  9044     name: name
       
  9045   }));
       
  9046 }
       
  9047 
       
  9048 /* harmony default export */ var screen_layout = (ScreenLayout);
       
  9049 
       
  9050 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/global-styles-provider.js
       
  9051 
       
  9052 
       
  9053 /**
       
  9054  * External dependencies
       
  9055  */
       
  9056 
       
  9057 /**
       
  9058  * WordPress dependencies
       
  9059  */
       
  9060 
       
  9061 
       
  9062 
       
  9063 
       
  9064 /**
       
  9065  * Internal dependencies
       
  9066  */
       
  9067 
       
  9068 
       
  9069 
       
  9070 function mergeTreesCustomizer(_, srcValue) {
       
  9071   // We only pass as arrays the presets,
       
  9072   // in which case we want the new array of values
       
  9073   // to override the old array (no merging).
       
  9074   if (Array.isArray(srcValue)) {
       
  9075     return srcValue;
       
  9076   }
       
  9077 }
       
  9078 
       
  9079 function mergeBaseAndUserConfigs(base, user) {
       
  9080   return (0,external_lodash_namespaceObject.mergeWith)({}, base, user, mergeTreesCustomizer);
       
  9081 }
       
  9082 
       
  9083 const cleanEmptyObject = object => {
       
  9084   if (!(0,external_lodash_namespaceObject.isObject)(object) || Array.isArray(object)) {
       
  9085     return object;
       
  9086   }
       
  9087 
       
  9088   const cleanedNestedObjects = (0,external_lodash_namespaceObject.pickBy)((0,external_lodash_namespaceObject.mapValues)(object, cleanEmptyObject), external_lodash_namespaceObject.identity);
       
  9089   return (0,external_lodash_namespaceObject.isEmpty)(cleanedNestedObjects) ? undefined : cleanedNestedObjects;
       
  9090 };
       
  9091 
       
  9092 function useGlobalStylesUserConfig() {
       
  9093   const {
       
  9094     globalStylesId,
       
  9095     settings,
       
  9096     styles
       
  9097   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9098     const _globalStylesId = select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentGlobalStylesId();
       
  9099 
       
  9100     const record = _globalStylesId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('root', 'globalStyles', _globalStylesId) : undefined;
       
  9101     return {
       
  9102       globalStylesId: _globalStylesId,
       
  9103       settings: record === null || record === void 0 ? void 0 : record.settings,
       
  9104       styles: record === null || record === void 0 ? void 0 : record.styles
       
  9105     };
       
  9106   }, []);
       
  9107   const {
       
  9108     getEditedEntityRecord
       
  9109   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store);
       
  9110   const {
       
  9111     editEntityRecord
       
  9112   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
  9113   const config = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  9114     return {
       
  9115       settings: settings !== null && settings !== void 0 ? settings : {},
       
  9116       styles: styles !== null && styles !== void 0 ? styles : {}
       
  9117     };
       
  9118   }, [settings, styles]);
       
  9119   const setConfig = (0,external_wp_element_namespaceObject.useCallback)(callback => {
       
  9120     var _record$styles, _record$settings;
       
  9121 
       
  9122     const record = getEditedEntityRecord('root', 'globalStyles', globalStylesId);
       
  9123     const currentConfig = {
       
  9124       styles: (_record$styles = record === null || record === void 0 ? void 0 : record.styles) !== null && _record$styles !== void 0 ? _record$styles : {},
       
  9125       settings: (_record$settings = record === null || record === void 0 ? void 0 : record.settings) !== null && _record$settings !== void 0 ? _record$settings : {}
       
  9126     };
       
  9127     const updatedConfig = callback(currentConfig);
       
  9128     editEntityRecord('root', 'globalStyles', globalStylesId, {
       
  9129       styles: cleanEmptyObject(updatedConfig.styles) || {},
       
  9130       settings: cleanEmptyObject(updatedConfig.settings) || {}
       
  9131     });
       
  9132   }, [globalStylesId]);
       
  9133   return [!!settings || !!styles, config, setConfig];
       
  9134 }
       
  9135 
       
  9136 function useGlobalStylesBaseConfig() {
       
  9137   const baseConfig = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9138     return select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeBaseGlobalStyles();
       
  9139   }, []);
       
  9140   return [!!baseConfig, baseConfig];
       
  9141 }
       
  9142 
       
  9143 function useGlobalStylesContext() {
       
  9144   const [isUserConfigReady, userConfig, setUserConfig] = useGlobalStylesUserConfig();
       
  9145   const [isBaseConfigReady, baseConfig] = useGlobalStylesBaseConfig();
       
  9146   const mergedConfig = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  9147     if (!baseConfig || !userConfig) {
       
  9148       return {};
       
  9149     }
       
  9150 
       
  9151     return mergeBaseAndUserConfigs(baseConfig, userConfig);
       
  9152   }, [userConfig, baseConfig]);
       
  9153   const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  9154     return {
       
  9155       isReady: isUserConfigReady && isBaseConfigReady,
       
  9156       user: userConfig,
       
  9157       base: baseConfig,
       
  9158       merged: mergedConfig,
       
  9159       setUserConfig
       
  9160     };
       
  9161   }, [mergedConfig, userConfig, baseConfig, setUserConfig, isUserConfigReady, isBaseConfigReady]);
       
  9162   return context;
       
  9163 }
       
  9164 
       
  9165 function GlobalStylesProvider(_ref) {
       
  9166   let {
       
  9167     children
       
  9168   } = _ref;
       
  9169   const context = useGlobalStylesContext();
       
  9170 
       
  9171   if (!context.isReady) {
       
  9172     return null;
       
  9173   }
       
  9174 
       
  9175   return (0,external_wp_element_namespaceObject.createElement)(GlobalStylesContext.Provider, {
       
  9176     value: context
       
  9177   }, children);
       
  9178 }
       
  9179 
       
  9180 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-style-variations.js
       
  9181 
       
  9182 
       
  9183 /**
       
  9184  * External dependencies
       
  9185  */
       
  9186 
       
  9187 
       
  9188 /**
       
  9189  * WordPress dependencies
       
  9190  */
       
  9191 
       
  9192 
       
  9193 
       
  9194 
       
  9195 
       
  9196 
       
  9197 
       
  9198 /**
       
  9199  * Internal dependencies
       
  9200  */
       
  9201 
       
  9202 
       
  9203 
       
  9204 
       
  9205 
       
  9206 
       
  9207 function compareVariations(a, b) {
       
  9208   return (0,external_lodash_namespaceObject.isEqual)(a.styles, b.styles) && (0,external_lodash_namespaceObject.isEqual)(a.settings, b.settings);
       
  9209 }
       
  9210 
       
  9211 function Variation(_ref) {
       
  9212   let {
       
  9213     variation
       
  9214   } = _ref;
       
  9215   const [isFocused, setIsFocused] = (0,external_wp_element_namespaceObject.useState)(false);
       
  9216   const {
       
  9217     base,
       
  9218     user,
       
  9219     setUserConfig
       
  9220   } = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
       
  9221   const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  9222     var _variation$settings, _variation$styles;
       
  9223 
       
  9224     return {
       
  9225       user: {
       
  9226         settings: (_variation$settings = variation.settings) !== null && _variation$settings !== void 0 ? _variation$settings : {},
       
  9227         styles: (_variation$styles = variation.styles) !== null && _variation$styles !== void 0 ? _variation$styles : {}
       
  9228       },
       
  9229       base,
       
  9230       merged: mergeBaseAndUserConfigs(base, variation),
       
  9231       setUserConfig: () => {}
       
  9232     };
       
  9233   }, [variation, base]);
       
  9234 
       
  9235   const selectVariation = () => {
       
  9236     setUserConfig(() => {
       
  9237       return {
       
  9238         settings: variation.settings,
       
  9239         styles: variation.styles
       
  9240       };
       
  9241     });
       
  9242   };
       
  9243 
       
  9244   const selectOnEnter = event => {
       
  9245     if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER) {
       
  9246       event.preventDefault();
       
  9247       selectVariation();
       
  9248     }
       
  9249   };
       
  9250 
       
  9251   const isActive = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  9252     return compareVariations(user, variation);
       
  9253   }, [user, variation]);
       
  9254   return (0,external_wp_element_namespaceObject.createElement)(GlobalStylesContext.Provider, {
       
  9255     value: context
       
  9256   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  9257     className: classnames_default()('edit-site-global-styles-variations_item', {
       
  9258       'is-active': isActive
       
  9259     }),
       
  9260     role: "button",
       
  9261     onClick: selectVariation,
       
  9262     onKeyDown: selectOnEnter,
       
  9263     tabIndex: "0",
       
  9264     "aria-label": variation === null || variation === void 0 ? void 0 : variation.title,
       
  9265     onFocus: () => setIsFocused(true),
       
  9266     onBlur: () => setIsFocused(false)
       
  9267   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  9268     className: "edit-site-global-styles-variations_item-preview"
       
  9269   }, (0,external_wp_element_namespaceObject.createElement)(preview, {
       
  9270     label: variation === null || variation === void 0 ? void 0 : variation.title,
       
  9271     isFocused: isFocused
       
  9272   }))));
       
  9273 }
       
  9274 
       
  9275 function ScreenStyleVariations() {
       
  9276   const {
       
  9277     variations
       
  9278   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9279     return {
       
  9280       variations: select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations()
       
  9281     };
       
  9282   }, []);
       
  9283   const withEmptyVariation = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
  9284     return [{
       
  9285       title: (0,external_wp_i18n_namespaceObject.__)('Default'),
       
  9286       settings: {},
       
  9287       styles: {}
       
  9288     }, ...variations];
       
  9289   }, [variations]);
       
  9290   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(header, {
       
  9291     back: "/",
       
  9292     title: (0,external_wp_i18n_namespaceObject.__)('Browse styles'),
       
  9293     description: (0,external_wp_i18n_namespaceObject.__)('Choose a different style combination for the theme styles')
       
  9294   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Card, {
       
  9295     size: "small",
       
  9296     isBorderless: true
       
  9297   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CardBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalGrid, {
       
  9298     columns: 2
       
  9299   }, withEmptyVariation === null || withEmptyVariation === void 0 ? void 0 : withEmptyVariation.map((variation, index) => (0,external_wp_element_namespaceObject.createElement)(Variation, {
       
  9300     key: index,
       
  9301     variation: variation
       
  9302   }))))));
       
  9303 }
       
  9304 
       
  9305 /* harmony default export */ var screen_style_variations = (ScreenStyleVariations);
       
  9306 
       
  9307 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/ui.js
       
  9308 
       
  9309 
       
  9310 
       
  9311 /**
       
  9312  * WordPress dependencies
       
  9313  */
       
  9314 
       
  9315 
       
  9316 /**
       
  9317  * Internal dependencies
       
  9318  */
       
  9319 
       
  9320 
       
  9321 
       
  9322 
       
  9323 
       
  9324 
       
  9325 
       
  9326 
       
  9327 
       
  9328 
       
  9329 
       
  9330 
       
  9331 
       
  9332 
       
  9333 function GlobalStylesNavigationScreen(_ref) {
       
  9334   let {
       
  9335     className,
       
  9336     ...props
       
  9337   } = _ref;
       
  9338   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, extends_extends({
       
  9339     className: ['edit-site-global-styles-sidebar__navigator-screen', className].filter(Boolean).join(' ')
       
  9340   }, props));
       
  9341 }
       
  9342 
       
  9343 function ContextScreens(_ref2) {
       
  9344   let {
       
  9345     name
       
  9346   } = _ref2;
       
  9347   const parentMenu = name === undefined ? '' : '/blocks/' + name;
       
  9348   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9349     path: parentMenu + '/typography'
       
  9350   }, (0,external_wp_element_namespaceObject.createElement)(screen_typography, {
       
  9351     name: name
       
  9352   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9353     path: parentMenu + '/typography/text'
       
  9354   }, (0,external_wp_element_namespaceObject.createElement)(screen_typography_element, {
       
  9355     name: name,
       
  9356     element: "text"
       
  9357   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9358     path: parentMenu + '/typography/link'
       
  9359   }, (0,external_wp_element_namespaceObject.createElement)(screen_typography_element, {
       
  9360     name: name,
       
  9361     element: "link"
       
  9362   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9363     path: parentMenu + '/colors'
       
  9364   }, (0,external_wp_element_namespaceObject.createElement)(screen_colors, {
       
  9365     name: name
       
  9366   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9367     path: parentMenu + '/colors/palette'
       
  9368   }, (0,external_wp_element_namespaceObject.createElement)(screen_color_palette, {
       
  9369     name: name
       
  9370   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9371     path: parentMenu + '/colors/background'
       
  9372   }, (0,external_wp_element_namespaceObject.createElement)(screen_background_color, {
       
  9373     name: name
       
  9374   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9375     path: parentMenu + '/colors/text'
       
  9376   }, (0,external_wp_element_namespaceObject.createElement)(screen_text_color, {
       
  9377     name: name
       
  9378   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9379     path: parentMenu + '/colors/link'
       
  9380   }, (0,external_wp_element_namespaceObject.createElement)(screen_link_color, {
       
  9381     name: name
       
  9382   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9383     path: parentMenu + '/layout'
       
  9384   }, (0,external_wp_element_namespaceObject.createElement)(screen_layout, {
       
  9385     name: name
       
  9386   })));
       
  9387 }
       
  9388 
       
  9389 function GlobalStylesUI() {
       
  9390   const blocks = (0,external_wp_blocks_namespaceObject.getBlockTypes)();
       
  9391   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorProvider, {
       
  9392     className: "edit-site-global-styles-sidebar__navigator-provider",
       
  9393     initialPath: "/"
       
  9394   }, (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9395     path: "/"
       
  9396   }, (0,external_wp_element_namespaceObject.createElement)(screen_root, null)), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9397     path: "/variations"
       
  9398   }, (0,external_wp_element_namespaceObject.createElement)(screen_style_variations, null)), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9399     path: "/blocks"
       
  9400   }, (0,external_wp_element_namespaceObject.createElement)(screen_block_list, null)), blocks.map(block => (0,external_wp_element_namespaceObject.createElement)(GlobalStylesNavigationScreen, {
       
  9401     key: 'menu-block-' + block.name,
       
  9402     path: '/blocks/' + block.name
       
  9403   }, (0,external_wp_element_namespaceObject.createElement)(screen_block, {
       
  9404     name: block.name
       
  9405   }))), (0,external_wp_element_namespaceObject.createElement)(ContextScreens, null), blocks.map(block => (0,external_wp_element_namespaceObject.createElement)(ContextScreens, {
       
  9406     key: 'screens-block-' + block.name,
       
  9407     name: block.name
       
  9408   })));
       
  9409 }
       
  9410 
       
  9411 /* harmony default export */ var ui = (GlobalStylesUI);
       
  9412 
       
  9413 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/index.js
       
  9414 
       
  9415 
       
  9416 
       
  9417 
       
  9418 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/global-styles-sidebar.js
       
  9419 
       
  9420 
       
  9421 /**
       
  9422  * WordPress dependencies
       
  9423  */
       
  9424 
       
  9425 
       
  9426 
       
  9427 
       
  9428 
       
  9429 /**
       
  9430  * Internal dependencies
       
  9431  */
       
  9432 
       
  9433 
       
  9434 
       
  9435 function GlobalStylesSidebar() {
       
  9436   const [canReset, onReset] = useGlobalStylesReset();
       
  9437   const {
       
  9438     toggle
       
  9439   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
  9440   return (0,external_wp_element_namespaceObject.createElement)(default_sidebar_DefaultSidebar, {
       
  9441     className: "edit-site-global-styles-sidebar",
       
  9442     identifier: "edit-site/global-styles",
       
  9443     title: (0,external_wp_i18n_namespaceObject.__)('Styles'),
       
  9444     icon: library_styles,
       
  9445     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close global styles sidebar'),
       
  9446     panelClassName: "edit-site-global-styles-sidebar__panel",
       
  9447     header: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexBlock, null, (0,external_wp_element_namespaceObject.createElement)("strong", null, (0,external_wp_i18n_namespaceObject.__)('Styles')), (0,external_wp_element_namespaceObject.createElement)("span", {
       
  9448       className: "edit-site-global-styles-sidebar__beta"
       
  9449     }, (0,external_wp_i18n_namespaceObject.__)('Beta'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, {
       
  9450       icon: more_vertical,
       
  9451       label: (0,external_wp_i18n_namespaceObject.__)('More Global Styles Actions'),
       
  9452       controls: [{
       
  9453         title: (0,external_wp_i18n_namespaceObject.__)('Reset to defaults'),
       
  9454         onClick: onReset,
       
  9455         isDisabled: !canReset
       
  9456       }, {
       
  9457         title: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide'),
       
  9458         onClick: () => toggle('core/edit-site', 'welcomeGuideStyles')
       
  9459       }]
       
  9460     })))
       
  9461   }, (0,external_wp_element_namespaceObject.createElement)(ui, null));
       
  9462 }
       
  9463 
       
  9464 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/navigation-menu-sidebar/navigation-menu.js
       
  9465 
       
  9466 
       
  9467 /**
       
  9468  * WordPress dependencies
       
  9469  */
       
  9470 
       
  9471 
       
  9472 
       
  9473 const ALLOWED_BLOCKS = {
       
  9474   'core/navigation': ['core/navigation-link', 'core/search', 'core/social-links', 'core/page-list', 'core/spacer', 'core/home-link', 'core/site-title', 'core/site-logo', 'core/navigation-submenu'],
       
  9475   'core/social-links': ['core/social-link'],
       
  9476   'core/navigation-submenu': ['core/navigation-link', 'core/navigation-submenu'],
       
  9477   'core/navigation-link': ['core/navigation-link', 'core/navigation-submenu']
       
  9478 };
       
  9479 function navigation_menu_NavigationMenu(_ref) {
       
  9480   let {
       
  9481     innerBlocks,
       
  9482     id
       
  9483   } = _ref;
       
  9484   const {
       
  9485     updateBlockListSettings
       
  9486   } = useDispatch(blockEditorStore); //TODO: Block settings are normally updated as a side effect of rendering InnerBlocks in BlockList
       
  9487   //Think through a better way of doing this, possible with adding allowed blocks to block library metadata
       
  9488 
       
  9489   useEffect(() => {
       
  9490     updateBlockListSettings('', {
       
  9491       allowedBlocks: ALLOWED_BLOCKS['core/navigation']
       
  9492     });
       
  9493     innerBlocks.forEach(block => {
       
  9494       if (ALLOWED_BLOCKS[block.name]) {
       
  9495         updateBlockListSettings(block.clientId, {
       
  9496           allowedBlocks: ALLOWED_BLOCKS[block.name]
       
  9497         });
       
  9498       }
       
  9499     });
       
  9500   }, [updateBlockListSettings, innerBlocks]);
       
  9501   return createElement(Fragment, null, createElement(ListView, {
       
  9502     id: id,
       
  9503     showNestedBlocks: true,
       
  9504     expandNested: false,
       
  9505     __experimentalFeatures: true,
       
  9506     __experimentalPersistentListViewFeatures: true
       
  9507   }));
       
  9508 }
       
  9509 
       
  9510 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/navigation-menu-sidebar/navigation-inspector.js
       
  9511 
       
  9512 
       
  9513 /**
       
  9514  * WordPress dependencies
       
  9515  */
       
  9516 
       
  9517 
       
  9518 
       
  9519 
       
  9520 
       
  9521 
       
  9522 
       
  9523 
       
  9524 /**
       
  9525  * Internal dependencies
       
  9526  */
       
  9527 
       
  9528 
       
  9529 const NAVIGATION_MENUS_QUERY = [{
       
  9530   per_page: -1,
       
  9531   status: 'publish'
       
  9532 }];
       
  9533 function navigation_inspector_NavigationInspector() {
       
  9534   var _navigationMenus$;
       
  9535 
       
  9536   const {
       
  9537     selectedNavigationBlockId,
       
  9538     clientIdToRef,
       
  9539     navigationMenus,
       
  9540     isResolvingNavigationMenus,
       
  9541     hasResolvedNavigationMenus,
       
  9542     firstNavigationBlockId
       
  9543   } = useSelect(select => {
       
  9544     const {
       
  9545       __experimentalGetActiveBlockIdByBlockNames,
       
  9546       __experimentalGetGlobalBlocksByName,
       
  9547       getBlock
       
  9548     } = select(blockEditorStore);
       
  9549     const {
       
  9550       getEntityRecords,
       
  9551       hasFinishedResolution,
       
  9552       isResolving
       
  9553     } = select(coreStore);
       
  9554     const navigationMenusQuery = ['postType', 'wp_navigation', NAVIGATION_MENUS_QUERY[0]]; // Get the active Navigation block (if present).
       
  9555 
       
  9556     const selectedNavId = __experimentalGetActiveBlockIdByBlockNames('core/navigation'); // Get all Navigation blocks currently within the editor canvas.
       
  9557 
       
  9558 
       
  9559     const navBlockIds = __experimentalGetGlobalBlocksByName('core/navigation');
       
  9560 
       
  9561     const idToRef = {};
       
  9562     navBlockIds.forEach(id => {
       
  9563       var _getBlock, _getBlock$attributes;
       
  9564 
       
  9565       idToRef[id] = (_getBlock = getBlock(id)) === null || _getBlock === void 0 ? void 0 : (_getBlock$attributes = _getBlock.attributes) === null || _getBlock$attributes === void 0 ? void 0 : _getBlock$attributes.ref;
       
  9566     });
       
  9567     return {
       
  9568       selectedNavigationBlockId: selectedNavId,
       
  9569       firstNavigationBlockId: navBlockIds === null || navBlockIds === void 0 ? void 0 : navBlockIds[0],
       
  9570       clientIdToRef: idToRef,
       
  9571       navigationMenus: getEntityRecords(...navigationMenusQuery),
       
  9572       isResolvingNavigationMenus: isResolving('getEntityRecords', navigationMenusQuery),
       
  9573       hasResolvedNavigationMenus: hasFinishedResolution('getEntityRecords', navigationMenusQuery)
       
  9574     };
       
  9575   }, []);
       
  9576   const navMenuListId = useInstanceId(NavigationMenu, 'edit-site-navigation-inspector-menu');
       
  9577   const firstNavRefInTemplate = clientIdToRef[firstNavigationBlockId];
       
  9578   const firstNavigationMenuRef = navigationMenus === null || navigationMenus === void 0 ? void 0 : (_navigationMenus$ = navigationMenus[0]) === null || _navigationMenus$ === void 0 ? void 0 : _navigationMenus$.id; // Default Navigation Menu is either:
       
  9579   // - the Navigation Menu referenced by the first Nav block within the template.
       
  9580   // - the first of the available Navigation Menus (`wp_navigation`) posts.
       
  9581 
       
  9582   const defaultNavigationMenuId = firstNavRefInTemplate || firstNavigationMenuRef; // The Navigation Menu manually selected by the user within the Nav inspector.
       
  9583 
       
  9584   const [currentMenuId, setCurrentMenuId] = useState(firstNavRefInTemplate); // If a Nav block is selected within the canvas then set the
       
  9585   // Navigation Menu referenced by it's `ref` attribute  to be
       
  9586   // active within the Navigation sidebar.
       
  9587 
       
  9588   useEffect(() => {
       
  9589     if (selectedNavigationBlockId) {
       
  9590       setCurrentMenuId(clientIdToRef[selectedNavigationBlockId]);
       
  9591     }
       
  9592   }, [selectedNavigationBlockId]);
       
  9593   let options = [];
       
  9594 
       
  9595   if (navigationMenus) {
       
  9596     options = navigationMenus.map(_ref => {
       
  9597       let {
       
  9598         id,
       
  9599         title
       
  9600       } = _ref;
       
  9601       return {
       
  9602         value: id,
       
  9603         label: title.rendered
       
  9604       };
       
  9605     });
       
  9606   }
       
  9607 
       
  9608   const [innerBlocks, onInput, onChange] = useEntityBlockEditor('postType', 'wp_navigation', {
       
  9609     id: currentMenuId || defaultNavigationMenuId
       
  9610   });
       
  9611   const {
       
  9612     isLoadingInnerBlocks,
       
  9613     hasLoadedInnerBlocks
       
  9614   } = useSelect(select => {
       
  9615     const {
       
  9616       isResolving,
       
  9617       hasFinishedResolution
       
  9618     } = select(coreStore);
       
  9619     return {
       
  9620       isLoadingInnerBlocks: isResolving('getEntityRecord', ['postType', 'wp_navigation', currentMenuId || defaultNavigationMenuId]),
       
  9621       hasLoadedInnerBlocks: hasFinishedResolution('getEntityRecord', ['postType', 'wp_navigation', currentMenuId || defaultNavigationMenuId])
       
  9622     };
       
  9623   }, [currentMenuId, defaultNavigationMenuId]);
       
  9624   const isLoading = !(hasResolvedNavigationMenus && hasLoadedInnerBlocks);
       
  9625   const hasMoreThanOneNavigationMenu = (navigationMenus === null || navigationMenus === void 0 ? void 0 : navigationMenus.length) > 1;
       
  9626   const hasNavigationMenus = !!(navigationMenus !== null && navigationMenus !== void 0 && navigationMenus.length); // Entity block editor will return entities that are not currently published.
       
  9627   // Guard by only allowing their usage if there are published Nav Menus.
       
  9628 
       
  9629   const publishedInnerBlocks = hasNavigationMenus ? innerBlocks : [];
       
  9630   const hasInnerBlocks = !!(publishedInnerBlocks !== null && publishedInnerBlocks !== void 0 && publishedInnerBlocks.length);
       
  9631   useEffect(() => {
       
  9632     if (isResolvingNavigationMenus) {
       
  9633       speak('Loading Navigation sidebar menus.');
       
  9634     }
       
  9635 
       
  9636     if (hasResolvedNavigationMenus) {
       
  9637       speak('Navigation sidebar menus have loaded.');
       
  9638     }
       
  9639   }, [isResolvingNavigationMenus, hasResolvedNavigationMenus]);
       
  9640   useEffect(() => {
       
  9641     if (isLoadingInnerBlocks) {
       
  9642       speak('Loading Navigation sidebar selected menu items.');
       
  9643     }
       
  9644 
       
  9645     if (hasLoadedInnerBlocks) {
       
  9646       speak('Navigation sidebar selected menu items have loaded.');
       
  9647     }
       
  9648   }, [isLoadingInnerBlocks, hasLoadedInnerBlocks]);
       
  9649   return createElement("div", {
       
  9650     className: "edit-site-navigation-inspector"
       
  9651   }, hasResolvedNavigationMenus && !hasNavigationMenus && createElement("p", {
       
  9652     className: "edit-site-navigation-inspector__empty-msg"
       
  9653   }, __('There are no Navigation Menus.')), !hasResolvedNavigationMenus && createElement("div", {
       
  9654     className: "edit-site-navigation-inspector__placeholder"
       
  9655   }), hasResolvedNavigationMenus && hasMoreThanOneNavigationMenu && createElement(SelectControl, {
       
  9656     "aria-controls": // aria-controls should only apply when referenced element is in DOM
       
  9657     hasLoadedInnerBlocks ? navMenuListId : undefined,
       
  9658     value: currentMenuId || defaultNavigationMenuId,
       
  9659     options: options,
       
  9660     onChange: newMenuId => setCurrentMenuId(Number(newMenuId))
       
  9661   }), isLoading && createElement(Fragment, null, createElement("div", {
       
  9662     className: "edit-site-navigation-inspector__placeholder is-child"
       
  9663   }), createElement("div", {
       
  9664     className: "edit-site-navigation-inspector__placeholder is-child"
       
  9665   }), createElement("div", {
       
  9666     className: "edit-site-navigation-inspector__placeholder is-child"
       
  9667   })), hasInnerBlocks && !isLoading && createElement(BlockEditorProvider, {
       
  9668     value: publishedInnerBlocks,
       
  9669     onChange: onChange,
       
  9670     onInput: onInput
       
  9671   }, createElement(NavigationMenu, {
       
  9672     id: navMenuListId,
       
  9673     innerBlocks: publishedInnerBlocks
       
  9674   })), !hasInnerBlocks && !isLoading && createElement("p", {
       
  9675     className: "edit-site-navigation-inspector__empty-msg"
       
  9676   }, __('Navigation Menu is empty.')));
       
  9677 }
       
  9678 
       
  9679 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/navigation-menu-sidebar/index.js
       
  9680 
       
  9681 
       
  9682 /**
       
  9683  * WordPress dependencies
       
  9684  */
       
  9685 
       
  9686 
       
  9687 
       
  9688 /**
       
  9689  * Internal dependencies
       
  9690  */
       
  9691 
       
  9692 
       
  9693 
       
  9694 function NavigationMenuSidebar() {
       
  9695   return createElement(DefaultSidebar, {
       
  9696     className: "edit-site-navigation-menu-sidebar",
       
  9697     identifier: "edit-site/navigation-menu",
       
  9698     title: __('Navigation Menus'),
       
  9699     icon: navigation,
       
  9700     closeLabel: __('Close navigation menu sidebar'),
       
  9701     panelClassName: "edit-site-navigation-menu-sidebar__panel",
       
  9702     header: createElement(Flex, null, createElement(FlexBlock, null, createElement("strong", null, __('Navigation Menus'))))
       
  9703   }, createElement(NavigationInspector, null));
       
  9704 }
       
  9705 
       
  9706 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/constants.js
       
  9707 const SIDEBAR_TEMPLATE = 'edit-site/template';
       
  9708 const SIDEBAR_BLOCK = 'edit-site/block-inspector';
       
  9709 
       
  9710 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/settings-header/index.js
       
  9711 
       
  9712 
       
  9713 /**
       
  9714  * WordPress dependencies
       
  9715  */
       
  9716 
       
  9717 
       
  9718 
       
  9719 
       
  9720 /**
       
  9721  * Internal dependencies
       
  9722  */
       
  9723 
       
  9724 
       
  9725 
       
  9726 
       
  9727 const SettingsHeader = _ref => {
       
  9728   let {
       
  9729     sidebarName
       
  9730   } = _ref;
       
  9731   const {
       
  9732     enableComplementaryArea
       
  9733   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
  9734 
       
  9735   const openTemplateSettings = () => enableComplementaryArea(STORE_NAME, SIDEBAR_TEMPLATE);
       
  9736 
       
  9737   const openBlockSettings = () => enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
       
  9738 
       
  9739   const [templateAriaLabel, templateActiveClass] = sidebarName === SIDEBAR_TEMPLATE ? // translators: ARIA label for the Template sidebar tab, selected.
       
  9740   [(0,external_wp_i18n_namespaceObject.__)('Template (selected)'), 'is-active'] : // translators: ARIA label for the Template Settings Sidebar tab, not selected.
       
  9741   [(0,external_wp_i18n_namespaceObject.__)('Template'), ''];
       
  9742   const [blockAriaLabel, blockActiveClass] = sidebarName === SIDEBAR_BLOCK ? // translators: ARIA label for the Block Settings Sidebar tab, selected.
       
  9743   [(0,external_wp_i18n_namespaceObject.__)('Block (selected)'), 'is-active'] : // translators: ARIA label for the Block Settings Sidebar tab, not selected.
       
  9744   [(0,external_wp_i18n_namespaceObject.__)('Block'), ''];
       
  9745   /* Use a list so screen readers will announce how many tabs there are. */
       
  9746 
       
  9747   return (0,external_wp_element_namespaceObject.createElement)("ul", null, (0,external_wp_element_namespaceObject.createElement)("li", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  9748     onClick: openTemplateSettings,
       
  9749     className: `edit-site-sidebar__panel-tab ${templateActiveClass}`,
       
  9750     "aria-label": templateAriaLabel // translators: Data label for the Template Settings Sidebar tab.
       
  9751     ,
       
  9752     "data-label": (0,external_wp_i18n_namespaceObject.__)('Template')
       
  9753   }, // translators: Text label for the Template Settings Sidebar tab.
       
  9754   (0,external_wp_i18n_namespaceObject.__)('Template'))), (0,external_wp_element_namespaceObject.createElement)("li", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  9755     onClick: openBlockSettings,
       
  9756     className: `edit-site-sidebar__panel-tab ${blockActiveClass}`,
       
  9757     "aria-label": blockAriaLabel // translators: Data label for the Block Settings Sidebar tab.
       
  9758     ,
       
  9759     "data-label": (0,external_wp_i18n_namespaceObject.__)('Block')
       
  9760   }, // translators: Text label for the Block Settings Sidebar tab.
       
  9761   (0,external_wp_i18n_namespaceObject.__)('Block'))));
       
  9762 };
       
  9763 
       
  9764 /* harmony default export */ var settings_header = (SettingsHeader);
       
  9765 
       
  9766 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/template-card/template-areas.js
       
  9767 
       
  9768 
       
  9769 /**
       
  9770  * WordPress dependencies
       
  9771  */
       
  9772 
       
  9773 
       
  9774 
       
  9775 
       
  9776 
       
  9777 /**
       
  9778  * Internal dependencies
       
  9779  */
       
  9780 
       
  9781 
       
  9782 
       
  9783 function TemplateAreaItem(_ref) {
       
  9784   let {
       
  9785     area,
       
  9786     clientId
       
  9787   } = _ref;
       
  9788   const {
       
  9789     selectBlock,
       
  9790     toggleBlockHighlight
       
  9791   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
  9792   const templatePartArea = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9793     const defaultAreas = select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplatePartAreas();
       
  9794 
       
  9795     return defaultAreas.find(defaultArea => defaultArea.area === area);
       
  9796   }, [area]);
       
  9797 
       
  9798   const highlightBlock = () => toggleBlockHighlight(clientId, true);
       
  9799 
       
  9800   const cancelHighlightBlock = () => toggleBlockHighlight(clientId, false);
       
  9801 
       
  9802   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
  9803     className: "edit-site-template-card__template-areas-item",
       
  9804     icon: templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.icon,
       
  9805     onMouseOver: highlightBlock,
       
  9806     onMouseLeave: cancelHighlightBlock,
       
  9807     onFocus: highlightBlock,
       
  9808     onBlur: cancelHighlightBlock,
       
  9809     onClick: () => {
       
  9810       selectBlock(clientId);
       
  9811     }
       
  9812   }, templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.label);
       
  9813 }
       
  9814 
       
  9815 function template_areas_TemplateAreas() {
       
  9816   const templateParts = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getCurrentTemplateTemplateParts(), []);
       
  9817 
       
  9818   if (!templateParts.length) {
       
  9819     return null;
       
  9820   }
       
  9821 
       
  9822   return (0,external_wp_element_namespaceObject.createElement)("section", {
       
  9823     className: "edit-site-template-card__template-areas"
       
  9824   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
       
  9825     level: 3,
       
  9826     className: "edit-site-template-card__template-areas-title"
       
  9827   }, (0,external_wp_i18n_namespaceObject.__)('Areas')), (0,external_wp_element_namespaceObject.createElement)("ul", {
       
  9828     className: "edit-site-template-card__template-areas-list"
       
  9829   }, templateParts.map(_ref2 => {
       
  9830     let {
       
  9831       templatePart,
       
  9832       block
       
  9833     } = _ref2;
       
  9834     return (0,external_wp_element_namespaceObject.createElement)("li", {
       
  9835       key: templatePart.slug
       
  9836     }, (0,external_wp_element_namespaceObject.createElement)(TemplateAreaItem, {
       
  9837       area: templatePart.area,
       
  9838       clientId: block.clientId
       
  9839     }));
       
  9840   })));
       
  9841 }
       
  9842 
       
  9843 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/template-card/index.js
       
  9844 
       
  9845 
       
  9846 /**
       
  9847  * WordPress dependencies
       
  9848  */
       
  9849 
       
  9850 
       
  9851 
       
  9852 
       
  9853 /**
       
  9854  * Internal dependencies
       
  9855  */
       
  9856 
       
  9857 
       
  9858 
       
  9859 function TemplateCard() {
       
  9860   const {
       
  9861     title,
       
  9862     description,
       
  9863     icon
       
  9864   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9865     const {
       
  9866       getEditedPostType,
       
  9867       getEditedPostId
       
  9868     } = select(store_store);
       
  9869     const {
       
  9870       getEntityRecord
       
  9871     } = select(external_wp_coreData_namespaceObject.store);
       
  9872     const {
       
  9873       __experimentalGetTemplateInfo: getTemplateInfo
       
  9874     } = select(external_wp_editor_namespaceObject.store);
       
  9875     const postType = getEditedPostType();
       
  9876     const postId = getEditedPostId();
       
  9877     const record = getEntityRecord('postType', postType, postId);
       
  9878     const info = record ? getTemplateInfo(record) : {};
       
  9879     return info;
       
  9880   }, []);
       
  9881 
       
  9882   if (!title && !description) {
       
  9883     return null;
       
  9884   }
       
  9885 
       
  9886   return (0,external_wp_element_namespaceObject.createElement)("div", {
       
  9887     className: "edit-site-template-card"
       
  9888   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
       
  9889     className: "edit-site-template-card__icon",
       
  9890     icon: icon
       
  9891   }), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  9892     className: "edit-site-template-card__content"
       
  9893   }, (0,external_wp_element_namespaceObject.createElement)("h2", {
       
  9894     className: "edit-site-template-card__title"
       
  9895   }, title), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  9896     className: "edit-site-template-card__description"
       
  9897   }, description), (0,external_wp_element_namespaceObject.createElement)(template_areas_TemplateAreas, null)));
       
  9898 }
       
  9899 
       
  9900 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/index.js
       
  9901 
       
  9902 
       
  9903 /**
       
  9904  * WordPress dependencies
       
  9905  */
       
  9906 
       
  9907 
       
  9908 
       
  9909 
       
  9910 
       
  9911 
       
  9912 
       
  9913 /**
       
  9914  * Internal dependencies
       
  9915  */
       
  9916 
       
  9917 
       
  9918 
       
  9919 
       
  9920 
       
  9921 
       
  9922 
       
  9923 
       
  9924 const {
       
  9925   Slot: InspectorSlot,
       
  9926   Fill: InspectorFill
       
  9927 } = (0,external_wp_components_namespaceObject.createSlotFill)('EditSiteSidebarInspector');
       
  9928 const SidebarInspectorFill = InspectorFill;
       
  9929 function SidebarComplementaryAreaFills() {
       
  9930   const {
       
  9931     sidebar,
       
  9932     isEditorSidebarOpened,
       
  9933     hasBlockSelection
       
  9934   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9935     const _sidebar = select(store).getActiveComplementaryArea(STORE_NAME);
       
  9936 
       
  9937     const _isEditorSidebarOpened = [SIDEBAR_BLOCK, SIDEBAR_TEMPLATE].includes(_sidebar);
       
  9938 
       
  9939     return {
       
  9940       sidebar: _sidebar,
       
  9941       isEditorSidebarOpened: _isEditorSidebarOpened,
       
  9942       hasBlockSelection: !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart()
       
  9943     };
       
  9944   }, []);
       
  9945   const {
       
  9946     enableComplementaryArea
       
  9947   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  9424   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  9948   (0,external_wp_element_namespaceObject.useEffect)(() => {
  9425   (0,external_wp_element_namespaceObject.useEffect)(() => {
  9949     if (!isEditorSidebarOpened) return;
  9426     if (isReady) {
  9950 
  9427       setEditedEntity(postType, postId, context);
  9951     if (hasBlockSelection) {
       
  9952       enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
       
  9953     } else {
       
  9954       enableComplementaryArea(STORE_NAME, SIDEBAR_TEMPLATE);
       
  9955     }
  9428     }
  9956   }, [hasBlockSelection, isEditorSidebarOpened]);
  9429   }, [isReady, postType, postId, context, setEditedEntity]);
  9957   let sidebarName = sidebar;
       
  9958 
       
  9959   if (!isEditorSidebarOpened) {
       
  9960     sidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;
       
  9961   } // Conditionally include NavMenu sidebar in Plugin only.
       
  9962   // Optimise for dead code elimination.
       
  9963   // See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.
       
  9964 
       
  9965 
       
  9966   let MaybeNavigationMenuSidebar = external_wp_element_namespaceObject.Fragment;
       
  9967 
       
  9968   if (false) {}
       
  9969 
       
  9970   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(default_sidebar_DefaultSidebar, {
       
  9971     identifier: sidebarName,
       
  9972     title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
       
  9973     icon: library_cog,
       
  9974     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close settings sidebar'),
       
  9975     header: (0,external_wp_element_namespaceObject.createElement)(settings_header, {
       
  9976       sidebarName: sidebarName
       
  9977     }),
       
  9978     headerClassName: "edit-site-sidebar__panel-tabs"
       
  9979   }, sidebarName === SIDEBAR_TEMPLATE && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_wp_element_namespaceObject.createElement)(TemplateCard, null)), sidebarName === SIDEBAR_BLOCK && (0,external_wp_element_namespaceObject.createElement)(InspectorSlot, {
       
  9980     bubblesVirtually: true
       
  9981   })), (0,external_wp_element_namespaceObject.createElement)(GlobalStylesSidebar, null), (0,external_wp_element_namespaceObject.createElement)(MaybeNavigationMenuSidebar, null));
       
  9982 }
  9430 }
  9983 
  9431 
  9984 ;// CONCATENATED MODULE: external ["wp","htmlEntities"]
  9432 ;// CONCATENATED MODULE: external ["wp","htmlEntities"]
  9985 var external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
  9433 const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
  9986 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/home.js
  9434 ;// CONCATENATED MODULE: external ["wp","primitives"]
  9987 
  9435 const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
  9988 
  9436 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
  9989 /**
  9437 /**
  9990  * WordPress dependencies
  9438  * WordPress dependencies
  9991  */
  9439  */
  9992 
  9440 
  9993 const home = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  9441 
       
  9442 const search = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
  9994   xmlns: "http://www.w3.org/2000/svg",
  9443   xmlns: "http://www.w3.org/2000/svg",
  9995   viewBox: "0 0 24 24"
  9444   viewBox: "0 0 24 24",
  9996 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  9445   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
  9997   d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"
  9446     d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"
  9998 }));
  9447   })
  9999 /* harmony default export */ var library_home = (home);
  9448 });
 10000 
  9449 /* harmony default export */ const library_search = (search);
 10001 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol-filled.js
  9450 
 10002 
  9451 ;// CONCATENATED MODULE: external ["wp","keycodes"]
 10003 
  9452 const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
       
  9453 ;// CONCATENATED MODULE: external ["wp","url"]
       
  9454 const external_wp_url_namespaceObject = window["wp"]["url"];
       
  9455 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
 10004 /**
  9456 /**
 10005  * WordPress dependencies
  9457  * WordPress dependencies
 10006  */
  9458  */
 10007 
  9459 
 10008 const symbolFilled = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  9460 
       
  9461 const wordpress = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
 10009   xmlns: "http://www.w3.org/2000/svg",
  9462   xmlns: "http://www.w3.org/2000/svg",
 10010   viewBox: "0 0 24 24"
  9463   viewBox: "-2 -2 24 24",
 10011 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  9464   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
 10012   d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"
  9465     d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
 10013 }));
  9466   })
 10014 /* harmony default export */ var symbol_filled = (symbolFilled);
  9467 });
 10015 
  9468 /* harmony default export */ const library_wordpress = (wordpress);
 10016 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/main-dashboard-button/index.js
  9469 
       
  9470 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/site-icon/index.js
       
  9471 /**
       
  9472  * External dependencies
       
  9473  */
 10017 
  9474 
 10018 
  9475 
 10019 /**
  9476 /**
 10020  * WordPress dependencies
  9477  * WordPress dependencies
 10021  */
  9478  */
 10022 
  9479 
 10023 const slotName = '__experimentalMainDashboardButton';
  9480 
 10024 const {
  9481 
 10025   Fill,
  9482 
 10026   Slot: MainDashboardButtonSlot
  9483 
 10027 } = (0,external_wp_components_namespaceObject.createSlotFill)(slotName);
  9484 
 10028 const MainDashboardButton = Fill;
  9485 function SiteIcon({
 10029 
  9486   className
 10030 const main_dashboard_button_Slot = _ref => {
  9487 }) {
 10031   let {
       
 10032     children
       
 10033   } = _ref;
       
 10034   const slot = (0,external_wp_components_namespaceObject.__experimentalUseSlot)(slotName);
       
 10035   const hasFills = Boolean(slot.fills && slot.fills.length);
       
 10036 
       
 10037   if (!hasFills) {
       
 10038     return children;
       
 10039   }
       
 10040 
       
 10041   return (0,external_wp_element_namespaceObject.createElement)(MainDashboardButtonSlot, {
       
 10042     bubblesVirtually: true
       
 10043   });
       
 10044 };
       
 10045 
       
 10046 MainDashboardButton.Slot = main_dashboard_button_Slot;
       
 10047 /* harmony default export */ var main_dashboard_button = (MainDashboardButton);
       
 10048 
       
 10049 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-panel/index.js
       
 10050 
       
 10051 
       
 10052 
       
 10053 /**
       
 10054  * External dependencies
       
 10055  */
       
 10056 
       
 10057 /**
       
 10058  * WordPress dependencies
       
 10059  */
       
 10060 
       
 10061 
       
 10062 
       
 10063 
       
 10064 
       
 10065 
       
 10066 
       
 10067 
       
 10068 /**
       
 10069  * Internal dependencies
       
 10070  */
       
 10071 
       
 10072 
       
 10073 
       
 10074 
       
 10075 const SITE_EDITOR_KEY = 'site-editor';
       
 10076 
       
 10077 function NavLink(_ref) {
       
 10078   let {
       
 10079     params,
       
 10080     replace,
       
 10081     ...props
       
 10082   } = _ref;
       
 10083   const linkProps = useLink(params, replace);
       
 10084   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigationItem, extends_extends({}, linkProps, props));
       
 10085 }
       
 10086 
       
 10087 const NavigationPanel = _ref2 => {
       
 10088   let {
       
 10089     activeItem = SITE_EDITOR_KEY
       
 10090   } = _ref2;
       
 10091   const {
  9488   const {
 10092     homeTemplate,
  9489     isRequestingSite,
 10093     isNavigationOpen,
  9490     siteIconUrl
 10094     siteTitle
       
 10095   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  9491   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 10096     const {
  9492     const {
 10097       getEntityRecord
  9493       getEntityRecord
 10098     } = select(external_wp_coreData_namespaceObject.store);
  9494     } = select(external_wp_coreData_namespaceObject.store);
       
  9495     const siteData = getEntityRecord('root', '__unstableBase', undefined);
       
  9496     return {
       
  9497       isRequestingSite: !siteData,
       
  9498       siteIconUrl: siteData?.site_icon_url
       
  9499     };
       
  9500   }, []);
       
  9501   if (isRequestingSite && !siteIconUrl) {
       
  9502     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
  9503       className: "edit-site-site-icon__image"
       
  9504     });
       
  9505   }
       
  9506   const icon = siteIconUrl ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
       
  9507     className: "edit-site-site-icon__image",
       
  9508     alt: (0,external_wp_i18n_namespaceObject.__)('Site Icon'),
       
  9509     src: siteIconUrl
       
  9510   }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
  9511     className: "edit-site-site-icon__icon",
       
  9512     icon: library_wordpress,
       
  9513     size: 48
       
  9514   });
       
  9515   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
  9516     className: dist_clsx(className, 'edit-site-site-icon'),
       
  9517     children: icon
       
  9518   });
       
  9519 }
       
  9520 /* harmony default export */ const site_icon = (SiteIcon);
       
  9521 
       
  9522 ;// CONCATENATED MODULE: external ["wp","dom"]
       
  9523 const external_wp_dom_namespaceObject = window["wp"]["dom"];
       
  9524 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/index.js
       
  9525 /**
       
  9526  * External dependencies
       
  9527  */
       
  9528 
       
  9529 
       
  9530 /**
       
  9531  * WordPress dependencies
       
  9532  */
       
  9533 
       
  9534 
       
  9535 
       
  9536 const SidebarNavigationContext = (0,external_wp_element_namespaceObject.createContext)(() => {});
       
  9537 // Focus a sidebar element after a navigation. The element to focus is either
       
  9538 // specified by `focusSelector` (when navigating back) or it is the first
       
  9539 // tabbable element (usually the "Back" button).
       
  9540 function focusSidebarElement(el, direction, focusSelector) {
       
  9541   let elementToFocus;
       
  9542   if (direction === 'back' && focusSelector) {
       
  9543     elementToFocus = el.querySelector(focusSelector);
       
  9544   }
       
  9545   if (direction !== null && !elementToFocus) {
       
  9546     const [firstTabbable] = external_wp_dom_namespaceObject.focus.tabbable.find(el);
       
  9547     elementToFocus = firstTabbable !== null && firstTabbable !== void 0 ? firstTabbable : el;
       
  9548   }
       
  9549   elementToFocus?.focus();
       
  9550 }
       
  9551 
       
  9552 // Navigation state that is updated when navigating back or forward. Helps us
       
  9553 // manage the animations and also focus.
       
  9554 function createNavState() {
       
  9555   let state = {
       
  9556     direction: null,
       
  9557     focusSelector: null
       
  9558   };
       
  9559   return {
       
  9560     get() {
       
  9561       return state;
       
  9562     },
       
  9563     navigate(direction, focusSelector = null) {
       
  9564       state = {
       
  9565         direction,
       
  9566         focusSelector: direction === 'forward' && focusSelector ? focusSelector : state.focusSelector
       
  9567       };
       
  9568     }
       
  9569   };
       
  9570 }
       
  9571 function SidebarContentWrapper({
       
  9572   children
       
  9573 }) {
       
  9574   const navState = (0,external_wp_element_namespaceObject.useContext)(SidebarNavigationContext);
       
  9575   const wrapperRef = (0,external_wp_element_namespaceObject.useRef)();
       
  9576   const [navAnimation, setNavAnimation] = (0,external_wp_element_namespaceObject.useState)(null);
       
  9577   (0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
 10099     const {
  9578     const {
 10100       getSettings,
  9579       direction,
 10101       isNavigationOpened
  9580       focusSelector
 10102     } = select(store_store);
  9581     } = navState.get();
 10103     const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
  9582     focusSidebarElement(wrapperRef.current, direction, focusSelector);
       
  9583     setNavAnimation(direction);
       
  9584   }, [navState]);
       
  9585   const wrapperCls = dist_clsx('edit-site-sidebar__screen-wrapper', {
       
  9586     'slide-from-left': navAnimation === 'back',
       
  9587     'slide-from-right': navAnimation === 'forward'
       
  9588   });
       
  9589   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
  9590     ref: wrapperRef,
       
  9591     className: wrapperCls,
       
  9592     children: children
       
  9593   });
       
  9594 }
       
  9595 function SidebarContent({
       
  9596   routeKey,
       
  9597   children
       
  9598 }) {
       
  9599   const [navState] = (0,external_wp_element_namespaceObject.useState)(createNavState);
       
  9600   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationContext.Provider, {
       
  9601     value: navState,
       
  9602     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
  9603       className: "edit-site-sidebar__content",
       
  9604       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarContentWrapper, {
       
  9605         children: children
       
  9606       }, routeKey)
       
  9607     })
       
  9608   });
       
  9609 }
       
  9610 
       
  9611 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/site-hub/index.js
       
  9612 /**
       
  9613  * External dependencies
       
  9614  */
       
  9615 
       
  9616 
       
  9617 /**
       
  9618  * WordPress dependencies
       
  9619  */
       
  9620 
       
  9621 
       
  9622 
       
  9623 
       
  9624 
       
  9625 
       
  9626 
       
  9627 
       
  9628 
       
  9629 
       
  9630 
       
  9631 
       
  9632 /**
       
  9633  * Internal dependencies
       
  9634  */
       
  9635 
       
  9636 
       
  9637 
       
  9638 const {
       
  9639   useHistory
       
  9640 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
  9641 
       
  9642 
       
  9643 
       
  9644 const SiteHub = (0,external_wp_element_namespaceObject.memo)((0,external_wp_element_namespaceObject.forwardRef)(({
       
  9645   isTransparent
       
  9646 }, ref) => {
       
  9647   const {
       
  9648     dashboardLink,
       
  9649     homeUrl,
       
  9650     siteTitle
       
  9651   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  9652     const {
       
  9653       getSettings
       
  9654     } = lock_unlock_unlock(select(store));
       
  9655     const {
       
  9656       getSite,
       
  9657       getUnstableBase // Site index.
       
  9658     } = select(external_wp_coreData_namespaceObject.store);
       
  9659     const _site = getSite();
 10104     return {
  9660     return {
 10105       siteTitle: siteData.name,
  9661       dashboardLink: getSettings().__experimentalDashboardLink || 'index.php',
 10106       homeTemplate: getSettings().__unstableHomeTemplate,
  9662       homeUrl: getUnstableBase()?.home,
 10107       isNavigationOpen: isNavigationOpened()
  9663       siteTitle: !_site?.title && !!_site?.url ? (0,external_wp_url_namespaceObject.filterURLForDisplay)(_site?.url) : _site?.title
 10108     };
  9664     };
 10109   }, []);
  9665   }, []);
 10110   const {
  9666   const {
 10111     setIsNavigationPanelOpened
  9667     open: openCommandCenter
 10112   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  9668   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_commands_namespaceObject.store);
 10113 
  9669   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 10114   const closeOnEscape = event => {
  9670     className: "edit-site-site-hub",
 10115     if (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE && !event.defaultPrevented) {
  9671     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
 10116       event.preventDefault();
  9672       justify: "flex-start",
 10117       setIsNavigationPanelOpened(false);
  9673       spacing: "0",
 10118     }
  9674       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 10119   };
  9675         className: dist_clsx('edit-site-site-hub__view-mode-toggle-container', {
 10120 
  9676           'has-transparent-background': isTransparent
 10121   return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions
  9677         }),
 10122     (0,external_wp_element_namespaceObject.createElement)("div", {
  9678         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 10123       className: classnames_default()(`edit-site-navigation-panel`, {
  9679           ref: ref,
 10124         'is-open': isNavigationOpen
  9680           href: dashboardLink,
 10125       }),
  9681           label: (0,external_wp_i18n_namespaceObject.__)('Go to the Dashboard'),
 10126       onKeyDown: closeOnEscape
  9682           className: "edit-site-layout__view-mode-toggle",
 10127     }, (0,external_wp_element_namespaceObject.createElement)("div", {
  9683           style: {
 10128       className: "edit-site-navigation-panel__inner"
  9684             transform: 'scale(0.5)',
 10129     }, (0,external_wp_element_namespaceObject.createElement)("div", {
  9685             borderRadius: 4
 10130       className: "edit-site-navigation-panel__site-title-container"
  9686           },
 10131     }, (0,external_wp_element_namespaceObject.createElement)("div", {
  9687           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(site_icon, {
 10132       className: "edit-site-navigation-panel__site-title"
  9688             className: "edit-site-layout__view-mode-toggle-icon"
 10133     }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(siteTitle))), (0,external_wp_element_namespaceObject.createElement)("div", {
  9689           })
 10134       className: "edit-site-navigation-panel__scroll-container"
  9690         })
 10135     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigation, {
  9691       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
 10136       activeItem: activeItem
  9692         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 10137     }, (0,external_wp_element_namespaceObject.createElement)(main_dashboard_button.Slot, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigationBackButton, {
  9693           className: "edit-site-site-hub__title",
 10138       backButtonLabel: (0,external_wp_i18n_namespaceObject.__)('Dashboard'),
  9694           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 10139       className: "edit-site-navigation-panel__back-to-dashboard",
  9695             variant: "link",
 10140       href: "index.php"
  9696             href: homeUrl,
 10141     })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigationMenu, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigationGroup, {
  9697             target: "_blank",
 10142       title: (0,external_wp_i18n_namespaceObject.__)('Editor')
  9698             label: (0,external_wp_i18n_namespaceObject.__)('View site (opens in a new tab)'),
 10143     }, (0,external_wp_element_namespaceObject.createElement)(NavLink, {
  9699             children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(siteTitle)
 10144       icon: library_home,
  9700           })
 10145       title: (0,external_wp_i18n_namespaceObject.__)('Site'),
  9701         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
 10146       item: SITE_EDITOR_KEY,
  9702           spacing: 0,
 10147       params: {
  9703           expanded: false,
 10148         postId: homeTemplate === null || homeTemplate === void 0 ? void 0 : homeTemplate.postId,
  9704           className: "edit-site-site-hub__actions",
 10149         postType: homeTemplate === null || homeTemplate === void 0 ? void 0 : homeTemplate.postType
  9705           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 10150       }
  9706             className: "edit-site-site-hub_toggle-command-center",
 10151     }), (0,external_wp_element_namespaceObject.createElement)(NavLink, {
  9707             icon: library_search,
 10152       icon: library_layout,
  9708             onClick: () => openCommandCenter(),
 10153       title: (0,external_wp_i18n_namespaceObject.__)('Templates'),
  9709             label: (0,external_wp_i18n_namespaceObject.__)('Open command palette'),
 10154       item: "wp_template",
  9710             shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('k')
 10155       params: {
  9711           })
 10156         postId: undefined,
  9712         })]
 10157         postType: 'wp_template'
  9713       })]
 10158       }
  9714     })
 10159     }), (0,external_wp_element_namespaceObject.createElement)(NavLink, {
  9715   });
 10160       icon: symbol_filled,
       
 10161       title: (0,external_wp_i18n_namespaceObject.__)('Template Parts'),
       
 10162       item: "wp_template_part",
       
 10163       params: {
       
 10164         postId: undefined,
       
 10165         postType: 'wp_template_part'
       
 10166       }
       
 10167     })))))))
       
 10168   );
       
 10169 };
       
 10170 
       
 10171 /* harmony default export */ var navigation_panel = (NavigationPanel);
       
 10172 
       
 10173 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
       
 10174 
       
 10175 
       
 10176 /**
       
 10177  * WordPress dependencies
       
 10178  */
       
 10179 
       
 10180 const wordpress = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 10181   xmlns: "http://www.w3.org/2000/svg",
       
 10182   viewBox: "-2 -2 24 24"
       
 10183 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 10184   d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
       
 10185 }));
  9716 }));
 10186 /* harmony default export */ var library_wordpress = (wordpress);
  9717 /* harmony default export */ const site_hub = (SiteHub);
 10187 
  9718 const SiteHubMobile = (0,external_wp_element_namespaceObject.memo)((0,external_wp_element_namespaceObject.forwardRef)(({
 10188 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-toggle/index.js
  9719   isTransparent
 10189 
  9720 }, ref) => {
 10190 
  9721   const history = useHistory();
 10191 /**
       
 10192  * External dependencies
       
 10193  */
       
 10194 
       
 10195 /**
       
 10196  * WordPress dependencies
       
 10197  */
       
 10198 
       
 10199 
       
 10200 
       
 10201 
       
 10202 
       
 10203 
       
 10204 
       
 10205 
       
 10206 /**
       
 10207  * Internal dependencies
       
 10208  */
       
 10209 
       
 10210 
       
 10211 
       
 10212 function NavigationToggle(_ref) {
       
 10213   let {
       
 10214     icon
       
 10215   } = _ref;
       
 10216   const {
  9722   const {
 10217     isNavigationOpen,
  9723     navigate
 10218     isRequestingSiteIcon,
  9724   } = (0,external_wp_element_namespaceObject.useContext)(SidebarNavigationContext);
 10219     siteIconUrl
  9725   const {
       
  9726     homeUrl,
       
  9727     siteTitle
 10220   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  9728   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 10221     const {
  9729     const {
 10222       getEntityRecord,
  9730       getSite,
 10223       isResolving
  9731       getUnstableBase // Site index.
 10224     } = select(external_wp_coreData_namespaceObject.store);
  9732     } = select(external_wp_coreData_namespaceObject.store);
 10225     const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
  9733     const _site = getSite();
 10226     return {
  9734     return {
 10227       isNavigationOpen: select(store_store).isNavigationOpened(),
  9735       homeUrl: getUnstableBase()?.home,
 10228       isRequestingSiteIcon: isResolving('core', 'getEntityRecord', ['root', '__unstableBase', undefined]),
  9736       siteTitle: !_site?.title && !!_site?.url ? (0,external_wp_url_namespaceObject.filterURLForDisplay)(_site?.url) : _site?.title
 10229       siteIconUrl: siteData.site_icon_url
       
 10230     };
  9737     };
 10231   }, []);
  9738   }, []);
 10232   const {
  9739   const {
 10233     setIsNavigationPanelOpened
  9740     open: openCommandCenter
 10234   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  9741   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_commands_namespaceObject.store);
 10235   const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
  9742   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 10236   const navigationToggleRef = (0,external_wp_element_namespaceObject.useRef)();
  9743     className: "edit-site-site-hub",
 10237   (0,external_wp_element_namespaceObject.useEffect)(() => {
  9744     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
 10238     // TODO: Remove this effect when alternative solution is merged.
  9745       justify: "flex-start",
 10239     // See: https://github.com/WordPress/gutenberg/pull/37314
  9746       spacing: "0",
 10240     if (!isNavigationOpen) {
  9747       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 10241       navigationToggleRef.current.focus();
  9748         className: dist_clsx('edit-site-site-hub__view-mode-toggle-container', {
 10242     }
  9749           'has-transparent-background': isTransparent
 10243   }, [isNavigationOpen]);
  9750         }),
 10244 
  9751         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 10245   const toggleNavigationPanel = () => setIsNavigationPanelOpened(!isNavigationOpen);
  9752           ref: ref,
 10246 
  9753           label: (0,external_wp_i18n_namespaceObject.__)('Go to Site Editor'),
 10247   let buttonIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
  9754           className: "edit-site-layout__view-mode-toggle",
 10248     size: "36px",
  9755           style: {
 10249     icon: library_wordpress
  9756             transform: 'scale(0.5)',
       
  9757             borderRadius: 4
       
  9758           },
       
  9759           onClick: () => {
       
  9760             history.push({});
       
  9761             navigate('back');
       
  9762           },
       
  9763           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(site_icon, {
       
  9764             className: "edit-site-layout__view-mode-toggle-icon"
       
  9765           })
       
  9766         })
       
  9767       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  9768         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
  9769           className: "edit-site-site-hub__title",
       
  9770           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
  9771             variant: "link",
       
  9772             href: homeUrl,
       
  9773             target: "_blank",
       
  9774             label: (0,external_wp_i18n_namespaceObject.__)('View site (opens in a new tab)'),
       
  9775             children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(siteTitle)
       
  9776           })
       
  9777         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
  9778           spacing: 0,
       
  9779           expanded: false,
       
  9780           className: "edit-site-site-hub__actions",
       
  9781           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
  9782             className: "edit-site-site-hub_toggle-command-center",
       
  9783             icon: library_search,
       
  9784             onClick: () => openCommandCenter(),
       
  9785             label: (0,external_wp_i18n_namespaceObject.__)('Open command palette'),
       
  9786             shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('k')
       
  9787           })
       
  9788         })]
       
  9789       })]
       
  9790     })
 10250   });
  9791   });
 10251   const effect = {
  9792 }));
 10252     expand: {
  9793 
 10253       scale: 1.25,
  9794 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/resizable-frame/index.js
 10254       transition: {
  9795 /**
 10255         type: 'tween',
  9796  * External dependencies
 10256         duration: '0.3'
  9797  */
 10257       }
       
 10258     }
       
 10259   };
       
 10260 
       
 10261   if (siteIconUrl) {
       
 10262     buttonIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.img, {
       
 10263       variants: !disableMotion && effect,
       
 10264       alt: (0,external_wp_i18n_namespaceObject.__)('Site Icon'),
       
 10265       className: "edit-site-navigation-toggle__site-icon",
       
 10266       src: siteIconUrl
       
 10267     });
       
 10268   } else if (isRequestingSiteIcon) {
       
 10269     buttonIcon = null;
       
 10270   } else if (icon) {
       
 10271     buttonIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
       
 10272       size: "36px",
       
 10273       icon: icon
       
 10274     });
       
 10275   }
       
 10276 
       
 10277   const classes = classnames_default()({
       
 10278     'edit-site-navigation-toggle__button': true,
       
 10279     'has-icon': siteIconUrl
       
 10280   });
       
 10281   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 10282     className: 'edit-site-navigation-toggle' + (isNavigationOpen ? ' is-open' : ''),
       
 10283     whileHover: "expand"
       
 10284   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 10285     className: classes,
       
 10286     label: (0,external_wp_i18n_namespaceObject.__)('Toggle navigation'),
       
 10287     ref: navigationToggleRef // isPressed will add unwanted styles.
       
 10288     ,
       
 10289     "aria-pressed": isNavigationOpen,
       
 10290     onClick: toggleNavigationPanel,
       
 10291     showTooltip: true
       
 10292   }, buttonIcon));
       
 10293 }
       
 10294 
       
 10295 /* harmony default export */ var navigation_toggle = (NavigationToggle);
       
 10296 
       
 10297 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/index.js
       
 10298 
  9798 
 10299 
  9799 
 10300 /**
  9800 /**
 10301  * WordPress dependencies
  9801  * WordPress dependencies
 10302  */
  9802  */
 10303 
  9803 
 10304 
  9804 
 10305 
  9805 
 10306 
  9806 
       
  9807 
       
  9808 
 10307 /**
  9809 /**
 10308  * Internal dependencies
  9810  * Internal dependencies
 10309  */
  9811  */
 10310 
  9812 
 10311 
  9813 
 10312 
  9814 
 10313 
  9815 // Removes the inline styles in the drag handles.
 10314 const {
  9816 
 10315   Fill: NavigationPanelPreviewFill,
  9817 
 10316   Slot: NavigationPanelPreviewSlot
       
 10317 } = (0,external_wp_components_namespaceObject.createSlotFill)('EditSiteNavigationPanelPreview');
       
 10318 const {
       
 10319   Fill: NavigationSidebarFill,
       
 10320   Slot: NavigationSidebarSlot
       
 10321 } = (0,external_wp_components_namespaceObject.createSlotFill)('EditSiteNavigationSidebar');
       
 10322 
       
 10323 function NavigationSidebar(_ref) {
       
 10324   let {
       
 10325     isDefaultOpen = false,
       
 10326     activeTemplateType
       
 10327   } = _ref;
       
 10328   const isDesktopViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
       
 10329   const {
       
 10330     setIsNavigationPanelOpened
       
 10331   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
 10332   (0,external_wp_element_namespaceObject.useEffect)(function autoOpenNavigationPanelOnViewportChange() {
       
 10333     setIsNavigationPanelOpened(isDefaultOpen && isDesktopViewport);
       
 10334   }, [isDefaultOpen, isDesktopViewport, setIsNavigationPanelOpened]);
       
 10335   return (0,external_wp_element_namespaceObject.createElement)(NavigationSidebarFill, null, (0,external_wp_element_namespaceObject.createElement)(navigation_toggle, null), (0,external_wp_element_namespaceObject.createElement)(navigation_panel, {
       
 10336     activeItem: activeTemplateType
       
 10337   }), (0,external_wp_element_namespaceObject.createElement)(NavigationPanelPreviewSlot, null));
       
 10338 }
       
 10339 
       
 10340 NavigationSidebar.Slot = NavigationSidebarSlot;
       
 10341 /* harmony default export */ var navigation_sidebar = (NavigationSidebar);
       
 10342 
       
 10343 ;// CONCATENATED MODULE: external ["wp","reusableBlocks"]
       
 10344 var external_wp_reusableBlocks_namespaceObject = window["wp"]["reusableBlocks"];
       
 10345 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/convert-to-regular.js
       
 10346 
       
 10347 
       
 10348 /**
       
 10349  * WordPress dependencies
       
 10350  */
       
 10351 
       
 10352 
       
 10353 
       
 10354 
       
 10355 function ConvertToRegularBlocks(_ref) {
       
 10356   let {
       
 10357     clientId
       
 10358   } = _ref;
       
 10359   const {
       
 10360     getBlocks
       
 10361   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
       
 10362   const {
       
 10363     replaceBlocks
       
 10364   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
 10365   const canRemove = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).canRemoveBlock(clientId), [clientId]);
       
 10366 
       
 10367   if (!canRemove) {
       
 10368     return null;
       
 10369   }
       
 10370 
       
 10371   return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, _ref2 => {
       
 10372     let {
       
 10373       onClose
       
 10374     } = _ref2;
       
 10375     return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
 10376       onClick: () => {
       
 10377         replaceBlocks(clientId, getBlocks(clientId));
       
 10378         onClose();
       
 10379       }
       
 10380     }, (0,external_wp_i18n_namespaceObject.__)('Detach blocks from template part'));
       
 10381   });
       
 10382 }
       
 10383 
       
 10384 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/create-template-part-modal/index.js
       
 10385 
       
 10386 
       
 10387 /**
       
 10388  * WordPress dependencies
       
 10389  */
       
 10390 
       
 10391 
       
 10392 
       
 10393 
       
 10394 
       
 10395 
       
 10396 
       
 10397 /**
       
 10398  * Internal dependencies
       
 10399  */
       
 10400 
       
 10401 
       
 10402 function CreateTemplatePartModal(_ref) {
       
 10403   let {
       
 10404     closeModal,
       
 10405     onCreate
       
 10406   } = _ref;
       
 10407   const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)('');
       
 10408   const [area, setArea] = (0,external_wp_element_namespaceObject.useState)(TEMPLATE_PART_AREA_GENERAL);
       
 10409   const [isSubmitting, setIsSubmitting] = (0,external_wp_element_namespaceObject.useState)(false);
       
 10410   const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(CreateTemplatePartModal);
       
 10411   const templatePartAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplatePartAreas(), []);
       
 10412   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
       
 10413     title: (0,external_wp_i18n_namespaceObject.__)('Create a template part'),
       
 10414     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close'),
       
 10415     onRequestClose: closeModal,
       
 10416     overlayClassName: "edit-site-create-template-part-modal"
       
 10417   }, (0,external_wp_element_namespaceObject.createElement)("form", {
       
 10418     onSubmit: async event => {
       
 10419       event.preventDefault();
       
 10420 
       
 10421       if (!title) {
       
 10422         return;
       
 10423       }
       
 10424 
       
 10425       setIsSubmitting(true);
       
 10426       await onCreate({
       
 10427         title,
       
 10428         area
       
 10429       });
       
 10430     }
       
 10431   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
       
 10432     label: (0,external_wp_i18n_namespaceObject.__)('Name'),
       
 10433     value: title,
       
 10434     onChange: setTitle,
       
 10435     required: true
       
 10436   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, {
       
 10437     label: (0,external_wp_i18n_namespaceObject.__)('Area'),
       
 10438     id: `edit-site-create-template-part-modal__area-selection-${instanceId}`,
       
 10439     className: "edit-site-create-template-part-modal__area-base-control"
       
 10440   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalRadioGroup, {
       
 10441     label: (0,external_wp_i18n_namespaceObject.__)('Area'),
       
 10442     className: "edit-site-create-template-part-modal__area-radio-group",
       
 10443     id: `edit-site-create-template-part-modal__area-selection-${instanceId}`,
       
 10444     onChange: setArea,
       
 10445     checked: area
       
 10446   }, templatePartAreas.map(_ref2 => {
       
 10447     let {
       
 10448       icon,
       
 10449       label,
       
 10450       area: value,
       
 10451       description
       
 10452     } = _ref2;
       
 10453     return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalRadio, {
       
 10454       key: label,
       
 10455       value: value,
       
 10456       className: "edit-site-create-template-part-modal__area-radio"
       
 10457     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, {
       
 10458       align: "start",
       
 10459       justify: "start"
       
 10460     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
       
 10461       icon: icon
       
 10462     })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexBlock, {
       
 10463       className: "edit-site-create-template-part-modal__option-label"
       
 10464     }, label, (0,external_wp_element_namespaceObject.createElement)("div", null, description)), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, {
       
 10465       className: "edit-site-create-template-part-modal__checkbox"
       
 10466     }, area === value && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
       
 10467       icon: library_check
       
 10468     }))));
       
 10469   }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, {
       
 10470     className: "edit-site-create-template-part-modal__modal-actions",
       
 10471     justify: "flex-end"
       
 10472   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 10473     variant: "secondary",
       
 10474     onClick: () => {
       
 10475       closeModal();
       
 10476     }
       
 10477   }, (0,external_wp_i18n_namespaceObject.__)('Cancel'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 10478     variant: "primary",
       
 10479     type: "submit",
       
 10480     disabled: !title,
       
 10481     isBusy: isSubmitting
       
 10482   }, (0,external_wp_i18n_namespaceObject.__)('Create'))))));
       
 10483 }
       
 10484 
       
 10485 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/convert-to-template-part.js
       
 10486 
       
 10487 
       
 10488 /**
       
 10489  * External dependencies
       
 10490  */
       
 10491 
       
 10492 /**
       
 10493  * WordPress dependencies
       
 10494  */
       
 10495 
       
 10496 
       
 10497 
       
 10498 
       
 10499 
       
 10500 
       
 10501 
       
 10502 
       
 10503 
       
 10504 /**
       
 10505  * Internal dependencies
       
 10506  */
       
 10507 
       
 10508 
       
 10509 function ConvertToTemplatePart(_ref) {
       
 10510   let {
       
 10511     clientIds,
       
 10512     blocks
       
 10513   } = _ref;
       
 10514   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 10515   const {
       
 10516     replaceBlocks
       
 10517   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
 10518   const {
       
 10519     saveEntityRecord
       
 10520   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 10521   const {
       
 10522     createSuccessNotice
       
 10523   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
 10524 
       
 10525   const onConvert = async _ref2 => {
       
 10526     let {
       
 10527       title,
       
 10528       area
       
 10529     } = _ref2;
       
 10530     // Currently template parts only allow latin chars.
       
 10531     // Fallback slug will receive suffix by default.
       
 10532     const cleanSlug = (0,external_lodash_namespaceObject.kebabCase)(title).replace(/[^\w-]+/g, '') || 'wp-custom-part';
       
 10533     const templatePart = await saveEntityRecord('postType', 'wp_template_part', {
       
 10534       slug: cleanSlug,
       
 10535       title,
       
 10536       content: (0,external_wp_blocks_namespaceObject.serialize)(blocks),
       
 10537       area
       
 10538     });
       
 10539     replaceBlocks(clientIds, (0,external_wp_blocks_namespaceObject.createBlock)('core/template-part', {
       
 10540       slug: templatePart.slug,
       
 10541       theme: templatePart.theme
       
 10542     }));
       
 10543     createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Template part created.'), {
       
 10544       type: 'snackbar'
       
 10545     }); // The modal and this component will be unmounted because of `replaceBlocks` above,
       
 10546     // so no need to call `closeModal` or `onClose`.
       
 10547   };
       
 10548 
       
 10549   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, () => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
 10550     onClick: () => {
       
 10551       setIsModalOpen(true);
       
 10552     }
       
 10553   }, (0,external_wp_i18n_namespaceObject.__)('Make template part'))), isModalOpen && (0,external_wp_element_namespaceObject.createElement)(CreateTemplatePartModal, {
       
 10554     closeModal: () => {
       
 10555       setIsModalOpen(false);
       
 10556     },
       
 10557     onCreate: onConvert
       
 10558   }));
       
 10559 }
       
 10560 
       
 10561 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/index.js
       
 10562 
       
 10563 
       
 10564 /**
       
 10565  * WordPress dependencies
       
 10566  */
       
 10567 
       
 10568 
       
 10569 /**
       
 10570  * Internal dependencies
       
 10571  */
       
 10572 
       
 10573 
       
 10574 
       
 10575 function TemplatePartConverter() {
       
 10576   var _blocks$;
       
 10577 
       
 10578   const {
       
 10579     clientIds,
       
 10580     blocks
       
 10581   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10582     const {
       
 10583       getSelectedBlockClientIds,
       
 10584       getBlocksByClientId
       
 10585     } = select(external_wp_blockEditor_namespaceObject.store);
       
 10586     const selectedBlockClientIds = getSelectedBlockClientIds();
       
 10587     return {
       
 10588       clientIds: selectedBlockClientIds,
       
 10589       blocks: getBlocksByClientId(selectedBlockClientIds)
       
 10590     };
       
 10591   }, []); // Allow converting a single template part to standard blocks.
       
 10592 
       
 10593   if (blocks.length === 1 && ((_blocks$ = blocks[0]) === null || _blocks$ === void 0 ? void 0 : _blocks$.name) === 'core/template-part') {
       
 10594     return (0,external_wp_element_namespaceObject.createElement)(ConvertToRegularBlocks, {
       
 10595       clientId: clientIds[0]
       
 10596     });
       
 10597   }
       
 10598 
       
 10599   return (0,external_wp_element_namespaceObject.createElement)(ConvertToTemplatePart, {
       
 10600     clientIds: clientIds,
       
 10601     blocks: blocks
       
 10602   });
       
 10603 }
       
 10604 
       
 10605 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
       
 10606 
       
 10607 
       
 10608 /**
       
 10609  * WordPress dependencies
       
 10610  */
       
 10611 
       
 10612 const pencil = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 10613   xmlns: "http://www.w3.org/2000/svg",
       
 10614   viewBox: "0 0 24 24"
       
 10615 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 10616   d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"
       
 10617 }));
       
 10618 /* harmony default export */ var library_pencil = (pencil);
       
 10619 
       
 10620 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
       
 10621 /**
       
 10622  * Internal dependencies
       
 10623  */
       
 10624 
       
 10625 /* harmony default export */ var edit = (library_pencil);
       
 10626 
       
 10627 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigate-to-link/index.js
       
 10628 
       
 10629 
       
 10630 /**
       
 10631  * WordPress dependencies
       
 10632  */
       
 10633 
       
 10634 
       
 10635 
       
 10636 
       
 10637 
       
 10638 
       
 10639 
       
 10640 function NavigateToLink(_ref) {
       
 10641   let {
       
 10642     type,
       
 10643     id,
       
 10644     activePage,
       
 10645     onActivePageChange
       
 10646   } = _ref;
       
 10647   const post = (0,external_wp_data_namespaceObject.useSelect)(select => type && id && type !== 'URL' && select(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', type, id), [type, id]);
       
 10648   const onClick = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 10649     if (!(post !== null && post !== void 0 && post.link)) return null;
       
 10650     const path = (0,external_wp_url_namespaceObject.getPathAndQueryString)(post.link);
       
 10651     if (path === (activePage === null || activePage === void 0 ? void 0 : activePage.path)) return null;
       
 10652     return () => onActivePageChange({
       
 10653       type,
       
 10654       slug: post.slug,
       
 10655       path,
       
 10656       context: {
       
 10657         postType: post.type,
       
 10658         postId: post.id
       
 10659       }
       
 10660     });
       
 10661   }, [post, activePage === null || activePage === void 0 ? void 0 : activePage.path, onActivePageChange]);
       
 10662   return onClick && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 10663     icon: edit,
       
 10664     label: (0,external_wp_i18n_namespaceObject.__)('Edit Page Template'),
       
 10665     onClick: onClick
       
 10666   });
       
 10667 }
       
 10668 
       
 10669 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/block-inspector-button.js
       
 10670 
       
 10671 
       
 10672 /**
       
 10673  * WordPress dependencies
       
 10674  */
       
 10675 
       
 10676 
       
 10677 
       
 10678 
       
 10679 
       
 10680 
       
 10681 /**
       
 10682  * Internal dependencies
       
 10683  */
       
 10684 
       
 10685 
       
 10686 
       
 10687 
       
 10688 function BlockInspectorButton(_ref) {
       
 10689   let {
       
 10690     onClick = () => {}
       
 10691   } = _ref;
       
 10692   const {
       
 10693     shortcut,
       
 10694     isBlockInspectorOpen
       
 10695   } = (0,external_wp_data_namespaceObject.useSelect)(select => ({
       
 10696     shortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getShortcutRepresentation('core/edit-site/toggle-block-settings-sidebar'),
       
 10697     isBlockInspectorOpen: select(store).getActiveComplementaryArea(store_store.name) === SIDEBAR_BLOCK
       
 10698   }), []);
       
 10699   const {
       
 10700     enableComplementaryArea,
       
 10701     disableComplementaryArea
       
 10702   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 10703   const label = isBlockInspectorOpen ? (0,external_wp_i18n_namespaceObject.__)('Hide more settings') : (0,external_wp_i18n_namespaceObject.__)('Show more settings');
       
 10704   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
 10705     onClick: () => {
       
 10706       if (isBlockInspectorOpen) {
       
 10707         disableComplementaryArea(STORE_NAME);
       
 10708         (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Block settings closed'));
       
 10709       } else {
       
 10710         enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
       
 10711         (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Additional settings are now available in the Editor block settings sidebar'));
       
 10712       } // Close dropdown menu.
       
 10713 
       
 10714 
       
 10715       onClick();
       
 10716     },
       
 10717     shortcut: shortcut
       
 10718   }, label);
       
 10719 }
       
 10720 
       
 10721 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/edit-template-part-menu-button/index.js
       
 10722 
       
 10723 
       
 10724 
       
 10725 /**
       
 10726  * WordPress dependencies
       
 10727  */
       
 10728 
       
 10729 
       
 10730 
       
 10731 
       
 10732 
       
 10733 
       
 10734 /**
       
 10735  * Internal dependencies
       
 10736  */
       
 10737 
       
 10738 
       
 10739 
       
 10740 function EditTemplatePartMenuButton() {
       
 10741   return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, _ref => {
       
 10742     let {
       
 10743       selectedClientIds,
       
 10744       onClose
       
 10745     } = _ref;
       
 10746     return (0,external_wp_element_namespaceObject.createElement)(EditTemplatePartMenuItem, {
       
 10747       selectedClientId: selectedClientIds[0],
       
 10748       onClose: onClose
       
 10749     });
       
 10750   });
       
 10751 }
       
 10752 
       
 10753 function EditTemplatePartMenuItem(_ref2) {
       
 10754   let {
       
 10755     selectedClientId,
       
 10756     onClose
       
 10757   } = _ref2;
       
 10758   const {
       
 10759     params
       
 10760   } = useLocation();
       
 10761   const selectedTemplatePart = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10762     const block = select(external_wp_blockEditor_namespaceObject.store).getBlock(selectedClientId);
       
 10763 
       
 10764     if (block && (0,external_wp_blocks_namespaceObject.isTemplatePart)(block)) {
       
 10765       const {
       
 10766         theme,
       
 10767         slug
       
 10768       } = block.attributes;
       
 10769       return select(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', 'wp_template_part', // Ideally this should be an official public API.
       
 10770       `${theme}//${slug}`);
       
 10771     }
       
 10772   }, [selectedClientId]);
       
 10773   const linkProps = useLink({
       
 10774     postId: selectedTemplatePart === null || selectedTemplatePart === void 0 ? void 0 : selectedTemplatePart.id,
       
 10775     postType: selectedTemplatePart === null || selectedTemplatePart === void 0 ? void 0 : selectedTemplatePart.type
       
 10776   }, {
       
 10777     fromTemplateId: params.postId
       
 10778   });
       
 10779 
       
 10780   if (!selectedTemplatePart) {
       
 10781     return null;
       
 10782   }
       
 10783 
       
 10784   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, extends_extends({}, linkProps, {
       
 10785     onClick: event => {
       
 10786       linkProps.onClick(event);
       
 10787       onClose();
       
 10788     }
       
 10789   }),
       
 10790   /* translators: %s: template part title */
       
 10791   (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Edit %s'), selectedTemplatePart.slug));
       
 10792 }
       
 10793 
       
 10794 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/arrow-left.js
       
 10795 
       
 10796 
       
 10797 /**
       
 10798  * WordPress dependencies
       
 10799  */
       
 10800 
       
 10801 const arrowLeft = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 10802   xmlns: "http://www.w3.org/2000/svg",
       
 10803   viewBox: "0 0 24 24"
       
 10804 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 10805   d: "M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"
       
 10806 }));
       
 10807 /* harmony default export */ var arrow_left = (arrowLeft);
       
 10808 
       
 10809 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/back-button.js
       
 10810 
       
 10811 
       
 10812 /**
       
 10813  * WordPress dependencies
       
 10814  */
       
 10815 
       
 10816 
       
 10817 
       
 10818 /**
       
 10819  * Internal dependencies
       
 10820  */
       
 10821 
       
 10822 
       
 10823 
       
 10824 function BackButton() {
       
 10825   var _location$state;
       
 10826 
       
 10827   const location = useLocation();
       
 10828   const history = useHistory();
       
 10829   const isTemplatePart = location.params.postType === 'wp_template_part';
       
 10830   const previousTemplateId = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.fromTemplateId;
       
 10831 
       
 10832   if (!isTemplatePart || !previousTemplateId) {
       
 10833     return null;
       
 10834   }
       
 10835 
       
 10836   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 10837     className: "edit-site-visual-editor__back-button",
       
 10838     icon: arrow_left,
       
 10839     onClick: () => {
       
 10840       history.back();
       
 10841     }
       
 10842   }, (0,external_wp_i18n_namespaceObject.__)('Back'));
       
 10843 }
       
 10844 
       
 10845 /* harmony default export */ var back_button = (BackButton);
       
 10846 
       
 10847 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/resize-handle.js
       
 10848 
       
 10849 
       
 10850 /**
       
 10851  * WordPress dependencies
       
 10852  */
       
 10853 
       
 10854 
       
 10855 
       
 10856 const DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.
       
 10857 
       
 10858 function ResizeHandle(_ref) {
       
 10859   let {
       
 10860     direction,
       
 10861     resizeWidthBy
       
 10862   } = _ref;
       
 10863 
       
 10864   function handleKeyDown(event) {
       
 10865     const {
       
 10866       keyCode
       
 10867     } = event;
       
 10868 
       
 10869     if (direction === 'left' && keyCode === external_wp_keycodes_namespaceObject.LEFT || direction === 'right' && keyCode === external_wp_keycodes_namespaceObject.RIGHT) {
       
 10870       resizeWidthBy(DELTA_DISTANCE);
       
 10871     } else if (direction === 'left' && keyCode === external_wp_keycodes_namespaceObject.RIGHT || direction === 'right' && keyCode === external_wp_keycodes_namespaceObject.LEFT) {
       
 10872       resizeWidthBy(-DELTA_DISTANCE);
       
 10873     }
       
 10874   }
       
 10875 
       
 10876   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("button", {
       
 10877     className: `resizable-editor__drag-handle is-${direction}`,
       
 10878     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Drag to resize'),
       
 10879     "aria-describedby": `resizable-editor__resize-help-${direction}`,
       
 10880     onKeyDown: handleKeyDown
       
 10881   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
       
 10882     id: `resizable-editor__resize-help-${direction}`
       
 10883   }, (0,external_wp_i18n_namespaceObject.__)('Use left and right arrow keys to resize the canvas.')));
       
 10884 }
       
 10885 
       
 10886 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/resizable-editor.js
       
 10887 
       
 10888 
       
 10889 
       
 10890 /**
       
 10891  * WordPress dependencies
       
 10892  */
       
 10893 
       
 10894 
       
 10895 
       
 10896 
       
 10897 
       
 10898 /**
       
 10899  * Internal dependencies
       
 10900  */
       
 10901 
       
 10902 
       
 10903 
       
 10904 const DEFAULT_STYLES = {
       
 10905   width: '100%',
       
 10906   height: '100%'
       
 10907 }; // Removes the inline styles in the drag handles.
       
 10908 
  9818 
 10909 const HANDLE_STYLES_OVERRIDE = {
  9819 const HANDLE_STYLES_OVERRIDE = {
 10910   position: undefined,
  9820   position: undefined,
 10911   userSelect: undefined,
  9821   userSelect: undefined,
 10912   cursor: undefined,
  9822   cursor: undefined,
 10916   right: undefined,
  9826   right: undefined,
 10917   bottom: undefined,
  9827   bottom: undefined,
 10918   left: undefined
  9828   left: undefined
 10919 };
  9829 };
 10920 
  9830 
 10921 function ResizableEditor(_ref) {
  9831 // The minimum width of the frame (in px) while resizing.
 10922   let {
  9832 const FRAME_MIN_WIDTH = 320;
 10923     enableResizing,
  9833 // The reference width of the frame (in px) used to calculate the aspect ratio.
 10924     settings,
  9834 const FRAME_REFERENCE_WIDTH = 1300;
 10925     children,
  9835 // 9 : 19.5 is the target aspect ratio enforced (when possible) while resizing.
 10926     ...props
  9836 const FRAME_TARGET_ASPECT_RATIO = 9 / 19.5;
 10927   } = _ref;
  9837 // The minimum distance (in px) between the frame resize handle and the
 10928   const deviceType = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).__experimentalGetPreviewDeviceType(), []);
  9838 // viewport's edge. If the frame is resized to be closer to the viewport's edge
 10929   const deviceStyles = (0,external_wp_blockEditor_namespaceObject.__experimentalUseResizeCanvas)(deviceType);
  9839 // than this distance, then "canvas mode" will be enabled.
 10930   const [width, setWidth] = (0,external_wp_element_namespaceObject.useState)(DEFAULT_STYLES.width);
  9840 const SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD = 200;
 10931   const [height, setHeight] = (0,external_wp_element_namespaceObject.useState)(DEFAULT_STYLES.height);
  9841 // Default size for the `frameSize` state.
 10932   const iframeRef = (0,external_wp_element_namespaceObject.useRef)();
  9842 const INITIAL_FRAME_SIZE = {
 10933   const mouseMoveTypingResetRef = (0,external_wp_blockEditor_namespaceObject.__unstableUseMouseMoveTypingReset)();
  9843   width: '100%',
 10934   const ref = (0,external_wp_compose_namespaceObject.useMergeRefs)([iframeRef, mouseMoveTypingResetRef]);
  9844   height: '100%'
 10935   (0,external_wp_element_namespaceObject.useEffect)(function autoResizeIframeHeight() {
  9845 };
 10936     const iframe = iframeRef.current;
  9846 function calculateNewHeight(width, initialAspectRatio) {
 10937 
  9847   const lerp = (a, b, amount) => {
 10938     if (!iframe || !enableResizing) {
  9848     return a + (b - a) * amount;
       
  9849   };
       
  9850 
       
  9851   // Calculate the intermediate aspect ratio based on the current width.
       
  9852   const lerpFactor = 1 - Math.max(0, Math.min(1, (width - FRAME_MIN_WIDTH) / (FRAME_REFERENCE_WIDTH - FRAME_MIN_WIDTH)));
       
  9853 
       
  9854   // Calculate the height based on the intermediate aspect ratio
       
  9855   // ensuring the frame arrives at the target aspect ratio.
       
  9856   const intermediateAspectRatio = lerp(initialAspectRatio, FRAME_TARGET_ASPECT_RATIO, lerpFactor);
       
  9857   return width / intermediateAspectRatio;
       
  9858 }
       
  9859 function ResizableFrame({
       
  9860   isFullWidth,
       
  9861   isOversized,
       
  9862   setIsOversized,
       
  9863   isReady,
       
  9864   children,
       
  9865   /** The default (unresized) width/height of the frame, based on the space availalbe in the viewport. */
       
  9866   defaultSize,
       
  9867   innerContentStyle
       
  9868 }) {
       
  9869   const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
       
  9870   const [frameSize, setFrameSize] = (0,external_wp_element_namespaceObject.useState)(INITIAL_FRAME_SIZE);
       
  9871   // The width of the resizable frame when a new resize gesture starts.
       
  9872   const [startingWidth, setStartingWidth] = (0,external_wp_element_namespaceObject.useState)();
       
  9873   const [isResizing, setIsResizing] = (0,external_wp_element_namespaceObject.useState)(false);
       
  9874   const [shouldShowHandle, setShouldShowHandle] = (0,external_wp_element_namespaceObject.useState)(false);
       
  9875   const [resizeRatio, setResizeRatio] = (0,external_wp_element_namespaceObject.useState)(1);
       
  9876   const canvasMode = (0,external_wp_data_namespaceObject.useSelect)(select => lock_unlock_unlock(select(store)).getCanvasMode(), []);
       
  9877   const {
       
  9878     setCanvasMode
       
  9879   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
  9880   const FRAME_TRANSITION = {
       
  9881     type: 'tween',
       
  9882     duration: isResizing ? 0 : 0.5
       
  9883   };
       
  9884   const frameRef = (0,external_wp_element_namespaceObject.useRef)(null);
       
  9885   const resizableHandleHelpId = (0,external_wp_compose_namespaceObject.useInstanceId)(ResizableFrame, 'edit-site-resizable-frame-handle-help');
       
  9886   const defaultAspectRatio = defaultSize.width / defaultSize.height;
       
  9887   const handleResizeStart = (_event, _direction, ref) => {
       
  9888     // Remember the starting width so we don't have to get `ref.offsetWidth` on
       
  9889     // every resize event thereafter, which will cause layout thrashing.
       
  9890     setStartingWidth(ref.offsetWidth);
       
  9891     setIsResizing(true);
       
  9892   };
       
  9893 
       
  9894   // Calculate the frame size based on the window width as its resized.
       
  9895   const handleResize = (_event, _direction, _ref, delta) => {
       
  9896     const normalizedDelta = delta.width / resizeRatio;
       
  9897     const deltaAbs = Math.abs(normalizedDelta);
       
  9898     const maxDoubledDelta = delta.width < 0 // is shrinking
       
  9899     ? deltaAbs : (defaultSize.width - startingWidth) / 2;
       
  9900     const deltaToDouble = Math.min(deltaAbs, maxDoubledDelta);
       
  9901     const doubleSegment = deltaAbs === 0 ? 0 : deltaToDouble / deltaAbs;
       
  9902     const singleSegment = 1 - doubleSegment;
       
  9903     setResizeRatio(singleSegment + doubleSegment * 2);
       
  9904     const updatedWidth = startingWidth + delta.width;
       
  9905     setIsOversized(updatedWidth > defaultSize.width);
       
  9906 
       
  9907     // Width will be controlled by the library (via `resizeRatio`),
       
  9908     // so we only need to update the height.
       
  9909     setFrameSize({
       
  9910       height: isOversized ? '100%' : calculateNewHeight(updatedWidth, defaultAspectRatio)
       
  9911     });
       
  9912   };
       
  9913   const handleResizeStop = (_event, _direction, ref) => {
       
  9914     setIsResizing(false);
       
  9915     if (!isOversized) {
 10939       return;
  9916       return;
 10940     }
  9917     }
 10941 
  9918     setIsOversized(false);
 10942     let animationFrame = null;
  9919     const remainingWidth = ref.ownerDocument.documentElement.offsetWidth - ref.offsetWidth;
 10943 
  9920     if (remainingWidth > SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD) {
 10944     function resizeHeight() {
  9921       // Reset the initial aspect ratio if the frame is resized slightly
 10945       if (!animationFrame) {
  9922       // above the sidebar but not far enough to trigger full screen.
 10946         // Throttle the updates on animation frame.
  9923       setFrameSize(INITIAL_FRAME_SIZE);
 10947         animationFrame = iframe.contentWindow.requestAnimationFrame(() => {
  9924     } else {
 10948           setHeight(iframe.contentDocument.documentElement.scrollHeight);
  9925       // Trigger full screen if the frame is resized far enough to the left.
 10949           animationFrame = null;
  9926       setCanvasMode('edit');
       
  9927     }
       
  9928   };
       
  9929 
       
  9930   // Handle resize by arrow keys
       
  9931   const handleResizableHandleKeyDown = event => {
       
  9932     if (!['ArrowLeft', 'ArrowRight'].includes(event.key)) {
       
  9933       return;
       
  9934     }
       
  9935     event.preventDefault();
       
  9936     const step = 20 * (event.shiftKey ? 5 : 1);
       
  9937     const delta = step * (event.key === 'ArrowLeft' ? 1 : -1);
       
  9938     const newWidth = Math.min(Math.max(FRAME_MIN_WIDTH, frameRef.current.resizable.offsetWidth + delta), defaultSize.width);
       
  9939     setFrameSize({
       
  9940       width: newWidth,
       
  9941       height: calculateNewHeight(newWidth, defaultAspectRatio)
       
  9942     });
       
  9943   };
       
  9944   const frameAnimationVariants = {
       
  9945     default: {
       
  9946       flexGrow: 0,
       
  9947       height: frameSize.height
       
  9948     },
       
  9949     fullWidth: {
       
  9950       flexGrow: 1,
       
  9951       height: frameSize.height
       
  9952     }
       
  9953   };
       
  9954   const resizeHandleVariants = {
       
  9955     hidden: {
       
  9956       opacity: 0,
       
  9957       left: 0
       
  9958     },
       
  9959     visible: {
       
  9960       opacity: 1,
       
  9961       left: -14 // Account for the handle's width.
       
  9962     },
       
  9963     active: {
       
  9964       opacity: 1,
       
  9965       left: -14,
       
  9966       // Account for the handle's width.
       
  9967       scaleY: 1.3
       
  9968     }
       
  9969   };
       
  9970   const currentResizeHandleVariant = (() => {
       
  9971     if (isResizing) {
       
  9972       return 'active';
       
  9973     }
       
  9974     return shouldShowHandle ? 'visible' : 'hidden';
       
  9975   })();
       
  9976   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ResizableBox, {
       
  9977     as: external_wp_components_namespaceObject.__unstableMotion.div,
       
  9978     ref: frameRef,
       
  9979     initial: false,
       
  9980     variants: frameAnimationVariants,
       
  9981     animate: isFullWidth ? 'fullWidth' : 'default',
       
  9982     onAnimationComplete: definition => {
       
  9983       if (definition === 'fullWidth') {
       
  9984         setFrameSize({
       
  9985           width: '100%',
       
  9986           height: '100%'
 10950         });
  9987         });
 10951       }
  9988       }
 10952     }
       
 10953 
       
 10954     let resizeObserver;
       
 10955 
       
 10956     function registerObserver() {
       
 10957       var _resizeObserver;
       
 10958 
       
 10959       (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 ? void 0 : _resizeObserver.disconnect();
       
 10960       resizeObserver = new iframe.contentWindow.ResizeObserver(resizeHeight); // Observing the <html> rather than the <body> because the latter
       
 10961       // gets destroyed and remounted after initialization in <Iframe>.
       
 10962 
       
 10963       resizeObserver.observe(iframe.contentDocument.documentElement);
       
 10964       resizeHeight();
       
 10965     } // This is only required in Firefox for some unknown reasons.
       
 10966 
       
 10967 
       
 10968     iframe.addEventListener('load', registerObserver); // This is required in Chrome and Safari.
       
 10969 
       
 10970     registerObserver();
       
 10971     return () => {
       
 10972       var _iframe$contentWindow, _resizeObserver2;
       
 10973 
       
 10974       (_iframe$contentWindow = iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : _iframe$contentWindow.cancelAnimationFrame(animationFrame);
       
 10975       (_resizeObserver2 = resizeObserver) === null || _resizeObserver2 === void 0 ? void 0 : _resizeObserver2.disconnect();
       
 10976       iframe.removeEventListener('load', registerObserver);
       
 10977     };
       
 10978   }, [enableResizing]);
       
 10979   const resizeWidthBy = (0,external_wp_element_namespaceObject.useCallback)(deltaPixels => {
       
 10980     if (iframeRef.current) {
       
 10981       setWidth(iframeRef.current.offsetWidth + deltaPixels);
       
 10982     }
       
 10983   }, []);
       
 10984   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
       
 10985     size: {
       
 10986       width,
       
 10987       height
       
 10988     },
  9989     },
 10989     onResizeStop: (event, direction, element) => {
  9990     whileHover: canvasMode === 'view' ? {
 10990       setWidth(element.style.width);
  9991       scale: 1.005,
       
  9992       transition: {
       
  9993         duration: disableMotion ? 0 : 0.5,
       
  9994         ease: 'easeOut'
       
  9995       }
       
  9996     } : {},
       
  9997     transition: FRAME_TRANSITION,
       
  9998     size: frameSize,
       
  9999     enable: {
       
 10000       top: false,
       
 10001       right: false,
       
 10002       bottom: false,
       
 10003       // Resizing will be disabled until the editor content is loaded.
       
 10004       left: isReady,
       
 10005       topRight: false,
       
 10006       bottomRight: false,
       
 10007       bottomLeft: false,
       
 10008       topLeft: false
 10991     },
 10009     },
 10992     minWidth: 300,
 10010     resizeRatio: resizeRatio,
 10993     maxWidth: "100%",
       
 10994     maxHeight: "100%",
       
 10995     enable: {
       
 10996       right: enableResizing,
       
 10997       left: enableResizing
       
 10998     },
       
 10999     showHandle: enableResizing // The editor is centered horizontally, resizing it only
       
 11000     // moves half the distance. Hence double the ratio to correctly
       
 11001     // align the cursor to the resizer handle.
       
 11002     ,
       
 11003     resizeRatio: 2,
       
 11004     handleComponent: {
       
 11005       left: (0,external_wp_element_namespaceObject.createElement)(ResizeHandle, {
       
 11006         direction: "left",
       
 11007         resizeWidthBy: resizeWidthBy
       
 11008       }),
       
 11009       right: (0,external_wp_element_namespaceObject.createElement)(ResizeHandle, {
       
 11010         direction: "right",
       
 11011         resizeWidthBy: resizeWidthBy
       
 11012       })
       
 11013     },
       
 11014     handleClasses: undefined,
 10011     handleClasses: undefined,
 11015     handleStyles: {
 10012     handleStyles: {
 11016       left: HANDLE_STYLES_OVERRIDE,
 10013       left: HANDLE_STYLES_OVERRIDE,
 11017       right: HANDLE_STYLES_OVERRIDE
 10014       right: HANDLE_STYLES_OVERRIDE
       
 10015     },
       
 10016     minWidth: FRAME_MIN_WIDTH,
       
 10017     maxWidth: isFullWidth ? '100%' : '150%',
       
 10018     maxHeight: "100%",
       
 10019     onFocus: () => setShouldShowHandle(true),
       
 10020     onBlur: () => setShouldShowHandle(false),
       
 10021     onMouseOver: () => setShouldShowHandle(true),
       
 10022     onMouseOut: () => setShouldShowHandle(false),
       
 10023     handleComponent: {
       
 10024       left: canvasMode === 'view' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 10025         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
       
 10026           text: (0,external_wp_i18n_namespaceObject.__)('Drag to resize'),
       
 10027           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.button, {
       
 10028             role: "separator",
       
 10029             "aria-orientation": "vertical",
       
 10030             className: dist_clsx('edit-site-resizable-frame__handle', {
       
 10031               'is-resizing': isResizing
       
 10032             }),
       
 10033             variants: resizeHandleVariants,
       
 10034             animate: currentResizeHandleVariant,
       
 10035             "aria-label": (0,external_wp_i18n_namespaceObject.__)('Drag to resize'),
       
 10036             "aria-describedby": resizableHandleHelpId,
       
 10037             "aria-valuenow": frameRef.current?.resizable?.offsetWidth || undefined,
       
 10038             "aria-valuemin": FRAME_MIN_WIDTH,
       
 10039             "aria-valuemax": defaultSize.width,
       
 10040             onKeyDown: handleResizableHandleKeyDown,
       
 10041             initial: "hidden",
       
 10042             exit: "hidden",
       
 10043             whileFocus: "active",
       
 10044             whileHover: "active"
       
 10045           }, "handle")
       
 10046         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 10047           hidden: true,
       
 10048           id: resizableHandleHelpId,
       
 10049           children: (0,external_wp_i18n_namespaceObject.__)('Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.')
       
 10050         })]
       
 10051       })
       
 10052     },
       
 10053     onResizeStart: handleResizeStart,
       
 10054     onResize: handleResize,
       
 10055     onResizeStop: handleResizeStop,
       
 10056     className: dist_clsx('edit-site-resizable-frame__inner', {
       
 10057       'is-resizing': isResizing
       
 10058     }),
       
 10059     showHandle: false // Do not show the default handle, as we're using a custom one.
       
 10060     ,
       
 10061     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 10062       className: "edit-site-resizable-frame__inner-content",
       
 10063       style: innerContentStyle,
       
 10064       children: children
       
 10065     })
       
 10066   });
       
 10067 }
       
 10068 /* harmony default export */ const resizable_frame = (ResizableFrame);
       
 10069 
       
 10070 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js
       
 10071 /**
       
 10072  * WordPress dependencies
       
 10073  */
       
 10074 
       
 10075 
       
 10076 
       
 10077 
       
 10078 /**
       
 10079  * Internal dependencies
       
 10080  */
       
 10081 
       
 10082 
       
 10083 const {
       
 10084   useLocation: use_sync_canvas_mode_with_url_useLocation,
       
 10085   useHistory: use_sync_canvas_mode_with_url_useHistory
       
 10086 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 10087 function useSyncCanvasModeWithURL() {
       
 10088   const history = use_sync_canvas_mode_with_url_useHistory();
       
 10089   const {
       
 10090     params
       
 10091   } = use_sync_canvas_mode_with_url_useLocation();
       
 10092   const canvasMode = (0,external_wp_data_namespaceObject.useSelect)(select => lock_unlock_unlock(select(store)).getCanvasMode(), []);
       
 10093   const {
       
 10094     setCanvasMode
       
 10095   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 10096   const currentCanvasMode = (0,external_wp_element_namespaceObject.useRef)(canvasMode);
       
 10097   const {
       
 10098     canvas: canvasInUrl
       
 10099   } = params;
       
 10100   const currentCanvasInUrl = (0,external_wp_element_namespaceObject.useRef)(canvasInUrl);
       
 10101   const currentUrlParams = (0,external_wp_element_namespaceObject.useRef)(params);
       
 10102   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 10103     currentUrlParams.current = params;
       
 10104   }, [params]);
       
 10105   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 10106     currentCanvasMode.current = canvasMode;
       
 10107     if (canvasMode === 'init') {
       
 10108       return;
 11018     }
 10109     }
 11019   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableIframe, extends_extends({
 10110     if (canvasMode === 'edit' && currentCanvasInUrl.current !== canvasMode) {
 11020     style: enableResizing ? undefined : deviceStyles,
 10111       history.push({
 11021     head: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
 10112         ...currentUrlParams.current,
 11022       styles: settings.styles
 10113         canvas: 'edit'
 11023     }), (0,external_wp_element_namespaceObject.createElement)("style", null, // Forming a "block formatting context" to prevent margin collapsing.
 10114       });
 11024     // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
 10115     }
 11025     `.is-root-container { display: flow-root; }`), enableResizing && (0,external_wp_element_namespaceObject.createElement)("style", null, // Force the <html> and <body>'s heights to fit the content.
 10116     if (canvasMode === 'view' && currentCanvasInUrl.current !== undefined) {
 11026     `html, body { height: -moz-fit-content !important; height: fit-content !important; min-height: 0 !important; }`, // Some themes will have `min-height: 100vh` for the root container,
 10117       history.push({
 11027     // which isn't a requirement in auto resize mode.
 10118         ...currentUrlParams.current,
 11028     `.is-root-container { min-height: 0 !important; }`)),
 10119         canvas: undefined
 11029     assets: settings.__unstableResolvedAssets,
 10120       });
 11030     ref: ref,
 10121     }
 11031     name: "editor-canvas",
 10122   }, [canvasMode, history]);
 11032     className: "edit-site-visual-editor__editor-canvas"
 10123   (0,external_wp_element_namespaceObject.useEffect)(() => {
 11033   }, props), settings.svgFilters, children));
 10124     currentCanvasInUrl.current = canvasInUrl;
 11034 }
 10125     if (canvasInUrl !== 'edit' && currentCanvasMode.current !== 'view') {
 11035 
 10126       setCanvasMode('view');
 11036 /* harmony default export */ var resizable_editor = (ResizableEditor);
 10127     } else if (canvasInUrl === 'edit' && currentCanvasMode.current !== 'edit') {
 11037 
 10128       setCanvasMode('edit');
 11038 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/index.js
 10129     }
 11039 
 10130   }, [canvasInUrl, setCanvasMode]);
 11040 
 10131 }
 11041 
 10132 
 11042 /**
 10133 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcuts/register.js
 11043  * External dependencies
       
 11044  */
       
 11045 
       
 11046 
       
 11047 /**
 10134 /**
 11048  * WordPress dependencies
 10135  * WordPress dependencies
 11049  */
 10136  */
 11050 
 10137 
 11051 
 10138 
 11052 
 10139 
 11053 
       
 11054 
       
 11055 
       
 11056 
       
 11057 
       
 11058 
       
 11059 
       
 11060 
       
 11061 /**
       
 11062  * Internal dependencies
       
 11063  */
       
 11064 
       
 11065 
       
 11066 
       
 11067 
       
 11068 
       
 11069 
       
 11070 
       
 11071 
       
 11072 
       
 11073 const LAYOUT = {
       
 11074   type: 'default',
       
 11075   // At the root level of the site editor, no alignments should be allowed.
       
 11076   alignments: []
       
 11077 };
       
 11078 function BlockEditor(_ref) {
       
 11079   var _storedSettings$__exp, _storedSettings$__exp2;
       
 11080 
       
 11081   let {
       
 11082     setIsInserterOpen
       
 11083   } = _ref;
       
 11084   const {
       
 11085     storedSettings,
       
 11086     templateType,
       
 11087     templateId,
       
 11088     page
       
 11089   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11090     const {
       
 11091       getSettings,
       
 11092       getEditedPostType,
       
 11093       getEditedPostId,
       
 11094       getPage
       
 11095     } = select(store_store);
       
 11096     return {
       
 11097       storedSettings: getSettings(setIsInserterOpen),
       
 11098       templateType: getEditedPostType(),
       
 11099       templateId: getEditedPostId(),
       
 11100       page: getPage()
       
 11101     };
       
 11102   }, [setIsInserterOpen]);
       
 11103   const settingsBlockPatterns = (_storedSettings$__exp = storedSettings.__experimentalAdditionalBlockPatterns) !== null && _storedSettings$__exp !== void 0 ? _storedSettings$__exp : // WP 6.0
       
 11104   storedSettings.__experimentalBlockPatterns; // WP 5.9
       
 11105 
       
 11106   const settingsBlockPatternCategories = (_storedSettings$__exp2 = storedSettings.__experimentalAdditionalBlockPatternCategories) !== null && _storedSettings$__exp2 !== void 0 ? _storedSettings$__exp2 : // WP 6.0
       
 11107   storedSettings.__experimentalBlockPatternCategories; // WP 5.9
       
 11108 
       
 11109   const {
       
 11110     restBlockPatterns,
       
 11111     restBlockPatternCategories
       
 11112   } = (0,external_wp_data_namespaceObject.useSelect)(select => ({
       
 11113     restBlockPatterns: select(external_wp_coreData_namespaceObject.store).getBlockPatterns(),
       
 11114     restBlockPatternCategories: select(external_wp_coreData_namespaceObject.store).getBlockPatternCategories()
       
 11115   }), []);
       
 11116   const blockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_lodash_namespaceObject.unionBy)(settingsBlockPatterns, restBlockPatterns, 'name'), [settingsBlockPatterns, restBlockPatterns]);
       
 11117   const blockPatternCategories = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_lodash_namespaceObject.unionBy)(settingsBlockPatternCategories, restBlockPatternCategories, 'name'), [settingsBlockPatternCategories, restBlockPatternCategories]);
       
 11118   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => ({ ...(0,external_lodash_namespaceObject.omit)(storedSettings, ['__experimentalAdditionalBlockPatterns', '__experimentalAdditionalBlockPatternCategories']),
       
 11119     __experimentalBlockPatterns: blockPatterns,
       
 11120     __experimentalBlockPatternCategories: blockPatternCategories
       
 11121   }), [storedSettings, blockPatterns, blockPatternCategories]);
       
 11122   const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', templateType);
       
 11123   const {
       
 11124     setPage
       
 11125   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
 11126   const {
       
 11127     enableComplementaryArea
       
 11128   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 11129   const openNavigationSidebar = (0,external_wp_element_namespaceObject.useCallback)(() => {
       
 11130     enableComplementaryArea('core/edit-site', 'edit-site/navigation-menu');
       
 11131   }, [enableComplementaryArea]);
       
 11132   const contentRef = (0,external_wp_element_namespaceObject.useRef)();
       
 11133   const mergedRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([contentRef, (0,external_wp_blockEditor_namespaceObject.__unstableUseTypingObserver)()]);
       
 11134   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small', '<');
       
 11135   const {
       
 11136     clearSelectedBlock
       
 11137   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
 11138   const isTemplatePart = templateType === 'wp_template_part';
       
 11139   const hasBlocks = blocks.length !== 0;
       
 11140 
       
 11141   const NavMenuSidebarToggle = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
       
 11142     className: "components-toolbar__control",
       
 11143     label: (0,external_wp_i18n_namespaceObject.__)('Open list view'),
       
 11144     onClick: openNavigationSidebar,
       
 11145     icon: list_view
       
 11146   })); // Conditionally include NavMenu sidebar in Plugin only.
       
 11147   // Optimise for dead code elimination.
       
 11148   // See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.
       
 11149 
       
 11150 
       
 11151   let MaybeNavMenuSidebarToggle = external_wp_element_namespaceObject.Fragment;
       
 11152 
       
 11153   if (false) {}
       
 11154 
       
 11155   return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockEditorProvider, {
       
 11156     settings: settings,
       
 11157     value: blocks,
       
 11158     onInput: onInput,
       
 11159     onChange: onChange,
       
 11160     useSubRegistry: false
       
 11161   }, (0,external_wp_element_namespaceObject.createElement)(EditTemplatePartMenuButton, null), (0,external_wp_element_namespaceObject.createElement)(TemplatePartConverter, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl.ViewerFill, null, (0,external_wp_element_namespaceObject.useCallback)(fillProps => (0,external_wp_element_namespaceObject.createElement)(NavigateToLink, extends_extends({}, fillProps, {
       
 11162     activePage: page,
       
 11163     onActivePageChange: setPage
       
 11164   })), [page])), (0,external_wp_element_namespaceObject.createElement)(SidebarInspectorFill, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockInspector, null)), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTools, {
       
 11165     className: classnames_default()('edit-site-visual-editor', {
       
 11166       'is-focus-mode': isTemplatePart
       
 11167     }),
       
 11168     __unstableContentRef: contentRef,
       
 11169     onClick: event => {
       
 11170       // Clear selected block when clicking on the gray background.
       
 11171       if (event.target === event.currentTarget) {
       
 11172         clearSelectedBlock();
       
 11173       }
       
 11174     }
       
 11175   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockEditorKeyboardShortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(back_button, null), (0,external_wp_element_namespaceObject.createElement)(resizable_editor // Reinitialize the editor and reset the states when the template changes.
       
 11176   , {
       
 11177     key: templateId,
       
 11178     enableResizing: isTemplatePart && // Disable resizing in mobile viewport.
       
 11179     !isMobileViewport,
       
 11180     settings: settings,
       
 11181     contentRef: mergedRefs
       
 11182   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, {
       
 11183     className: "edit-site-block-editor__block-list wp-site-blocks",
       
 11184     __experimentalLayout: LAYOUT,
       
 11185     renderAppender: isTemplatePart && hasBlocks ? false : undefined
       
 11186   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, null, _ref2 => {
       
 11187     let {
       
 11188       onClose
       
 11189     } = _ref2;
       
 11190     return (0,external_wp_element_namespaceObject.createElement)(BlockInspectorButton, {
       
 11191       onClick: onClose
       
 11192     });
       
 11193   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockToolbarLastItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockNameContext.Consumer, null, blockName => blockName === 'core/navigation' && (0,external_wp_element_namespaceObject.createElement)(MaybeNavMenuSidebarToggle, null)))), (0,external_wp_element_namespaceObject.createElement)(external_wp_reusableBlocks_namespaceObject.ReusableBlocksMenuItems, null));
       
 11194 }
       
 11195 
       
 11196 // EXTERNAL MODULE: ./node_modules/react-autosize-textarea/lib/index.js
       
 11197 var lib = __webpack_require__(773);
       
 11198 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/code-editor/code-editor-text-area.js
       
 11199 
       
 11200 
       
 11201 /**
       
 11202  * External dependencies
       
 11203  */
       
 11204 
       
 11205 /**
       
 11206  * WordPress dependencies
       
 11207  */
       
 11208 
       
 11209 /**
       
 11210  * WordPress dependencies
       
 11211  */
       
 11212 
       
 11213 /**
       
 11214  * WordPress dependencies
       
 11215  */
       
 11216 
       
 11217 
       
 11218 
       
 11219 
       
 11220 
       
 11221 function CodeEditorTextArea(_ref) {
       
 11222   let {
       
 11223     value,
       
 11224     onChange,
       
 11225     onInput
       
 11226   } = _ref;
       
 11227   const [stateValue, setStateValue] = (0,external_wp_element_namespaceObject.useState)(value);
       
 11228   const [isDirty, setIsDirty] = (0,external_wp_element_namespaceObject.useState)(false);
       
 11229   const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(CodeEditorTextArea);
       
 11230 
       
 11231   if (!isDirty && stateValue !== value) {
       
 11232     setStateValue(value);
       
 11233   }
       
 11234   /**
       
 11235    * Handles a textarea change event to notify the onChange prop callback and
       
 11236    * reflect the new value in the component's own state. This marks the start
       
 11237    * of the user's edits, if not already changed, preventing future props
       
 11238    * changes to value from replacing the rendered value. This is expected to
       
 11239    * be followed by a reset to dirty state via `stopEditing`.
       
 11240    *
       
 11241    * @see stopEditing
       
 11242    *
       
 11243    * @param {Event} event Change event.
       
 11244    */
       
 11245 
       
 11246 
       
 11247   const onChangeHandler = event => {
       
 11248     const newValue = event.target.value;
       
 11249     onInput(newValue);
       
 11250     setStateValue(newValue);
       
 11251     setIsDirty(true);
       
 11252   };
       
 11253   /**
       
 11254    * Function called when the user has completed their edits, responsible for
       
 11255    * ensuring that changes, if made, are surfaced to the onPersist prop
       
 11256    * callback and resetting dirty state.
       
 11257    */
       
 11258 
       
 11259 
       
 11260   const stopEditing = () => {
       
 11261     if (isDirty) {
       
 11262       onChange(stateValue);
       
 11263       setIsDirty(false);
       
 11264     }
       
 11265   };
       
 11266 
       
 11267   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
       
 11268     as: "label",
       
 11269     htmlFor: `code-editor-text-area-${instanceId}`
       
 11270   }, (0,external_wp_i18n_namespaceObject.__)('Type text or HTML')), (0,external_wp_element_namespaceObject.createElement)(lib/* default */.Z, {
       
 11271     autoComplete: "off",
       
 11272     dir: "auto",
       
 11273     value: stateValue,
       
 11274     onChange: onChangeHandler,
       
 11275     onBlur: stopEditing,
       
 11276     className: "edit-site-code-editor-text-area",
       
 11277     id: `code-editor-text-area-${instanceId}`,
       
 11278     placeholder: (0,external_wp_i18n_namespaceObject.__)('Start writing with text or HTML')
       
 11279   }));
       
 11280 }
       
 11281 
       
 11282 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/code-editor/index.js
       
 11283 
       
 11284 
       
 11285 /**
       
 11286  * WordPress dependencies
       
 11287  */
       
 11288 
       
 11289 
       
 11290 
       
 11291 
       
 11292 
       
 11293 
       
 11294 /**
       
 11295  * Internal dependencies
       
 11296  */
       
 11297 
       
 11298 
       
 11299 
       
 11300 function CodeEditor() {
       
 11301   const {
       
 11302     templateType,
       
 11303     shortcut
       
 11304   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11305     const {
       
 11306       getEditedPostType
       
 11307     } = select(store_store);
       
 11308     const {
       
 11309       getShortcutRepresentation
       
 11310     } = select(external_wp_keyboardShortcuts_namespaceObject.store);
       
 11311     return {
       
 11312       templateType: getEditedPostType(),
       
 11313       shortcut: getShortcutRepresentation('core/edit-site/toggle-mode')
       
 11314     };
       
 11315   }, []);
       
 11316   const [contentStructure, setContent] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', templateType, 'content');
       
 11317   const [blocks,, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', templateType);
       
 11318   const content = contentStructure instanceof Function ? contentStructure({
       
 11319     blocks
       
 11320   }) : contentStructure;
       
 11321   const {
       
 11322     switchEditorMode
       
 11323   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
 11324   return (0,external_wp_element_namespaceObject.createElement)("div", {
       
 11325     className: "edit-site-code-editor"
       
 11326   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
 11327     className: "edit-site-code-editor__toolbar"
       
 11328   }, (0,external_wp_element_namespaceObject.createElement)("h2", null, (0,external_wp_i18n_namespaceObject.__)('Editing code')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 11329     variant: "tertiary",
       
 11330     onClick: () => switchEditorMode('visual'),
       
 11331     shortcut: shortcut
       
 11332   }, (0,external_wp_i18n_namespaceObject.__)('Exit code editor'))), (0,external_wp_element_namespaceObject.createElement)("div", {
       
 11333     className: "edit-site-code-editor__body"
       
 11334   }, (0,external_wp_element_namespaceObject.createElement)(CodeEditorTextArea, {
       
 11335     value: content,
       
 11336     onChange: newContent => {
       
 11337       onChange((0,external_wp_blocks_namespaceObject.parse)(newContent), {
       
 11338         selection: undefined
       
 11339       });
       
 11340     },
       
 11341     onInput: setContent
       
 11342   })));
       
 11343 }
       
 11344 
       
 11345 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcuts/index.js
       
 11346 /**
       
 11347  * WordPress dependencies
       
 11348  */
       
 11349 
       
 11350 
       
 11351 
       
 11352 
       
 11353 
       
 11354 
       
 11355 /**
       
 11356  * Internal dependencies
       
 11357  */
       
 11358 
       
 11359 
       
 11360 
       
 11361 
       
 11362 
       
 11363 function KeyboardShortcuts(_ref) {
       
 11364   let {
       
 11365     openEntitiesSavedStates
       
 11366   } = _ref;
       
 11367   const {
       
 11368     __experimentalGetDirtyEntityRecords,
       
 11369     isSavingEntityRecord
       
 11370   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store);
       
 11371   const {
       
 11372     getEditorMode
       
 11373   } = (0,external_wp_data_namespaceObject.useSelect)(store_store);
       
 11374   const isListViewOpen = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).isListViewOpened(), []);
       
 11375   const isBlockInspectorOpen = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(store_store.name) === SIDEBAR_BLOCK, []);
       
 11376   const {
       
 11377     redo,
       
 11378     undo
       
 11379   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 11380   const {
       
 11381     setIsListViewOpened,
       
 11382     switchEditorMode
       
 11383   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
 11384   const {
       
 11385     enableComplementaryArea,
       
 11386     disableComplementaryArea
       
 11387   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 11388   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/save', event => {
       
 11389     event.preventDefault();
       
 11390 
       
 11391     const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
       
 11392 
       
 11393     const isDirty = !!dirtyEntityRecords.length;
       
 11394     const isSaving = dirtyEntityRecords.some(record => isSavingEntityRecord(record.kind, record.name, record.key));
       
 11395 
       
 11396     if (!isSaving && isDirty) {
       
 11397       openEntitiesSavedStates();
       
 11398     }
       
 11399   });
       
 11400   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/undo', event => {
       
 11401     undo();
       
 11402     event.preventDefault();
       
 11403   });
       
 11404   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/redo', event => {
       
 11405     redo();
       
 11406     event.preventDefault();
       
 11407   });
       
 11408   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/toggle-list-view', () => {
       
 11409     setIsListViewOpened(!isListViewOpen);
       
 11410   });
       
 11411   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/toggle-block-settings-sidebar', event => {
       
 11412     // This shortcut has no known clashes, but use preventDefault to prevent any
       
 11413     // obscure shortcuts from triggering.
       
 11414     event.preventDefault();
       
 11415 
       
 11416     if (isBlockInspectorOpen) {
       
 11417       disableComplementaryArea(STORE_NAME);
       
 11418     } else {
       
 11419       enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
       
 11420     }
       
 11421   });
       
 11422   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/toggle-mode', () => {
       
 11423     switchEditorMode(getEditorMode() === 'visual' ? 'text' : 'visual');
       
 11424   });
       
 11425   return null;
       
 11426 }
       
 11427 
 10140 
 11428 function KeyboardShortcutsRegister() {
 10141 function KeyboardShortcutsRegister() {
 11429   // Registering the shortcuts.
 10142   // Registering the shortcuts.
 11430   const {
 10143   const {
 11431     registerShortcut
 10144     registerShortcut
 11438       keyCombination: {
 10151       keyCombination: {
 11439         modifier: 'primary',
 10152         modifier: 'primary',
 11440         character: 's'
 10153         character: 's'
 11441       }
 10154       }
 11442     });
 10155     });
 11443     registerShortcut({
 10156   }, [registerShortcut]);
 11444       name: 'core/edit-site/undo',
 10157   return null;
 11445       category: 'global',
 10158 }
 11446       description: (0,external_wp_i18n_namespaceObject.__)('Undo your last changes.'),
 10159 /* harmony default export */ const register = (KeyboardShortcutsRegister);
 11447       keyCombination: {
 10160 
 11448         modifier: 'primary',
 10161 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcuts/global.js
 11449         character: 'z'
 10162 /**
       
 10163  * WordPress dependencies
       
 10164  */
       
 10165 
       
 10166 
       
 10167 
       
 10168 
       
 10169 
       
 10170 /**
       
 10171  * Internal dependencies
       
 10172  */
       
 10173 
       
 10174 
       
 10175 function KeyboardShortcutsGlobal() {
       
 10176   const {
       
 10177     __experimentalGetDirtyEntityRecords,
       
 10178     isSavingEntityRecord
       
 10179   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store);
       
 10180   const {
       
 10181     hasNonPostEntityChanges
       
 10182   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_editor_namespaceObject.store);
       
 10183   const {
       
 10184     getCanvasMode
       
 10185   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useSelect)(store));
       
 10186   const {
       
 10187     setIsSaveViewOpened
       
 10188   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 10189   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-site/save', event => {
       
 10190     event.preventDefault();
       
 10191     const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
       
 10192     const hasDirtyEntities = !!dirtyEntityRecords.length;
       
 10193     const isSaving = dirtyEntityRecords.some(record => isSavingEntityRecord(record.kind, record.name, record.key));
       
 10194     const _hasNonPostEntityChanges = hasNonPostEntityChanges();
       
 10195     const isViewMode = getCanvasMode() === 'view';
       
 10196     if ((!hasDirtyEntities || !_hasNonPostEntityChanges || isSaving) && !isViewMode) {
       
 10197       return;
       
 10198     }
       
 10199     // At this point, we know that there are dirty entities, other than
       
 10200     // the edited post, and we're not in the process of saving, so open
       
 10201     // save view.
       
 10202     setIsSaveViewOpened(true);
       
 10203   });
       
 10204   return null;
       
 10205 }
       
 10206 /* harmony default export */ const global = (KeyboardShortcutsGlobal);
       
 10207 
       
 10208 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/styles.js
       
 10209 /**
       
 10210  * WordPress dependencies
       
 10211  */
       
 10212 
       
 10213 
       
 10214 const styles = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10215   viewBox: "0 0 24 24",
       
 10216   xmlns: "http://www.w3.org/2000/svg",
       
 10217   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10218     d: "M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"
       
 10219   })
       
 10220 });
       
 10221 /* harmony default export */ const library_styles = (styles);
       
 10222 
       
 10223 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/help.js
       
 10224 /**
       
 10225  * WordPress dependencies
       
 10226  */
       
 10227 
       
 10228 
       
 10229 const help = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10230   xmlns: "http://www.w3.org/2000/svg",
       
 10231   viewBox: "0 0 24 24",
       
 10232   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10233     d: "M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"
       
 10234   })
       
 10235 });
       
 10236 /* harmony default export */ const library_help = (help);
       
 10237 
       
 10238 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rotate-right.js
       
 10239 /**
       
 10240  * WordPress dependencies
       
 10241  */
       
 10242 
       
 10243 
       
 10244 const rotateRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10245   xmlns: "http://www.w3.org/2000/svg",
       
 10246   viewBox: "0 0 24 24",
       
 10247   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10248     d: "M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"
       
 10249   })
       
 10250 });
       
 10251 /* harmony default export */ const rotate_right = (rotateRight);
       
 10252 
       
 10253 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rotate-left.js
       
 10254 /**
       
 10255  * WordPress dependencies
       
 10256  */
       
 10257 
       
 10258 
       
 10259 const rotateLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10260   xmlns: "http://www.w3.org/2000/svg",
       
 10261   viewBox: "0 0 24 24",
       
 10262   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10263     d: "M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"
       
 10264   })
       
 10265 });
       
 10266 /* harmony default export */ const rotate_left = (rotateLeft);
       
 10267 
       
 10268 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/brush.js
       
 10269 /**
       
 10270  * WordPress dependencies
       
 10271  */
       
 10272 
       
 10273 
       
 10274 const brush = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10275   xmlns: "http://www.w3.org/2000/svg",
       
 10276   viewBox: "0 0 24 24",
       
 10277   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10278     d: "M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"
       
 10279   })
       
 10280 });
       
 10281 /* harmony default export */ const library_brush = (brush);
       
 10282 
       
 10283 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/backup.js
       
 10284 /**
       
 10285  * WordPress dependencies
       
 10286  */
       
 10287 
       
 10288 
       
 10289 const backup = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10290   xmlns: "http://www.w3.org/2000/svg",
       
 10291   viewBox: "0 0 24 24",
       
 10292   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10293     d: "M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"
       
 10294   })
       
 10295 });
       
 10296 /* harmony default export */ const library_backup = (backup);
       
 10297 
       
 10298 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
       
 10299 /**
       
 10300  * WordPress dependencies
       
 10301  */
       
 10302 
       
 10303 
       
 10304 const external = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10305   xmlns: "http://www.w3.org/2000/svg",
       
 10306   viewBox: "0 0 24 24",
       
 10307   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10308     d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
       
 10309   })
       
 10310 });
       
 10311 /* harmony default export */ const library_external = (external);
       
 10312 
       
 10313 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/commands/use-common-commands.js
       
 10314 /**
       
 10315  * WordPress dependencies
       
 10316  */
       
 10317 
       
 10318 
       
 10319 
       
 10320 
       
 10321 
       
 10322 
       
 10323 
       
 10324 
       
 10325 
       
 10326 
       
 10327 /**
       
 10328  * Internal dependencies
       
 10329  */
       
 10330 
       
 10331 
       
 10332 const {
       
 10333   useGlobalStylesReset
       
 10334 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 10335 const {
       
 10336   useHistory: use_common_commands_useHistory,
       
 10337   useLocation: use_common_commands_useLocation
       
 10338 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 10339 function useGlobalStylesOpenStylesCommands() {
       
 10340   const {
       
 10341     openGeneralSidebar,
       
 10342     setCanvasMode
       
 10343   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 10344   const {
       
 10345     params
       
 10346   } = use_common_commands_useLocation();
       
 10347   const {
       
 10348     getCanvasMode
       
 10349   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useSelect)(store));
       
 10350   const history = use_common_commands_useHistory();
       
 10351   const isBlockBasedTheme = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10352     return select(external_wp_coreData_namespaceObject.store).getCurrentTheme().is_block_theme;
       
 10353   }, []);
       
 10354   const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 10355     if (!isBlockBasedTheme) {
       
 10356       return [];
       
 10357     }
       
 10358     return [{
       
 10359       name: 'core/edit-site/open-styles',
       
 10360       label: (0,external_wp_i18n_namespaceObject.__)('Open styles'),
       
 10361       callback: ({
       
 10362         close
       
 10363       }) => {
       
 10364         close();
       
 10365         if (!params.postId) {
       
 10366           history.push({
       
 10367             path: '/wp_global_styles',
       
 10368             canvas: 'edit'
       
 10369           });
       
 10370         }
       
 10371         if (params.postId && getCanvasMode() !== 'edit') {
       
 10372           setCanvasMode('edit');
       
 10373         }
       
 10374         openGeneralSidebar('edit-site/global-styles');
       
 10375       },
       
 10376       icon: library_styles
       
 10377     }];
       
 10378   }, [history, openGeneralSidebar, setCanvasMode, getCanvasMode, isBlockBasedTheme, params.postId]);
       
 10379   return {
       
 10380     isLoading: false,
       
 10381     commands
       
 10382   };
       
 10383 }
       
 10384 function useGlobalStylesToggleWelcomeGuideCommands() {
       
 10385   const {
       
 10386     openGeneralSidebar,
       
 10387     setCanvasMode
       
 10388   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 10389   const {
       
 10390     params
       
 10391   } = use_common_commands_useLocation();
       
 10392   const {
       
 10393     getCanvasMode
       
 10394   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useSelect)(store));
       
 10395   const {
       
 10396     set
       
 10397   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
 10398   const history = use_common_commands_useHistory();
       
 10399   const isBlockBasedTheme = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10400     return select(external_wp_coreData_namespaceObject.store).getCurrentTheme().is_block_theme;
       
 10401   }, []);
       
 10402   const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 10403     if (!isBlockBasedTheme) {
       
 10404       return [];
       
 10405     }
       
 10406     return [{
       
 10407       name: 'core/edit-site/toggle-styles-welcome-guide',
       
 10408       label: (0,external_wp_i18n_namespaceObject.__)('Learn about styles'),
       
 10409       callback: ({
       
 10410         close
       
 10411       }) => {
       
 10412         close();
       
 10413         if (!params.postId) {
       
 10414           history.push({
       
 10415             path: '/wp_global_styles',
       
 10416             canvas: 'edit'
       
 10417           });
       
 10418         }
       
 10419         if (params.postId && getCanvasMode() !== 'edit') {
       
 10420           setCanvasMode('edit');
       
 10421         }
       
 10422         openGeneralSidebar('edit-site/global-styles');
       
 10423         set('core/edit-site', 'welcomeGuideStyles', true);
       
 10424         // sometimes there's a focus loss that happens after some time
       
 10425         // that closes the modal, we need to force reopening it.
       
 10426         setTimeout(() => {
       
 10427           set('core/edit-site', 'welcomeGuideStyles', true);
       
 10428         }, 500);
       
 10429       },
       
 10430       icon: library_help
       
 10431     }];
       
 10432   }, [history, openGeneralSidebar, setCanvasMode, getCanvasMode, isBlockBasedTheme, set, params.postId]);
       
 10433   return {
       
 10434     isLoading: false,
       
 10435     commands
       
 10436   };
       
 10437 }
       
 10438 function useGlobalStylesResetCommands() {
       
 10439   const [canReset, onReset] = useGlobalStylesReset();
       
 10440   const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 10441     if (!canReset) {
       
 10442       return [];
       
 10443     }
       
 10444     return [{
       
 10445       name: 'core/edit-site/reset-global-styles',
       
 10446       label: (0,external_wp_i18n_namespaceObject.__)('Reset styles'),
       
 10447       icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? rotate_right : rotate_left,
       
 10448       callback: ({
       
 10449         close
       
 10450       }) => {
       
 10451         close();
       
 10452         onReset();
       
 10453       }
       
 10454     }];
       
 10455   }, [canReset, onReset]);
       
 10456   return {
       
 10457     isLoading: false,
       
 10458     commands
       
 10459   };
       
 10460 }
       
 10461 function useGlobalStylesOpenCssCommands() {
       
 10462   const {
       
 10463     openGeneralSidebar,
       
 10464     setEditorCanvasContainerView,
       
 10465     setCanvasMode
       
 10466   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 10467   const {
       
 10468     params
       
 10469   } = use_common_commands_useLocation();
       
 10470   const history = use_common_commands_useHistory();
       
 10471   const {
       
 10472     canEditCSS
       
 10473   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10474     const {
       
 10475       getEntityRecord,
       
 10476       __experimentalGetCurrentGlobalStylesId
       
 10477     } = select(external_wp_coreData_namespaceObject.store);
       
 10478     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 10479     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 10480     return {
       
 10481       canEditCSS: !!globalStyles?._links?.['wp:action-edit-css']
       
 10482     };
       
 10483   }, []);
       
 10484   const {
       
 10485     getCanvasMode
       
 10486   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useSelect)(store));
       
 10487   const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 10488     if (!canEditCSS) {
       
 10489       return [];
       
 10490     }
       
 10491     return [{
       
 10492       name: 'core/edit-site/open-styles-css',
       
 10493       label: (0,external_wp_i18n_namespaceObject.__)('Customize CSS'),
       
 10494       icon: library_brush,
       
 10495       callback: ({
       
 10496         close
       
 10497       }) => {
       
 10498         close();
       
 10499         if (!params.postId) {
       
 10500           history.push({
       
 10501             path: '/wp_global_styles',
       
 10502             canvas: 'edit'
       
 10503           });
       
 10504         }
       
 10505         if (params.postId && getCanvasMode() !== 'edit') {
       
 10506           setCanvasMode('edit');
       
 10507         }
       
 10508         openGeneralSidebar('edit-site/global-styles');
       
 10509         setEditorCanvasContainerView('global-styles-css');
       
 10510       }
       
 10511     }];
       
 10512   }, [history, openGeneralSidebar, setEditorCanvasContainerView, canEditCSS, getCanvasMode, setCanvasMode, params.postId]);
       
 10513   return {
       
 10514     isLoading: false,
       
 10515     commands
       
 10516   };
       
 10517 }
       
 10518 function useGlobalStylesOpenRevisionsCommands() {
       
 10519   const {
       
 10520     openGeneralSidebar,
       
 10521     setEditorCanvasContainerView,
       
 10522     setCanvasMode
       
 10523   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 10524   const {
       
 10525     getCanvasMode
       
 10526   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useSelect)(store));
       
 10527   const {
       
 10528     params
       
 10529   } = use_common_commands_useLocation();
       
 10530   const history = use_common_commands_useHistory();
       
 10531   const hasRevisions = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10532     const {
       
 10533       getEntityRecord,
       
 10534       __experimentalGetCurrentGlobalStylesId
       
 10535     } = select(external_wp_coreData_namespaceObject.store);
       
 10536     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 10537     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 10538     return !!globalStyles?._links?.['version-history']?.[0]?.count;
       
 10539   }, []);
       
 10540   const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 10541     if (!hasRevisions) {
       
 10542       return [];
       
 10543     }
       
 10544     return [{
       
 10545       name: 'core/edit-site/open-global-styles-revisions',
       
 10546       label: (0,external_wp_i18n_namespaceObject.__)('Style revisions'),
       
 10547       icon: library_backup,
       
 10548       callback: ({
       
 10549         close
       
 10550       }) => {
       
 10551         close();
       
 10552         if (!params.postId) {
       
 10553           history.push({
       
 10554             path: '/wp_global_styles',
       
 10555             canvas: 'edit'
       
 10556           });
       
 10557         }
       
 10558         if (params.postId && getCanvasMode() !== 'edit') {
       
 10559           setCanvasMode('edit');
       
 10560         }
       
 10561         openGeneralSidebar('edit-site/global-styles');
       
 10562         setEditorCanvasContainerView('global-styles-revisions');
       
 10563       }
       
 10564     }];
       
 10565   }, [hasRevisions, history, openGeneralSidebar, setEditorCanvasContainerView, getCanvasMode, setCanvasMode, params.postId]);
       
 10566   return {
       
 10567     isLoading: false,
       
 10568     commands
       
 10569   };
       
 10570 }
       
 10571 function useCommonCommands() {
       
 10572   const homeUrl = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10573     const {
       
 10574       getUnstableBase // Site index.
       
 10575     } = select(external_wp_coreData_namespaceObject.store);
       
 10576     return getUnstableBase()?.home;
       
 10577   }, []);
       
 10578   (0,external_wp_commands_namespaceObject.useCommand)({
       
 10579     name: 'core/edit-site/view-site',
       
 10580     label: (0,external_wp_i18n_namespaceObject.__)('View site'),
       
 10581     callback: ({
       
 10582       close
       
 10583     }) => {
       
 10584       close();
       
 10585       window.open(homeUrl, '_blank');
       
 10586     },
       
 10587     icon: library_external
       
 10588   });
       
 10589   (0,external_wp_commands_namespaceObject.useCommandLoader)({
       
 10590     name: 'core/edit-site/open-styles',
       
 10591     hook: useGlobalStylesOpenStylesCommands
       
 10592   });
       
 10593   (0,external_wp_commands_namespaceObject.useCommandLoader)({
       
 10594     name: 'core/edit-site/toggle-styles-welcome-guide',
       
 10595     hook: useGlobalStylesToggleWelcomeGuideCommands
       
 10596   });
       
 10597   (0,external_wp_commands_namespaceObject.useCommandLoader)({
       
 10598     name: 'core/edit-site/reset-global-styles',
       
 10599     hook: useGlobalStylesResetCommands
       
 10600   });
       
 10601   (0,external_wp_commands_namespaceObject.useCommandLoader)({
       
 10602     name: 'core/edit-site/open-styles-css',
       
 10603     hook: useGlobalStylesOpenCssCommands
       
 10604   });
       
 10605   (0,external_wp_commands_namespaceObject.useCommandLoader)({
       
 10606     name: 'core/edit-site/open-styles-revisions',
       
 10607     hook: useGlobalStylesOpenRevisionsCommands
       
 10608   });
       
 10609 }
       
 10610 
       
 10611 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
       
 10612 /**
       
 10613  * WordPress dependencies
       
 10614  */
       
 10615 
       
 10616 
       
 10617 const layout = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10618   xmlns: "http://www.w3.org/2000/svg",
       
 10619   viewBox: "0 0 24 24",
       
 10620   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10621     d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
       
 10622   })
       
 10623 });
       
 10624 /* harmony default export */ const library_layout = (layout);
       
 10625 
       
 10626 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
       
 10627 /**
       
 10628  * WordPress dependencies
       
 10629  */
       
 10630 
       
 10631 
       
 10632 
       
 10633 const page = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, {
       
 10634   xmlns: "http://www.w3.org/2000/svg",
       
 10635   viewBox: "0 0 24 24",
       
 10636   children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10637     d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"
       
 10638   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10639     d: "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"
       
 10640   })]
       
 10641 });
       
 10642 /* harmony default export */ const library_page = (page);
       
 10643 
       
 10644 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/trash.js
       
 10645 /**
       
 10646  * WordPress dependencies
       
 10647  */
       
 10648 
       
 10649 
       
 10650 const trash = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 10651   xmlns: "http://www.w3.org/2000/svg",
       
 10652   viewBox: "0 0 24 24",
       
 10653   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 10654     fillRule: "evenodd",
       
 10655     clipRule: "evenodd",
       
 10656     d: "M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"
       
 10657   })
       
 10658 });
       
 10659 /* harmony default export */ const library_trash = (trash);
       
 10660 
       
 10661 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/use-edited-entity-record/index.js
       
 10662 /**
       
 10663  * WordPress dependencies
       
 10664  */
       
 10665 
       
 10666 
       
 10667 
       
 10668 
       
 10669 
       
 10670 /**
       
 10671  * Internal dependencies
       
 10672  */
       
 10673 
       
 10674 function useEditedEntityRecord(postType, postId) {
       
 10675   const {
       
 10676     record,
       
 10677     title,
       
 10678     description,
       
 10679     isLoaded,
       
 10680     icon
       
 10681   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10682     const {
       
 10683       getEditedPostType,
       
 10684       getEditedPostId
       
 10685     } = select(store);
       
 10686     const {
       
 10687       getEditedEntityRecord,
       
 10688       hasFinishedResolution
       
 10689     } = select(external_wp_coreData_namespaceObject.store);
       
 10690     const {
       
 10691       __experimentalGetTemplateInfo: getTemplateInfo
       
 10692     } = select(external_wp_editor_namespaceObject.store);
       
 10693     const usedPostType = postType !== null && postType !== void 0 ? postType : getEditedPostType();
       
 10694     const usedPostId = postId !== null && postId !== void 0 ? postId : getEditedPostId();
       
 10695     const _record = getEditedEntityRecord('postType', usedPostType, usedPostId);
       
 10696     const _isLoaded = usedPostId && hasFinishedResolution('getEditedEntityRecord', ['postType', usedPostType, usedPostId]);
       
 10697     const templateInfo = getTemplateInfo(_record);
       
 10698     return {
       
 10699       record: _record,
       
 10700       title: templateInfo.title,
       
 10701       description: templateInfo.description,
       
 10702       isLoaded: _isLoaded,
       
 10703       icon: templateInfo.icon
       
 10704     };
       
 10705   }, [postType, postId]);
       
 10706   return {
       
 10707     isLoaded,
       
 10708     icon,
       
 10709     record,
       
 10710     getTitle: () => title ? (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) : null,
       
 10711     getDescription: () => description ? (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(description) : null
       
 10712   };
       
 10713 }
       
 10714 
       
 10715 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/is-template-removable.js
       
 10716 /**
       
 10717  * Internal dependencies
       
 10718  */
       
 10719 
       
 10720 
       
 10721 /**
       
 10722  * Check if a template is removable.
       
 10723  *
       
 10724  * @param {Object} template The template entity to check.
       
 10725  * @return {boolean} Whether the template is revertable.
       
 10726  */
       
 10727 function isTemplateRemovable(template) {
       
 10728   if (!template) {
       
 10729     return false;
       
 10730   }
       
 10731   return template.source === TEMPLATE_ORIGINS.custom && !template.has_theme_file;
       
 10732 }
       
 10733 
       
 10734 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/is-template-revertable.js
       
 10735 /**
       
 10736  * Internal dependencies
       
 10737  */
       
 10738 
       
 10739 
       
 10740 /**
       
 10741  * Check if a template is revertable to its original theme-provided template file.
       
 10742  *
       
 10743  * @param {Object} template The template entity to check.
       
 10744  * @return {boolean} Whether the template is revertable.
       
 10745  */
       
 10746 function isTemplateRevertable(template) {
       
 10747   if (!template) {
       
 10748     return false;
       
 10749   }
       
 10750   /* eslint-disable camelcase */
       
 10751   return template?.source === TEMPLATE_ORIGINS.custom && template?.has_theme_file;
       
 10752   /* eslint-enable camelcase */
       
 10753 }
       
 10754 
       
 10755 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/is-previewing-theme.js
       
 10756 /**
       
 10757  * WordPress dependencies
       
 10758  */
       
 10759 
       
 10760 function isPreviewingTheme() {
       
 10761   return (0,external_wp_url_namespaceObject.getQueryArg)(window.location.href, 'wp_theme_preview') !== undefined;
       
 10762 }
       
 10763 function currentlyPreviewingTheme() {
       
 10764   if (isPreviewingTheme()) {
       
 10765     return (0,external_wp_url_namespaceObject.getQueryArg)(window.location.href, 'wp_theme_preview');
       
 10766   }
       
 10767   return null;
       
 10768 }
       
 10769 
       
 10770 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/link.js
       
 10771 /**
       
 10772  * WordPress dependencies
       
 10773  */
       
 10774 
       
 10775 
       
 10776 
       
 10777 /**
       
 10778  * Internal dependencies
       
 10779  */
       
 10780 
       
 10781 
       
 10782 
       
 10783 const {
       
 10784   useHistory: link_useHistory
       
 10785 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 10786 function useLink(params, state, shouldReplace = false) {
       
 10787   const history = link_useHistory();
       
 10788   function onClick(event) {
       
 10789     event?.preventDefault();
       
 10790     if (shouldReplace) {
       
 10791       history.replace(params, state);
       
 10792     } else {
       
 10793       history.push(params, state);
       
 10794     }
       
 10795   }
       
 10796   const currentArgs = (0,external_wp_url_namespaceObject.getQueryArgs)(window.location.href);
       
 10797   const currentUrlWithoutArgs = (0,external_wp_url_namespaceObject.removeQueryArgs)(window.location.href, ...Object.keys(currentArgs));
       
 10798   if (isPreviewingTheme()) {
       
 10799     params = {
       
 10800       ...params,
       
 10801       wp_theme_preview: currentlyPreviewingTheme()
       
 10802     };
       
 10803   }
       
 10804   const newUrl = (0,external_wp_url_namespaceObject.addQueryArgs)(currentUrlWithoutArgs, params);
       
 10805   return {
       
 10806     href: newUrl,
       
 10807     onClick
       
 10808   };
       
 10809 }
       
 10810 function Link({
       
 10811   params = {},
       
 10812   state,
       
 10813   replace: shouldReplace = false,
       
 10814   children,
       
 10815   ...props
       
 10816 }) {
       
 10817   const {
       
 10818     href,
       
 10819     onClick
       
 10820   } = useLink(params, state, shouldReplace);
       
 10821   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
       
 10822     href: href,
       
 10823     onClick: onClick,
       
 10824     ...props,
       
 10825     children: children
       
 10826   });
       
 10827 }
       
 10828 
       
 10829 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/commands/use-edit-mode-commands.js
       
 10830 /**
       
 10831  * WordPress dependencies
       
 10832  */
       
 10833 
       
 10834 
       
 10835 
       
 10836 
       
 10837 
       
 10838 
       
 10839 
       
 10840 
       
 10841 /**
       
 10842  * Internal dependencies
       
 10843  */
       
 10844 
       
 10845 
       
 10846 
       
 10847 
       
 10848 
       
 10849 
       
 10850 
       
 10851 const {
       
 10852   useHistory: use_edit_mode_commands_useHistory
       
 10853 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 10854 function usePageContentFocusCommands() {
       
 10855   const {
       
 10856     record: template
       
 10857   } = useEditedEntityRecord();
       
 10858   const {
       
 10859     isPage,
       
 10860     canvasMode,
       
 10861     templateId,
       
 10862     currentPostType
       
 10863   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 10864     const {
       
 10865       isPage: _isPage,
       
 10866       getCanvasMode
       
 10867     } = lock_unlock_unlock(select(store));
       
 10868     const {
       
 10869       getCurrentPostType,
       
 10870       getCurrentTemplateId
       
 10871     } = select(external_wp_editor_namespaceObject.store);
       
 10872     return {
       
 10873       isPage: _isPage(),
       
 10874       canvasMode: getCanvasMode(),
       
 10875       templateId: getCurrentTemplateId(),
       
 10876       currentPostType: getCurrentPostType()
       
 10877     };
       
 10878   }, []);
       
 10879   const {
       
 10880     onClick: editTemplate
       
 10881   } = useLink({
       
 10882     postType: 'wp_template',
       
 10883     postId: templateId
       
 10884   });
       
 10885   const {
       
 10886     setRenderingMode
       
 10887   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
       
 10888   if (!isPage || canvasMode !== 'edit') {
       
 10889     return {
       
 10890       isLoading: false,
       
 10891       commands: []
       
 10892     };
       
 10893   }
       
 10894   const commands = [];
       
 10895   if (currentPostType !== 'wp_template') {
       
 10896     commands.push({
       
 10897       name: 'core/switch-to-template-focus',
       
 10898       label: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template title */
       
 10899       (0,external_wp_i18n_namespaceObject.__)('Edit template: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)),
       
 10900       icon: library_layout,
       
 10901       callback: ({
       
 10902         close
       
 10903       }) => {
       
 10904         editTemplate();
       
 10905         close();
 11450       }
 10906       }
 11451     });
 10907     });
 11452     registerShortcut({
 10908   } else {
 11453       name: 'core/edit-site/redo',
 10909     commands.push({
 11454       category: 'global',
 10910       name: 'core/switch-to-page-focus',
 11455       description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
 10911       label: (0,external_wp_i18n_namespaceObject.__)('Back to page'),
 11456       keyCombination: {
 10912       icon: library_page,
 11457         modifier: 'primaryShift',
 10913       callback: ({
 11458         character: 'z'
 10914         close
       
 10915       }) => {
       
 10916         setRenderingMode('template-locked');
       
 10917         close();
 11459       }
 10918       }
 11460     });
 10919     });
 11461     registerShortcut({
 10920   }
 11462       name: 'core/edit-site/toggle-list-view',
 10921   return {
 11463       category: 'global',
 10922     isLoading: false,
 11464       description: (0,external_wp_i18n_namespaceObject.__)('Open the block list view.'),
 10923     commands
 11465       keyCombination: {
 10924   };
 11466         modifier: 'access',
 10925 }
 11467         character: 'o'
 10926 function useManipulateDocumentCommands() {
       
 10927   const {
       
 10928     isLoaded,
       
 10929     record: template
       
 10930   } = useEditedEntityRecord();
       
 10931   const {
       
 10932     removeTemplate,
       
 10933     revertTemplate
       
 10934   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 10935   const history = use_edit_mode_commands_useHistory();
       
 10936   const isEditingPage = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isPage() && select(external_wp_editor_namespaceObject.store).getCurrentPostType() !== 'wp_template', []);
       
 10937   if (!isLoaded) {
       
 10938     return {
       
 10939       isLoading: true,
       
 10940       commands: []
       
 10941     };
       
 10942   }
       
 10943   const commands = [];
       
 10944   if (isTemplateRevertable(template) && !isEditingPage) {
       
 10945     const label = template.type === TEMPLATE_POST_TYPE ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template title */
       
 10946     (0,external_wp_i18n_namespaceObject.__)('Reset template: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template part title */
       
 10947     (0,external_wp_i18n_namespaceObject.__)('Reset template part: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title));
       
 10948     commands.push({
       
 10949       name: 'core/reset-template',
       
 10950       label,
       
 10951       icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? rotate_right : rotate_left,
       
 10952       callback: ({
       
 10953         close
       
 10954       }) => {
       
 10955         revertTemplate(template);
       
 10956         close();
 11468       }
 10957       }
 11469     });
 10958     });
 11470     registerShortcut({
 10959   }
 11471       name: 'core/edit-site/toggle-block-settings-sidebar',
 10960   if (isTemplateRemovable(template) && !isEditingPage) {
 11472       category: 'global',
 10961     const label = template.type === TEMPLATE_POST_TYPE ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template title */
 11473       description: (0,external_wp_i18n_namespaceObject.__)('Show or hide the block settings sidebar.'),
 10962     (0,external_wp_i18n_namespaceObject.__)('Delete template: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template part title */
 11474       keyCombination: {
 10963     (0,external_wp_i18n_namespaceObject.__)('Delete template part: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title));
 11475         modifier: 'primaryShift',
 10964     commands.push({
 11476         character: ','
 10965       name: 'core/remove-template',
       
 10966       label,
       
 10967       icon: library_trash,
       
 10968       callback: ({
       
 10969         close
       
 10970       }) => {
       
 10971         removeTemplate(template);
       
 10972         // Navigate to the template list
       
 10973         history.push({
       
 10974           postType: template.type
       
 10975         });
       
 10976         close();
 11477       }
 10977       }
 11478     });
 10978     });
 11479     registerShortcut({
 10979   }
 11480       name: 'core/edit-site/keyboard-shortcuts',
 10980   return {
 11481       category: 'main',
 10981     isLoading: !isLoaded,
 11482       description: (0,external_wp_i18n_namespaceObject.__)('Display these keyboard shortcuts.'),
 10982     commands
 11483       keyCombination: {
 10983   };
 11484         modifier: 'access',
 10984 }
 11485         character: 'h'
 10985 function useEditModeCommands() {
 11486       }
 10986   (0,external_wp_commands_namespaceObject.useCommandLoader)({
 11487     });
 10987     name: 'core/edit-site/page-content-focus',
 11488     registerShortcut({
 10988     hook: usePageContentFocusCommands,
 11489       name: 'core/edit-site/next-region',
 10989     context: 'entity-edit'
 11490       category: 'global',
 10990   });
 11491       description: (0,external_wp_i18n_namespaceObject.__)('Navigate to the next part of the editor.'),
 10991   (0,external_wp_commands_namespaceObject.useCommandLoader)({
 11492       keyCombination: {
 10992     name: 'core/edit-site/manipulate-document',
 11493         modifier: 'ctrl',
 10993     hook: useManipulateDocumentCommands
 11494         character: '`'
 10994   });
 11495       },
 10995 }
 11496       aliases: [{
 10996 
 11497         modifier: 'access',
 10997 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/layout/hooks.js
 11498         character: 'n'
       
 11499       }]
       
 11500     });
       
 11501     registerShortcut({
       
 11502       name: 'core/edit-site/previous-region',
       
 11503       category: 'global',
       
 11504       description: (0,external_wp_i18n_namespaceObject.__)('Navigate to the previous part of the editor.'),
       
 11505       keyCombination: {
       
 11506         modifier: 'ctrlShift',
       
 11507         character: '`'
       
 11508       },
       
 11509       aliases: [{
       
 11510         modifier: 'access',
       
 11511         character: 'p'
       
 11512       }]
       
 11513     });
       
 11514     registerShortcut({
       
 11515       name: 'core/edit-site/toggle-mode',
       
 11516       category: 'global',
       
 11517       description: (0,external_wp_i18n_namespaceObject.__)('Switch between visual editor and code editor.'),
       
 11518       keyCombination: {
       
 11519         modifier: 'secondary',
       
 11520         character: 'm'
       
 11521       }
       
 11522     });
       
 11523   }, [registerShortcut]);
       
 11524   return null;
       
 11525 }
       
 11526 
       
 11527 KeyboardShortcuts.Register = KeyboardShortcutsRegister;
       
 11528 /* harmony default export */ var keyboard_shortcuts = (KeyboardShortcuts);
       
 11529 
       
 11530 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/url-query-controller/index.js
       
 11531 /**
 10998 /**
 11532  * WordPress dependencies
 10999  * WordPress dependencies
 11533  */
 11000  */
 11534 
 11001 
 11535 
 11002 
       
 11003 
       
 11004 
 11536 /**
 11005 /**
 11537  * Internal dependencies
 11006  * Internal dependencies
 11538  */
 11007  */
 11539 
 11008 
 11540 
 11009 const MAX_LOADING_TIME = 10000; // 10 seconds
 11541 
 11010 
 11542 function URLQueryController() {
 11011 function useIsSiteEditorLoading() {
 11543   const {
 11012   const {
 11544     setTemplate,
 11013     isLoaded: hasLoadedPost
 11545     setTemplatePart,
 11014   } = useEditedEntityRecord();
 11546     setPage
 11015   const [loaded, setLoaded] = (0,external_wp_element_namespaceObject.useState)(false);
 11547   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
 11016   const inLoadingPause = (0,external_wp_data_namespaceObject.useSelect)(select => {
 11548   const {
 11017     const hasResolvingSelectors = select(external_wp_coreData_namespaceObject.store).hasResolvingSelectors();
 11549     params: {
 11018     return !loaded && !hasResolvingSelectors;
 11550       postId,
 11019   }, [loaded]);
 11551       postType
 11020 
       
 11021   /*
       
 11022    * If the maximum expected loading time has passed, we're marking the
       
 11023    * editor as loaded, in order to prevent any failed requests from blocking
       
 11024    * the editor canvas from appearing.
       
 11025    */
       
 11026   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 11027     let timeout;
       
 11028     if (!loaded) {
       
 11029       timeout = setTimeout(() => {
       
 11030         setLoaded(true);
       
 11031       }, MAX_LOADING_TIME);
 11552     }
 11032     }
 11553   } = useLocation(); // Set correct entity on page navigation.
 11033     return () => {
 11554 
 11034       clearTimeout(timeout);
       
 11035     };
       
 11036   }, [loaded]);
 11555   (0,external_wp_element_namespaceObject.useEffect)(() => {
 11037   (0,external_wp_element_namespaceObject.useEffect)(() => {
 11556     if ('page' === postType || 'post' === postType) {
 11038     if (inLoadingPause) {
 11557       setPage({
 11039       /*
 11558         context: {
 11040        * We're using an arbitrary 100ms timeout here to catch brief
 11559           postType,
 11041        * moments without any resolving selectors that would result in
 11560           postId
 11042        * displaying brief flickers of loading state and loaded state.
 11561         }
 11043        *
 11562       }); // Resolves correct template based on ID.
 11044        * It's worth experimenting with different values, since this also
 11563     } else if ('wp_template' === postType) {
 11045        * adds 100ms of artificial delay after loading has finished.
 11564       setTemplate(postId);
 11046        */
 11565     } else if ('wp_template_part' === postType) {
 11047       const ARTIFICIAL_DELAY = 100;
 11566       setTemplatePart(postId);
 11048       const timeout = setTimeout(() => {
       
 11049         setLoaded(true);
       
 11050       }, ARTIFICIAL_DELAY);
       
 11051       return () => {
       
 11052         clearTimeout(timeout);
       
 11053       };
 11567     }
 11054     }
 11568   }, [postId, postType]);
 11055   }, [inLoadingPause]);
 11569   return null;
 11056   return !loaded || !hasLoadedPost;
 11570 }
 11057 }
 11571 
 11058 
 11572 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
 11059 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/image.js
 11573 
 11060 
 11574 
 11061 
       
 11062 function WelcomeGuideImage({
       
 11063   nonAnimatedSrc,
       
 11064   animatedSrc
       
 11065 }) {
       
 11066   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("picture", {
       
 11067     className: "edit-site-welcome-guide__image",
       
 11068     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", {
       
 11069       srcSet: nonAnimatedSrc,
       
 11070       media: "(prefers-reduced-motion: reduce)"
       
 11071     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
       
 11072       src: animatedSrc,
       
 11073       width: "312",
       
 11074       height: "240",
       
 11075       alt: ""
       
 11076     })]
       
 11077   });
       
 11078 }
       
 11079 
       
 11080 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/editor.js
 11575 /**
 11081 /**
 11576  * WordPress dependencies
 11082  * WordPress dependencies
 11577  */
 11083  */
 11578 
 11084 
 11579 const close_close = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 11580   xmlns: "http://www.w3.org/2000/svg",
       
 11581   viewBox: "0 0 24 24"
       
 11582 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 11583   d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
       
 11584 }));
       
 11585 /* harmony default export */ var library_close = (close_close);
       
 11586 
       
 11587 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/secondary-sidebar/inserter-sidebar.js
       
 11588 
       
 11589 
       
 11590 
       
 11591 /**
       
 11592  * WordPress dependencies
       
 11593  */
       
 11594 
       
 11595 
 11085 
 11596 
 11086 
 11597 
 11087 
 11598 
 11088 
 11599 
 11089 
 11601 /**
 11091 /**
 11602  * Internal dependencies
 11092  * Internal dependencies
 11603  */
 11093  */
 11604 
 11094 
 11605 
 11095 
 11606 function InserterSidebar() {
       
 11607   const {
       
 11608     setIsInserterOpened
       
 11609   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
 11610   const insertionPoint = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).__experimentalGetInsertionPoint(), []);
       
 11611   const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
       
 11612   const TagName = !isMobile ? external_wp_components_namespaceObject.VisuallyHidden : 'div';
       
 11613   const [inserterDialogRef, inserterDialogProps] = (0,external_wp_compose_namespaceObject.__experimentalUseDialog)({
       
 11614     onClose: () => setIsInserterOpened(false),
       
 11615     focusOnMount: null
       
 11616   });
       
 11617   const libraryRef = (0,external_wp_element_namespaceObject.useRef)();
       
 11618   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 11619     libraryRef.current.focusSearch();
       
 11620   }, []);
       
 11621   return (0,external_wp_element_namespaceObject.createElement)("div", extends_extends({
       
 11622     ref: inserterDialogRef
       
 11623   }, inserterDialogProps, {
       
 11624     className: "edit-site-editor__inserter-panel"
       
 11625   }), (0,external_wp_element_namespaceObject.createElement)(TagName, {
       
 11626     className: "edit-site-editor__inserter-panel-header"
       
 11627   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 11628     icon: library_close,
       
 11629     label: (0,external_wp_i18n_namespaceObject.__)('Close block inserter'),
       
 11630     onClick: () => setIsInserterOpened(false)
       
 11631   })), (0,external_wp_element_namespaceObject.createElement)("div", {
       
 11632     className: "edit-site-editor__inserter-panel-content"
       
 11633   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, {
       
 11634     showInserterHelpPanel: true,
       
 11635     shouldFocusBlock: isMobile,
       
 11636     rootClientId: insertionPoint.rootClientId,
       
 11637     __experimentalInsertionIndex: insertionPoint.insertionIndex,
       
 11638     __experimentalFilterValue: insertionPoint.filterValue,
       
 11639     ref: libraryRef
       
 11640   })));
       
 11641 }
       
 11642 
       
 11643 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/secondary-sidebar/list-view-sidebar.js
       
 11644 
       
 11645 
       
 11646 /**
       
 11647  * WordPress dependencies
       
 11648  */
       
 11649 
       
 11650 
       
 11651 
       
 11652 
       
 11653 
       
 11654 
       
 11655 
       
 11656 /**
       
 11657  * Internal dependencies
       
 11658  */
       
 11659 
       
 11660 
       
 11661 function ListViewSidebar() {
       
 11662   const {
       
 11663     setIsListViewOpened
       
 11664   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
 11665   const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)('firstElement');
       
 11666   const headerFocusReturnRef = (0,external_wp_compose_namespaceObject.useFocusReturn)();
       
 11667   const contentFocusReturnRef = (0,external_wp_compose_namespaceObject.useFocusReturn)();
       
 11668 
       
 11669   function closeOnEscape(event) {
       
 11670     if (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE && !event.defaultPrevented) {
       
 11671       setIsListViewOpened(false);
       
 11672     }
       
 11673   }
       
 11674 
       
 11675   const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ListViewSidebar);
       
 11676   const labelId = `edit-site-editor__list-view-panel-label-${instanceId}`;
       
 11677   return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions
       
 11678     (0,external_wp_element_namespaceObject.createElement)("div", {
       
 11679       "aria-labelledby": labelId,
       
 11680       className: "edit-site-editor__list-view-panel",
       
 11681       onKeyDown: closeOnEscape
       
 11682     }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
 11683       className: "edit-site-editor__list-view-panel-header",
       
 11684       ref: headerFocusReturnRef
       
 11685     }, (0,external_wp_element_namespaceObject.createElement)("strong", {
       
 11686       id: labelId
       
 11687     }, (0,external_wp_i18n_namespaceObject.__)('List View')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 11688       icon: close_small,
       
 11689       label: (0,external_wp_i18n_namespaceObject.__)('Close List View Sidebar'),
       
 11690       onClick: () => setIsListViewOpened(false)
       
 11691     })), (0,external_wp_element_namespaceObject.createElement)("div", {
       
 11692       className: "edit-site-editor__list-view-panel-content",
       
 11693       ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([contentFocusReturnRef, focusOnMountRef])
       
 11694     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalListView, {
       
 11695       showNestedBlocks: true,
       
 11696       __experimentalFeatures: true,
       
 11697       __experimentalPersistentListViewFeatures: true
       
 11698     })))
       
 11699   );
       
 11700 }
       
 11701 
       
 11702 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/error-boundary/warning.js
       
 11703 
       
 11704 
       
 11705 /**
       
 11706  * WordPress dependencies
       
 11707  */
       
 11708 
       
 11709 
       
 11710 
       
 11711 
       
 11712 
       
 11713 function CopyButton(_ref) {
       
 11714   let {
       
 11715     text,
       
 11716     children
       
 11717   } = _ref;
       
 11718   const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text);
       
 11719   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 11720     variant: "secondary",
       
 11721     ref: ref
       
 11722   }, children);
       
 11723 }
       
 11724 
       
 11725 function ErrorBoundaryWarning(_ref2) {
       
 11726   let {
       
 11727     message,
       
 11728     error,
       
 11729     reboot,
       
 11730     dashboardLink
       
 11731   } = _ref2;
       
 11732   const actions = [];
       
 11733 
       
 11734   if (reboot) {
       
 11735     actions.push((0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 11736       key: "recovery",
       
 11737       onClick: reboot,
       
 11738       variant: "secondary"
       
 11739     }, (0,external_wp_i18n_namespaceObject.__)('Attempt Recovery')));
       
 11740   }
       
 11741 
       
 11742   if (error) {
       
 11743     actions.push((0,external_wp_element_namespaceObject.createElement)(CopyButton, {
       
 11744       key: "copy-error",
       
 11745       text: error.stack
       
 11746     }, (0,external_wp_i18n_namespaceObject.__)('Copy Error')));
       
 11747   }
       
 11748 
       
 11749   if (dashboardLink) {
       
 11750     actions.push((0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 11751       key: "back-to-dashboard",
       
 11752       variant: "secondary",
       
 11753       href: dashboardLink
       
 11754     }, (0,external_wp_i18n_namespaceObject.__)('Back to dashboard')));
       
 11755   }
       
 11756 
       
 11757   return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, {
       
 11758     className: "editor-error-boundary",
       
 11759     actions: actions
       
 11760   }, message);
       
 11761 }
       
 11762 
       
 11763 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/error-boundary/index.js
       
 11764 
       
 11765 
       
 11766 /**
       
 11767  * WordPress dependencies
       
 11768  */
       
 11769 
       
 11770 
       
 11771 /**
       
 11772  * Internal dependencies
       
 11773  */
       
 11774 
       
 11775 
       
 11776 class ErrorBoundary extends external_wp_element_namespaceObject.Component {
       
 11777   constructor() {
       
 11778     super(...arguments);
       
 11779     this.reboot = this.reboot.bind(this);
       
 11780     this.state = {
       
 11781       error: null
       
 11782     };
       
 11783   }
       
 11784 
       
 11785   static getDerivedStateFromError(error) {
       
 11786     return {
       
 11787       error
       
 11788     };
       
 11789   }
       
 11790 
       
 11791   reboot() {
       
 11792     this.props.onError();
       
 11793   }
       
 11794 
       
 11795   render() {
       
 11796     const {
       
 11797       error
       
 11798     } = this.state;
       
 11799 
       
 11800     if (!error) {
       
 11801       return this.props.children;
       
 11802     }
       
 11803 
       
 11804     return (0,external_wp_element_namespaceObject.createElement)(ErrorBoundaryWarning, {
       
 11805       message: (0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error.'),
       
 11806       error: error,
       
 11807       reboot: this.reboot
       
 11808     });
       
 11809   }
       
 11810 
       
 11811 }
       
 11812 
       
 11813 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/image.js
       
 11814 
       
 11815 function WelcomeGuideImage(_ref) {
       
 11816   let {
       
 11817     nonAnimatedSrc,
       
 11818     animatedSrc
       
 11819   } = _ref;
       
 11820   return (0,external_wp_element_namespaceObject.createElement)("picture", {
       
 11821     className: "edit-site-welcome-guide__image"
       
 11822   }, (0,external_wp_element_namespaceObject.createElement)("source", {
       
 11823     srcSet: nonAnimatedSrc,
       
 11824     media: "(prefers-reduced-motion: reduce)"
       
 11825   }), (0,external_wp_element_namespaceObject.createElement)("img", {
       
 11826     src: animatedSrc,
       
 11827     width: "312",
       
 11828     height: "240",
       
 11829     alt: ""
       
 11830   }));
       
 11831 }
       
 11832 
       
 11833 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/editor.js
       
 11834 
       
 11835 
       
 11836 /**
       
 11837  * WordPress dependencies
       
 11838  */
       
 11839 
       
 11840 
       
 11841 
       
 11842 
       
 11843 
       
 11844 /**
       
 11845  * Internal dependencies
       
 11846  */
       
 11847 
 11096 
 11848 
 11097 
 11849 function WelcomeGuideEditor() {
 11098 function WelcomeGuideEditor() {
 11850   const {
 11099   const {
 11851     toggle
 11100     toggle
 11852   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
 11101   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
 11853   const isActive = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuide'), []);
 11102   const {
 11854 
 11103     isActive,
 11855   if (!isActive) {
 11104     isBlockBasedTheme
       
 11105   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11106     return {
       
 11107       isActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuide'),
       
 11108       isBlockBasedTheme: select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.is_block_theme
       
 11109     };
       
 11110   }, []);
       
 11111   if (!isActive || !isBlockBasedTheme) {
 11856     return null;
 11112     return null;
 11857   }
 11113   }
 11858 
 11114   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Guide, {
 11859   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, {
 11115     className: "edit-site-welcome-guide guide-editor",
 11860     className: "edit-site-welcome-guide",
       
 11861     contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to the site editor'),
 11116     contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to the site editor'),
 11862     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get Started'),
 11117     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
 11863     onFinish: () => toggle('core/edit-site', 'welcomeGuide'),
 11118     onFinish: () => toggle('core/edit-site', 'welcomeGuide'),
 11864     pages: [{
 11119     pages: [{
 11865       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
 11120       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
 11866         nonAnimatedSrc: "https://s.w.org/images/block-editor/edit-your-site.svg?1",
 11121         nonAnimatedSrc: "https://s.w.org/images/block-editor/edit-your-site.svg?1",
 11867         animatedSrc: "https://s.w.org/images/block-editor/edit-your-site.gif?1"
 11122         animatedSrc: "https://s.w.org/images/block-editor/edit-your-site.gif?1"
 11868       }),
 11123       }),
 11869       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
 11124       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 11870         className: "edit-site-welcome-guide__heading"
 11125         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
 11871       }, (0,external_wp_i18n_namespaceObject.__)('Edit your site')), (0,external_wp_element_namespaceObject.createElement)("p", {
 11126           className: "edit-site-welcome-guide__heading",
 11872         className: "edit-site-welcome-guide__text"
 11127           children: (0,external_wp_i18n_namespaceObject.__)('Edit your site')
 11873       }, (0,external_wp_i18n_namespaceObject.__)('Design everything on your site — from the header right down to the footer — using blocks.')), (0,external_wp_element_namespaceObject.createElement)("p", {
 11128         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
 11874         className: "edit-site-welcome-guide__text"
 11129           className: "edit-site-welcome-guide__text",
 11875       }, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors.'), {
 11130           children: (0,external_wp_i18n_namespaceObject.__)('Design everything on your site — from the header right down to the footer — using blocks.')
 11876         StylesIconImage: (0,external_wp_element_namespaceObject.createElement)("img", {
 11131         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
 11877           alt: (0,external_wp_i18n_namespaceObject.__)('styles'),
 11132           className: "edit-site-welcome-guide__text",
 11878           src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"
 11133           children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors.'), {
 11879         })
 11134             StylesIconImage: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
 11880       })))
 11135               alt: (0,external_wp_i18n_namespaceObject.__)('styles'),
       
 11136               src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"
       
 11137             })
       
 11138           })
       
 11139         })]
       
 11140       })
 11881     }]
 11141     }]
 11882   });
 11142   });
 11883 }
 11143 }
 11884 
 11144 
 11885 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/styles.js
 11145 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/styles.js
 11886 
       
 11887 
       
 11888 /**
 11146 /**
 11889  * WordPress dependencies
 11147  * WordPress dependencies
 11890  */
 11148  */
 11891 
 11149 
 11892 
 11150 
 11893 
 11151 
 11894 
 11152 
 11895 
 11153 
       
 11154 
 11896 /**
 11155 /**
 11897  * Internal dependencies
 11156  * Internal dependencies
 11898  */
 11157  */
 11899 
 11158 
 11900 
 11159 
 11901 
 11160 
       
 11161 
       
 11162 
       
 11163 const {
       
 11164   interfaceStore: styles_interfaceStore
       
 11165 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
 11902 function WelcomeGuideStyles() {
 11166 function WelcomeGuideStyles() {
 11903   const {
 11167   const {
 11904     toggle
 11168     toggle
 11905   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
 11169   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
 11906   const {
 11170   const {
 11907     isActive,
 11171     isActive,
 11908     isStylesOpen
 11172     isStylesOpen
 11909   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 11173   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 11910     const sidebar = select(store).getActiveComplementaryArea(store_store.name);
 11174     const sidebar = select(styles_interfaceStore).getActiveComplementaryArea('core');
 11911     return {
 11175     return {
 11912       isActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuideStyles'),
 11176       isActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuideStyles'),
 11913       isStylesOpen: sidebar === 'edit-site/global-styles'
 11177       isStylesOpen: sidebar === 'edit-site/global-styles'
 11914     };
 11178     };
 11915   }, []);
 11179   }, []);
 11916 
       
 11917   if (!isActive || !isStylesOpen) {
 11180   if (!isActive || !isStylesOpen) {
 11918     return null;
 11181     return null;
 11919   }
 11182   }
 11920 
 11183   const welcomeLabel = (0,external_wp_i18n_namespaceObject.__)('Welcome to Styles');
 11921   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, {
 11184   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Guide, {
 11922     className: "edit-site-welcome-guide",
 11185     className: "edit-site-welcome-guide guide-styles",
 11923     contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to styles'),
 11186     contentLabel: welcomeLabel,
 11924     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get Started'),
 11187     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
 11925     onFinish: () => toggle('core/edit-site', 'welcomeGuideStyles'),
 11188     onFinish: () => toggle('core/edit-site', 'welcomeGuideStyles'),
 11926     pages: [{
 11189     pages: [{
 11927       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
 11190       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
 11928         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.svg?1",
 11191         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.svg?1",
 11929         animatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.gif?1"
 11192         animatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.gif?1"
 11930       }),
 11193       }),
 11931       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
 11194       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 11932         className: "edit-site-welcome-guide__heading"
 11195         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
 11933       }, (0,external_wp_i18n_namespaceObject.__)('Welcome to Styles')), (0,external_wp_element_namespaceObject.createElement)("p", {
 11196           className: "edit-site-welcome-guide__heading",
 11934         className: "edit-site-welcome-guide__text"
 11197           children: welcomeLabel
 11935       }, (0,external_wp_i18n_namespaceObject.__)('Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.')))
 11198         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 11199           className: "edit-site-welcome-guide__text",
       
 11200           children: (0,external_wp_i18n_namespaceObject.__)('Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.')
       
 11201         })]
       
 11202       })
 11936     }, {
 11203     }, {
 11937       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
 11204       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
 11938         nonAnimatedSrc: "https://s.w.org/images/block-editor/set-the-design.svg?1",
 11205         nonAnimatedSrc: "https://s.w.org/images/block-editor/set-the-design.svg?1",
 11939         animatedSrc: "https://s.w.org/images/block-editor/set-the-design.gif?1"
 11206         animatedSrc: "https://s.w.org/images/block-editor/set-the-design.gif?1"
 11940       }),
 11207       }),
 11941       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
 11208       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 11942         className: "edit-site-welcome-guide__heading"
 11209         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
 11943       }, (0,external_wp_i18n_namespaceObject.__)('Set the design')), (0,external_wp_element_namespaceObject.createElement)("p", {
 11210           className: "edit-site-welcome-guide__heading",
 11944         className: "edit-site-welcome-guide__text"
 11211           children: (0,external_wp_i18n_namespaceObject.__)('Set the design')
 11945       }, (0,external_wp_i18n_namespaceObject.__)('You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle! ')))
 11212         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 11213           className: "edit-site-welcome-guide__text",
       
 11214           children: (0,external_wp_i18n_namespaceObject.__)('You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!')
       
 11215         })]
       
 11216       })
 11946     }, {
 11217     }, {
 11947       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
 11218       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
 11948         nonAnimatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.svg?1",
 11219         nonAnimatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.svg?1",
 11949         animatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.gif?1"
 11220         animatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.gif?1"
 11950       }),
 11221       }),
 11951       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
 11222       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 11952         className: "edit-site-welcome-guide__heading"
 11223         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
 11953       }, (0,external_wp_i18n_namespaceObject.__)('Personalize blocks')), (0,external_wp_element_namespaceObject.createElement)("p", {
 11224           className: "edit-site-welcome-guide__heading",
 11954         className: "edit-site-welcome-guide__text"
 11225           children: (0,external_wp_i18n_namespaceObject.__)('Personalize blocks')
 11955       }, (0,external_wp_i18n_namespaceObject.__)('You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.')))
 11226         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 11227           className: "edit-site-welcome-guide__text",
       
 11228           children: (0,external_wp_i18n_namespaceObject.__)('You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.')
       
 11229         })]
       
 11230       })
 11956     }, {
 11231     }, {
 11957       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
 11232       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
 11958         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
 11233         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
 11959         animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
 11234         animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
 11960       }),
 11235       }),
 11961       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
 11236       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 11962         className: "edit-site-welcome-guide__heading"
 11237         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
 11963       }, (0,external_wp_i18n_namespaceObject.__)('Learn more')), (0,external_wp_element_namespaceObject.createElement)("p", {
 11238           className: "edit-site-welcome-guide__heading",
 11964         className: "edit-site-welcome-guide__text"
 11239           children: (0,external_wp_i18n_namespaceObject.__)('Learn more')
 11965       }, (0,external_wp_i18n_namespaceObject.__)('New to block themes and styling your site? '), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
 11240         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
 11966         href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/styles-overview/')
 11241           className: "edit-site-welcome-guide__text",
 11967       }, (0,external_wp_i18n_namespaceObject.__)('Here’s a detailed guide to learn how to make the most of it.'))))
 11242           children: [(0,external_wp_i18n_namespaceObject.__)('New to block themes and styling your site?'), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
       
 11243             href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/styles-overview/'),
       
 11244             children: (0,external_wp_i18n_namespaceObject.__)('Here’s a detailed guide to learn how to make the most of it.')
       
 11245           })]
       
 11246         })]
       
 11247       })
 11968     }]
 11248     }]
 11969   });
 11249   });
 11970 }
 11250 }
 11971 
 11251 
       
 11252 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/page.js
       
 11253 /**
       
 11254  * WordPress dependencies
       
 11255  */
       
 11256 
       
 11257 
       
 11258 
       
 11259 
       
 11260 
       
 11261 /**
       
 11262  * Internal dependencies
       
 11263  */
       
 11264 
       
 11265 
       
 11266 
       
 11267 
       
 11268 function WelcomeGuidePage() {
       
 11269   const {
       
 11270     toggle
       
 11271   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
 11272   const isVisible = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11273     const isPageActive = !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuidePage');
       
 11274     const isEditorActive = !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuide');
       
 11275     const {
       
 11276       isPage
       
 11277     } = select(store);
       
 11278     return isPageActive && !isEditorActive && isPage();
       
 11279   }, []);
       
 11280   if (!isVisible) {
       
 11281     return null;
       
 11282   }
       
 11283   const heading = (0,external_wp_i18n_namespaceObject.__)('Editing a page');
       
 11284   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Guide, {
       
 11285     className: "edit-site-welcome-guide guide-page",
       
 11286     contentLabel: heading,
       
 11287     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Continue'),
       
 11288     onFinish: () => toggle('core/edit-site', 'welcomeGuidePage'),
       
 11289     pages: [{
       
 11290       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
       
 11291         className: "edit-site-welcome-guide__video",
       
 11292         autoPlay: true,
       
 11293         loop: true,
       
 11294         muted: true,
       
 11295         width: "312",
       
 11296         height: "240",
       
 11297         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", {
       
 11298           src: "https://s.w.org/images/block-editor/editing-your-page.mp4",
       
 11299           type: "video/mp4"
       
 11300         })
       
 11301       }),
       
 11302       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 11303         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
       
 11304           className: "edit-site-welcome-guide__heading",
       
 11305           children: heading
       
 11306         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 11307           className: "edit-site-welcome-guide__text",
       
 11308           children: (0,external_wp_i18n_namespaceObject.__)('It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.')
       
 11309         })]
       
 11310       })
       
 11311     }]
       
 11312   });
       
 11313 }
       
 11314 
       
 11315 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/template.js
       
 11316 /**
       
 11317  * WordPress dependencies
       
 11318  */
       
 11319 
       
 11320 
       
 11321 
       
 11322 
       
 11323 
       
 11324 
       
 11325 /**
       
 11326  * Internal dependencies
       
 11327  */
       
 11328 
       
 11329 
       
 11330 
       
 11331 
       
 11332 function WelcomeGuideTemplate() {
       
 11333   const {
       
 11334     toggle
       
 11335   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
 11336   const isVisible = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11337     const isTemplateActive = !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuideTemplate');
       
 11338     const isEditorActive = !!select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'welcomeGuide');
       
 11339     const {
       
 11340       isPage
       
 11341     } = select(store);
       
 11342     const {
       
 11343       getCurrentPostType
       
 11344     } = select(external_wp_editor_namespaceObject.store);
       
 11345     return isTemplateActive && !isEditorActive && isPage() && getCurrentPostType() === 'wp_template';
       
 11346   }, []);
       
 11347   if (!isVisible) {
       
 11348     return null;
       
 11349   }
       
 11350   const heading = (0,external_wp_i18n_namespaceObject.__)('Editing a template');
       
 11351   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Guide, {
       
 11352     className: "edit-site-welcome-guide guide-template",
       
 11353     contentLabel: heading,
       
 11354     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Continue'),
       
 11355     onFinish: () => toggle('core/edit-site', 'welcomeGuideTemplate'),
       
 11356     pages: [{
       
 11357       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
       
 11358         className: "edit-site-welcome-guide__video",
       
 11359         autoPlay: true,
       
 11360         loop: true,
       
 11361         muted: true,
       
 11362         width: "312",
       
 11363         height: "240",
       
 11364         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", {
       
 11365           src: "https://s.w.org/images/block-editor/editing-your-template.mp4",
       
 11366           type: "video/mp4"
       
 11367         })
       
 11368       }),
       
 11369       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 11370         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
       
 11371           className: "edit-site-welcome-guide__heading",
       
 11372           children: heading
       
 11373         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 11374           className: "edit-site-welcome-guide__text",
       
 11375           children: (0,external_wp_i18n_namespaceObject.__)('Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.')
       
 11376         })]
       
 11377       })
       
 11378     }]
       
 11379   });
       
 11380 }
       
 11381 
 11972 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/index.js
 11382 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/index.js
 11973 
       
 11974 
       
 11975 /**
 11383 /**
 11976  * Internal dependencies
 11384  * Internal dependencies
 11977  */
 11385  */
 11978 
 11386 
 11979 
 11387 
       
 11388 
       
 11389 
       
 11390 
       
 11391 
       
 11392 
 11980 function WelcomeGuide() {
 11393 function WelcomeGuide() {
 11981   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideEditor, null), (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideStyles, null));
 11394   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 11982 }
 11395     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideEditor, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideStyles, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuidePage, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideTemplate, {})]
 11983 
 11396   });
 11984 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/editor/global-styles-renderer.js
 11397 }
 11985 /**
 11398 
 11986  * External dependencies
 11399 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles-renderer/index.js
 11987  */
       
 11988 
       
 11989 /**
 11400 /**
 11990  * WordPress dependencies
 11401  * WordPress dependencies
 11991  */
 11402  */
 11992 
 11403 
 11993 
 11404 
 11994 
 11405 
       
 11406 
 11995 /**
 11407 /**
 11996  * Internal dependencies
 11408  * Internal dependencies
 11997  */
 11409  */
 11998 
 11410 
 11999 
 11411 
 12000 /**
 11412 
 12001  * Internal dependencies
 11413 const {
 12002  */
 11414   useGlobalStylesOutput
 12003 
 11415 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
 12004 
       
 12005 
       
 12006 function useGlobalStylesRenderer() {
 11416 function useGlobalStylesRenderer() {
 12007   const [styles, settings, svgFilters] = useGlobalStylesOutput();
 11417   const postType = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11418     return select(store).getEditedPostType();
       
 11419   });
       
 11420   const [styles, settings] = useGlobalStylesOutput(postType !== TEMPLATE_POST_TYPE);
 12008   const {
 11421   const {
 12009     getSettings
 11422     getSettings
 12010   } = (0,external_wp_data_namespaceObject.useSelect)(store_store);
 11423   } = (0,external_wp_data_namespaceObject.useSelect)(store);
 12011   const {
 11424   const {
 12012     updateSettings
 11425     updateSettings
 12013   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
 11426   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
 12014   (0,external_wp_element_namespaceObject.useEffect)(() => {
 11427   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 11428     var _currentStoreSettings;
 12015     if (!styles || !settings) {
 11429     if (!styles || !settings) {
 12016       return;
 11430       return;
 12017     }
 11431     }
 12018 
       
 12019     const currentStoreSettings = getSettings();
 11432     const currentStoreSettings = getSettings();
 12020     const nonGlobalStyles = (0,external_lodash_namespaceObject.filter)(currentStoreSettings.styles, style => !style.isGlobalStyles);
 11433     const nonGlobalStyles = Object.values((_currentStoreSettings = currentStoreSettings.styles) !== null && _currentStoreSettings !== void 0 ? _currentStoreSettings : []).filter(style => !style.isGlobalStyles);
 12021     updateSettings({ ...currentStoreSettings,
 11434     updateSettings({
       
 11435       ...currentStoreSettings,
 12022       styles: [...nonGlobalStyles, ...styles],
 11436       styles: [...nonGlobalStyles, ...styles],
 12023       svgFilters,
       
 12024       __experimentalFeatures: settings
 11437       __experimentalFeatures: settings
 12025     });
 11438     });
 12026   }, [styles, settings]);
 11439   }, [styles, settings, updateSettings, getSettings]);
 12027 }
 11440 }
 12028 
       
 12029 function GlobalStylesRenderer() {
 11441 function GlobalStylesRenderer() {
 12030   useGlobalStylesRenderer();
 11442   useGlobalStylesRenderer();
 12031   return null;
 11443   return null;
 12032 }
 11444 }
 12033 
 11445 
       
 11446 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/canvas-loader/index.js
       
 11447 /**
       
 11448  * WordPress dependencies
       
 11449  */
       
 11450 
       
 11451 
       
 11452 
       
 11453 
       
 11454 
       
 11455 /**
       
 11456  * Internal dependencies
       
 11457  */
       
 11458 
       
 11459 
       
 11460 
       
 11461 const {
       
 11462   Theme
       
 11463 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 11464 const {
       
 11465   useGlobalStyle: canvas_loader_useGlobalStyle
       
 11466 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 11467 function CanvasLoader({
       
 11468   id
       
 11469 }) {
       
 11470   var _highlightedColors$0$;
       
 11471   const [fallbackIndicatorColor] = canvas_loader_useGlobalStyle('color.text');
       
 11472   const [backgroundColor] = canvas_loader_useGlobalStyle('color.background');
       
 11473   const {
       
 11474     highlightedColors
       
 11475   } = useStylesPreviewColors();
       
 11476   const indicatorColor = (_highlightedColors$0$ = highlightedColors[0]?.color) !== null && _highlightedColors$0$ !== void 0 ? _highlightedColors$0$ : fallbackIndicatorColor;
       
 11477   const {
       
 11478     elapsed,
       
 11479     total
       
 11480   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11481     var _selectorsByStatus$re, _selectorsByStatus$fi;
       
 11482     const selectorsByStatus = select(external_wp_coreData_namespaceObject.store).countSelectorsByStatus();
       
 11483     const resolving = (_selectorsByStatus$re = selectorsByStatus.resolving) !== null && _selectorsByStatus$re !== void 0 ? _selectorsByStatus$re : 0;
       
 11484     const finished = (_selectorsByStatus$fi = selectorsByStatus.finished) !== null && _selectorsByStatus$fi !== void 0 ? _selectorsByStatus$fi : 0;
       
 11485     return {
       
 11486       elapsed: finished,
       
 11487       total: finished + resolving
       
 11488     };
       
 11489   }, []);
       
 11490   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 11491     className: "edit-site-canvas-loader",
       
 11492     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Theme, {
       
 11493       accent: indicatorColor,
       
 11494       background: backgroundColor,
       
 11495       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ProgressBar, {
       
 11496         id: id,
       
 11497         max: total,
       
 11498         value: elapsed
       
 11499       })
       
 11500     })
       
 11501   });
       
 11502 }
       
 11503 
       
 11504 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/convert-to-regular.js
       
 11505 /**
       
 11506  * WordPress dependencies
       
 11507  */
       
 11508 
       
 11509 
       
 11510 
       
 11511 
       
 11512 
       
 11513 function ConvertToRegularBlocks({
       
 11514   clientId,
       
 11515   onClose
       
 11516 }) {
       
 11517   const {
       
 11518     getBlocks
       
 11519   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
       
 11520   const {
       
 11521     replaceBlocks
       
 11522   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
 11523   const canRemove = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).canRemoveBlock(clientId), [clientId]);
       
 11524   if (!canRemove) {
       
 11525     return null;
       
 11526   }
       
 11527   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 11528     onClick: () => {
       
 11529       replaceBlocks(clientId, getBlocks(clientId));
       
 11530       onClose();
       
 11531     },
       
 11532     children: (0,external_wp_i18n_namespaceObject.__)('Detach')
       
 11533   });
       
 11534 }
       
 11535 
       
 11536 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol-filled.js
       
 11537 /**
       
 11538  * WordPress dependencies
       
 11539  */
       
 11540 
       
 11541 
       
 11542 const symbolFilled = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 11543   xmlns: "http://www.w3.org/2000/svg",
       
 11544   viewBox: "0 0 24 24",
       
 11545   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 11546     d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"
       
 11547   })
       
 11548 });
       
 11549 /* harmony default export */ const symbol_filled = (symbolFilled);
       
 11550 
       
 11551 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/convert-to-template-part.js
       
 11552 /**
       
 11553  * WordPress dependencies
       
 11554  */
       
 11555 
       
 11556 
       
 11557 
       
 11558 
       
 11559 
       
 11560 
       
 11561 
       
 11562 
       
 11563 
       
 11564 
       
 11565 /**
       
 11566  * Internal dependencies
       
 11567  */
       
 11568 
       
 11569 
       
 11570 
       
 11571 
       
 11572 
       
 11573 const {
       
 11574   CreateTemplatePartModal
       
 11575 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 11576 function ConvertToTemplatePart({
       
 11577   clientIds,
       
 11578   blocks
       
 11579 }) {
       
 11580   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 11581   const {
       
 11582     replaceBlocks
       
 11583   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
 11584   const {
       
 11585     createSuccessNotice
       
 11586   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
 11587   const {
       
 11588     canCreate
       
 11589   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11590     const {
       
 11591       supportsTemplatePartsMode
       
 11592     } = select(store).getSettings();
       
 11593     return {
       
 11594       canCreate: !supportsTemplatePartsMode
       
 11595     };
       
 11596   }, []);
       
 11597   if (!canCreate) {
       
 11598     return null;
       
 11599   }
       
 11600   const onConvert = async templatePart => {
       
 11601     replaceBlocks(clientIds, (0,external_wp_blocks_namespaceObject.createBlock)('core/template-part', {
       
 11602       slug: templatePart.slug,
       
 11603       theme: templatePart.theme
       
 11604     }));
       
 11605     createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Template part created.'), {
       
 11606       type: 'snackbar'
       
 11607     });
       
 11608 
       
 11609     // The modal and this component will be unmounted because of `replaceBlocks` above,
       
 11610     // so no need to call `closeModal` or `onClose`.
       
 11611   };
       
 11612   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 11613     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 11614       icon: symbol_filled,
       
 11615       onClick: () => {
       
 11616         setIsModalOpen(true);
       
 11617       },
       
 11618       "aria-expanded": isModalOpen,
       
 11619       "aria-haspopup": "dialog",
       
 11620       children: (0,external_wp_i18n_namespaceObject.__)('Create template part')
       
 11621     }), isModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CreateTemplatePartModal, {
       
 11622       closeModal: () => {
       
 11623         setIsModalOpen(false);
       
 11624       },
       
 11625       blocks: blocks,
       
 11626       onCreate: onConvert
       
 11627     })]
       
 11628   });
       
 11629 }
       
 11630 
       
 11631 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/index.js
       
 11632 /**
       
 11633  * WordPress dependencies
       
 11634  */
       
 11635 
       
 11636 
       
 11637 
       
 11638 /**
       
 11639  * Internal dependencies
       
 11640  */
       
 11641 
       
 11642 
       
 11643 
       
 11644 function TemplatePartConverter() {
       
 11645   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, {
       
 11646     children: ({
       
 11647       selectedClientIds,
       
 11648       onClose
       
 11649     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartConverterMenuItem, {
       
 11650       clientIds: selectedClientIds,
       
 11651       onClose: onClose
       
 11652     })
       
 11653   });
       
 11654 }
       
 11655 function TemplatePartConverterMenuItem({
       
 11656   clientIds,
       
 11657   onClose
       
 11658 }) {
       
 11659   const {
       
 11660     isContentOnly,
       
 11661     blocks
       
 11662   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11663     const {
       
 11664       getBlocksByClientId,
       
 11665       getBlockEditingMode
       
 11666     } = select(external_wp_blockEditor_namespaceObject.store);
       
 11667     return {
       
 11668       blocks: getBlocksByClientId(clientIds),
       
 11669       isContentOnly: clientIds.length === 1 && getBlockEditingMode(clientIds[0]) === 'contentOnly'
       
 11670     };
       
 11671   }, [clientIds]);
       
 11672 
       
 11673   // Do not show the convert button if the block is in content-only mode.
       
 11674   if (isContentOnly) {
       
 11675     return null;
       
 11676   }
       
 11677 
       
 11678   // Allow converting a single template part to standard blocks.
       
 11679   if (blocks.length === 1 && blocks[0]?.name === 'core/template-part') {
       
 11680     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ConvertToRegularBlocks, {
       
 11681       clientId: clientIds[0],
       
 11682       onClose: onClose
       
 11683     });
       
 11684   }
       
 11685   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ConvertToTemplatePart, {
       
 11686     clientIds: clientIds,
       
 11687     blocks: blocks
       
 11688   });
       
 11689 }
       
 11690 
       
 11691 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/use-navigate-to-entity-record.js
       
 11692 /**
       
 11693  * WordPress dependencies
       
 11694  */
       
 11695 
       
 11696 
       
 11697 
       
 11698 /**
       
 11699  * Internal dependencies
       
 11700  */
       
 11701 
       
 11702 const {
       
 11703   useHistory: use_navigate_to_entity_record_useHistory
       
 11704 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 11705 function useNavigateToEntityRecord() {
       
 11706   const history = use_navigate_to_entity_record_useHistory();
       
 11707   const onNavigateToEntityRecord = (0,external_wp_element_namespaceObject.useCallback)(params => {
       
 11708     history.push({
       
 11709       ...params,
       
 11710       focusMode: true,
       
 11711       canvas: 'edit'
       
 11712     });
       
 11713   }, [history]);
       
 11714   return onNavigateToEntityRecord;
       
 11715 }
       
 11716 
       
 11717 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/use-site-editor-settings.js
       
 11718 /**
       
 11719  * WordPress dependencies
       
 11720  */
       
 11721 
       
 11722 
       
 11723 
       
 11724 
       
 11725 
       
 11726 
       
 11727 
       
 11728 /**
       
 11729  * Internal dependencies
       
 11730  */
       
 11731 
       
 11732 
       
 11733 
       
 11734 
       
 11735 const {
       
 11736   useBlockEditorSettings
       
 11737 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 11738 const {
       
 11739   useLocation: use_site_editor_settings_useLocation,
       
 11740   useHistory: use_site_editor_settings_useHistory
       
 11741 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 11742 function useArchiveLabel(templateSlug) {
       
 11743   const taxonomyMatches = templateSlug?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);
       
 11744   let taxonomy;
       
 11745   let term;
       
 11746   let isAuthor = false;
       
 11747   let authorSlug;
       
 11748   if (taxonomyMatches) {
       
 11749     // If is for a all taxonomies of a type
       
 11750     if (taxonomyMatches[1]) {
       
 11751       taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
       
 11752     }
       
 11753     // If is for a all taxonomies of a type
       
 11754     else if (taxonomyMatches[3]) {
       
 11755       taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
       
 11756       term = taxonomyMatches[7];
       
 11757     }
       
 11758     taxonomy = taxonomy === 'tag' ? 'post_tag' : taxonomy;
       
 11759 
       
 11760     //getTaxonomy( 'category' );
       
 11761     //wp.data.select('core').getEntityRecords( 'taxonomy', 'category', {slug: 'newcat'} );
       
 11762   } else {
       
 11763     const authorMatches = templateSlug?.match(/^(author)$|^author-(.+)$/);
       
 11764     if (authorMatches) {
       
 11765       isAuthor = true;
       
 11766       if (authorMatches[2]) {
       
 11767         authorSlug = authorMatches[2];
       
 11768       }
       
 11769     }
       
 11770   }
       
 11771   return (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11772     const {
       
 11773       getEntityRecords,
       
 11774       getTaxonomy,
       
 11775       getAuthors
       
 11776     } = select(external_wp_coreData_namespaceObject.store);
       
 11777     let archiveTypeLabel;
       
 11778     let archiveNameLabel;
       
 11779     if (taxonomy) {
       
 11780       archiveTypeLabel = getTaxonomy(taxonomy)?.labels?.singular_name;
       
 11781     }
       
 11782     if (term) {
       
 11783       const records = getEntityRecords('taxonomy', taxonomy, {
       
 11784         slug: term,
       
 11785         per_page: 1
       
 11786       });
       
 11787       if (records && records[0]) {
       
 11788         archiveNameLabel = records[0].name;
       
 11789       }
       
 11790     }
       
 11791     if (isAuthor) {
       
 11792       archiveTypeLabel = 'Author';
       
 11793       if (authorSlug) {
       
 11794         const authorRecords = getAuthors({
       
 11795           slug: authorSlug
       
 11796         });
       
 11797         if (authorRecords && authorRecords[0]) {
       
 11798           archiveNameLabel = authorRecords[0].name;
       
 11799         }
       
 11800       }
       
 11801     }
       
 11802     return {
       
 11803       archiveTypeLabel,
       
 11804       archiveNameLabel
       
 11805     };
       
 11806   }, [authorSlug, isAuthor, taxonomy, term]);
       
 11807 }
       
 11808 function useNavigateToPreviousEntityRecord() {
       
 11809   const location = use_site_editor_settings_useLocation();
       
 11810   const previousLocation = (0,external_wp_compose_namespaceObject.usePrevious)(location);
       
 11811   const history = use_site_editor_settings_useHistory();
       
 11812   const goBack = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 11813     const isFocusMode = location.params.focusMode || location.params.postId && FOCUSABLE_ENTITIES.includes(location.params.postType);
       
 11814     const didComeFromEditorCanvas = previousLocation?.params.canvas === 'edit';
       
 11815     const showBackButton = isFocusMode && didComeFromEditorCanvas;
       
 11816     return showBackButton ? () => history.back() : undefined;
       
 11817     // Disable reason: previousLocation changes when the component updates for any reason, not
       
 11818     // just when location changes. Until this is fixed we can't add it to deps. See
       
 11819     // https://github.com/WordPress/gutenberg/pull/58710#discussion_r1479219465.
       
 11820     // eslint-disable-next-line react-hooks/exhaustive-deps
       
 11821   }, [location, history]);
       
 11822   return goBack;
       
 11823 }
       
 11824 function useSpecificEditorSettings() {
       
 11825   const onNavigateToEntityRecord = useNavigateToEntityRecord();
       
 11826   const {
       
 11827     templateSlug,
       
 11828     canvasMode,
       
 11829     settings,
       
 11830     postWithTemplate
       
 11831   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 11832     const {
       
 11833       getEditedPostType,
       
 11834       getEditedPostId,
       
 11835       getEditedPostContext,
       
 11836       getCanvasMode,
       
 11837       getSettings
       
 11838     } = lock_unlock_unlock(select(store));
       
 11839     const {
       
 11840       getEditedEntityRecord
       
 11841     } = select(external_wp_coreData_namespaceObject.store);
       
 11842     const usedPostType = getEditedPostType();
       
 11843     const usedPostId = getEditedPostId();
       
 11844     const _record = getEditedEntityRecord('postType', usedPostType, usedPostId);
       
 11845     const _context = getEditedPostContext();
       
 11846     return {
       
 11847       templateSlug: _record.slug,
       
 11848       canvasMode: getCanvasMode(),
       
 11849       settings: getSettings(),
       
 11850       postWithTemplate: _context?.postId
       
 11851     };
       
 11852   }, []);
       
 11853   const archiveLabels = useArchiveLabel(templateSlug);
       
 11854   const defaultRenderingMode = postWithTemplate ? 'template-locked' : 'post-only';
       
 11855   const onNavigateToPreviousEntityRecord = useNavigateToPreviousEntityRecord();
       
 11856   const defaultEditorSettings = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 11857     return {
       
 11858       ...settings,
       
 11859       richEditingEnabled: true,
       
 11860       supportsTemplateMode: true,
       
 11861       focusMode: canvasMode !== 'view',
       
 11862       defaultRenderingMode,
       
 11863       onNavigateToEntityRecord,
       
 11864       onNavigateToPreviousEntityRecord,
       
 11865       // I wonder if they should be set in the post editor too
       
 11866       __experimentalArchiveTitleTypeLabel: archiveLabels.archiveTypeLabel,
       
 11867       __experimentalArchiveTitleNameLabel: archiveLabels.archiveNameLabel,
       
 11868       __unstableIsPreviewMode: canvasMode === 'view'
       
 11869     };
       
 11870   }, [settings, canvasMode, defaultRenderingMode, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord, archiveLabels.archiveTypeLabel, archiveLabels.archiveNameLabel]);
       
 11871   return defaultEditorSettings;
       
 11872 }
       
 11873 function useSiteEditorSettings() {
       
 11874   const defaultEditorSettings = useSpecificEditorSettings();
       
 11875   const {
       
 11876     postType,
       
 11877     postId
       
 11878   } = useSelect(select => {
       
 11879     const {
       
 11880       getEditedPostType,
       
 11881       getEditedPostId
       
 11882     } = unlock(select(editSiteStore));
       
 11883     const usedPostType = getEditedPostType();
       
 11884     const usedPostId = getEditedPostId();
       
 11885     return {
       
 11886       postType: usedPostType,
       
 11887       postId: usedPostId
       
 11888     };
       
 11889   }, []);
       
 11890   return useBlockEditorSettings(defaultEditorSettings, postType, postId);
       
 11891 }
       
 11892 
       
 11893 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/plugin-template-setting-panel/index.js
       
 11894 /**
       
 11895  * Defines an extensibility slot for the Template sidebar.
       
 11896  */
       
 11897 
       
 11898 /**
       
 11899  * WordPress dependencies
       
 11900  */
       
 11901 
       
 11902 
       
 11903 
       
 11904 
       
 11905 
       
 11906 const {
       
 11907   Fill,
       
 11908   Slot
       
 11909 } = (0,external_wp_components_namespaceObject.createSlotFill)('PluginTemplateSettingPanel');
       
 11910 const PluginTemplateSettingPanel = ({
       
 11911   children
       
 11912 }) => {
       
 11913   external_wp_deprecated_default()('wp.editSite.PluginTemplateSettingPanel', {
       
 11914     since: '6.6',
       
 11915     version: '6.8',
       
 11916     alternative: 'wp.editor.PluginDocumentSettingPanel'
       
 11917   });
       
 11918   const isCurrentEntityTemplate = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template', []);
       
 11919   if (!isCurrentEntityTemplate) {
       
 11920     return null;
       
 11921   }
       
 11922   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Fill, {
       
 11923     children: children
       
 11924   });
       
 11925 };
       
 11926 PluginTemplateSettingPanel.Slot = Slot;
       
 11927 
       
 11928 /**
       
 11929  * Renders items in the Template Sidebar below the main information
       
 11930  * like the Template Card.
       
 11931  *
       
 11932  * @deprecated since 6.6. Use `wp.editor.PluginDocumentSettingPanel` instead.
       
 11933  *
       
 11934  * @example
       
 11935  * ```jsx
       
 11936  * // Using ESNext syntax
       
 11937  * import { PluginTemplateSettingPanel } from '@wordpress/edit-site';
       
 11938  *
       
 11939  * const MyTemplateSettingTest = () => (
       
 11940  * 		<PluginTemplateSettingPanel>
       
 11941  *			<p>Hello, World!</p>
       
 11942  *		</PluginTemplateSettingPanel>
       
 11943  *	);
       
 11944  * ```
       
 11945  *
       
 11946  * @return {Component} The component to be rendered.
       
 11947  */
       
 11948 /* harmony default export */ const plugin_template_setting_panel = (PluginTemplateSettingPanel);
       
 11949 
       
 11950 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/seen.js
       
 11951 /**
       
 11952  * WordPress dependencies
       
 11953  */
       
 11954 
       
 11955 
       
 11956 const seen = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 11957   viewBox: "0 0 24 24",
       
 11958   xmlns: "http://www.w3.org/2000/svg",
       
 11959   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 11960     d: "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"
       
 11961   })
       
 11962 });
       
 11963 /* harmony default export */ const library_seen = (seen);
       
 11964 
       
 11965 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
       
 11966 /**
       
 11967  * WordPress dependencies
       
 11968  */
       
 11969 
       
 11970 
       
 11971 const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 11972   xmlns: "http://www.w3.org/2000/svg",
       
 11973   viewBox: "0 0 24 24",
       
 11974   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 11975     d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
       
 11976   })
       
 11977 });
       
 11978 /* harmony default export */ const more_vertical = (moreVertical);
       
 11979 
       
 11980 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
       
 11981 /**
       
 11982  * WordPress dependencies
       
 11983  */
       
 11984 
       
 11985 
       
 11986 const chevronLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 11987   xmlns: "http://www.w3.org/2000/svg",
       
 11988   viewBox: "0 0 24 24",
       
 11989   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 11990     d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
       
 11991   })
       
 11992 });
       
 11993 /* harmony default export */ const chevron_left = (chevronLeft);
       
 11994 
       
 11995 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
       
 11996 /**
       
 11997  * WordPress dependencies
       
 11998  */
       
 11999 
       
 12000 
       
 12001 const chevronRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 12002   xmlns: "http://www.w3.org/2000/svg",
       
 12003   viewBox: "0 0 24 24",
       
 12004   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 12005     d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
       
 12006   })
       
 12007 });
       
 12008 /* harmony default export */ const chevron_right = (chevronRight);
       
 12009 
       
 12010 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/icon-with-current-color.js
       
 12011 /**
       
 12012  * External dependencies
       
 12013  */
       
 12014 
       
 12015 
       
 12016 /**
       
 12017  * WordPress dependencies
       
 12018  */
       
 12019 
       
 12020 
       
 12021 function IconWithCurrentColor({
       
 12022   className,
       
 12023   ...props
       
 12024 }) {
       
 12025   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 12026     className: dist_clsx(className, 'edit-site-global-styles-icon-with-current-color'),
       
 12027     ...props
       
 12028   });
       
 12029 }
       
 12030 
       
 12031 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/navigation-button.js
       
 12032 /**
       
 12033  * WordPress dependencies
       
 12034  */
       
 12035 
       
 12036 
       
 12037 /**
       
 12038  * Internal dependencies
       
 12039  */
       
 12040 
       
 12041 
       
 12042 
       
 12043 function GenericNavigationButton({
       
 12044   icon,
       
 12045   children,
       
 12046   ...props
       
 12047 }) {
       
 12048   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItem, {
       
 12049     ...props,
       
 12050     children: [icon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 12051       justify: "flex-start",
       
 12052       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(IconWithCurrentColor, {
       
 12053         icon: icon,
       
 12054         size: 24
       
 12055       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 12056         children: children
       
 12057       })]
       
 12058     }), !icon && children]
       
 12059   });
       
 12060 }
       
 12061 function NavigationButtonAsItem(props) {
       
 12062   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNavigatorButton, {
       
 12063     as: GenericNavigationButton,
       
 12064     ...props
       
 12065   });
       
 12066 }
       
 12067 function NavigationBackButtonAsItem(props) {
       
 12068   return /*#__PURE__*/_jsx(NavigatorToParentButton, {
       
 12069     as: GenericNavigationButton,
       
 12070     ...props
       
 12071   });
       
 12072 }
       
 12073 
       
 12074 
       
 12075 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/typography.js
       
 12076 /**
       
 12077  * WordPress dependencies
       
 12078  */
       
 12079 
       
 12080 
       
 12081 const typography = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 12082   xmlns: "http://www.w3.org/2000/svg",
       
 12083   viewBox: "0 0 24 24",
       
 12084   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 12085     d: "M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"
       
 12086   })
       
 12087 });
       
 12088 /* harmony default export */ const library_typography = (typography);
       
 12089 
       
 12090 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/color.js
       
 12091 /**
       
 12092  * WordPress dependencies
       
 12093  */
       
 12094 
       
 12095 
       
 12096 const color = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 12097   viewBox: "0 0 24 24",
       
 12098   xmlns: "http://www.w3.org/2000/svg",
       
 12099   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 12100     d: "M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"
       
 12101   })
       
 12102 });
       
 12103 /* harmony default export */ const library_color = (color);
       
 12104 
       
 12105 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/shadow.js
       
 12106 /**
       
 12107  * WordPress dependencies
       
 12108  */
       
 12109 
       
 12110 
       
 12111 const shadow = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 12112   viewBox: "0 0 24 24",
       
 12113   xmlns: "http://www.w3.org/2000/svg",
       
 12114   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 12115     d: "M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"
       
 12116   })
       
 12117 });
       
 12118 /* harmony default export */ const library_shadow = (shadow);
       
 12119 
       
 12120 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/root-menu.js
       
 12121 /**
       
 12122  * WordPress dependencies
       
 12123  */
       
 12124 
       
 12125 
       
 12126 
       
 12127 
       
 12128 
       
 12129 /**
       
 12130  * Internal dependencies
       
 12131  */
       
 12132 
       
 12133 
       
 12134 
       
 12135 
       
 12136 
       
 12137 const {
       
 12138   useHasDimensionsPanel,
       
 12139   useHasTypographyPanel,
       
 12140   useHasColorPanel,
       
 12141   useGlobalSetting: root_menu_useGlobalSetting,
       
 12142   useSettingsForBlockElement
       
 12143 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 12144 function RootMenu() {
       
 12145   const [rawSettings] = root_menu_useGlobalSetting('');
       
 12146   const settings = useSettingsForBlockElement(rawSettings);
       
 12147   const hasTypographyPanel = useHasTypographyPanel(settings);
       
 12148   const hasColorPanel = useHasColorPanel(settings);
       
 12149   const hasShadowPanel = true; // useHasShadowPanel( settings );
       
 12150   const hasDimensionsPanel = useHasDimensionsPanel(settings);
       
 12151   const hasLayoutPanel = hasDimensionsPanel;
       
 12152   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 12153     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 12154       children: [hasTypographyPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12155         icon: library_typography,
       
 12156         path: "/typography",
       
 12157         "aria-label": (0,external_wp_i18n_namespaceObject.__)('Typography styles'),
       
 12158         children: (0,external_wp_i18n_namespaceObject.__)('Typography')
       
 12159       }), hasColorPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12160         icon: library_color,
       
 12161         path: "/colors",
       
 12162         "aria-label": (0,external_wp_i18n_namespaceObject.__)('Colors styles'),
       
 12163         children: (0,external_wp_i18n_namespaceObject.__)('Colors')
       
 12164       }), hasShadowPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12165         icon: library_shadow,
       
 12166         path: "/shadows",
       
 12167         "aria-label": (0,external_wp_i18n_namespaceObject.__)('Shadow styles'),
       
 12168         children: (0,external_wp_i18n_namespaceObject.__)('Shadows')
       
 12169       }), hasLayoutPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12170         icon: library_layout,
       
 12171         path: "/layout",
       
 12172         "aria-label": (0,external_wp_i18n_namespaceObject.__)('Layout styles'),
       
 12173         children: (0,external_wp_i18n_namespaceObject.__)('Layout')
       
 12174       })]
       
 12175     })
       
 12176   });
       
 12177 }
       
 12178 /* harmony default export */ const root_menu = (RootMenu);
       
 12179 
       
 12180 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/preview-styles.js
       
 12181 function findNearest(input, numbers) {
       
 12182   // If the numbers array is empty, return null
       
 12183   if (numbers.length === 0) {
       
 12184     return null;
       
 12185   }
       
 12186   // Sort the array based on the absolute difference with the input
       
 12187   numbers.sort((a, b) => Math.abs(input - a) - Math.abs(input - b));
       
 12188   // Return the first element (which will be the nearest) from the sorted array
       
 12189   return numbers[0];
       
 12190 }
       
 12191 function extractFontWeights(fontFaces) {
       
 12192   const result = [];
       
 12193   fontFaces.forEach(face => {
       
 12194     const weights = String(face.fontWeight).split(' ');
       
 12195     if (weights.length === 2) {
       
 12196       const start = parseInt(weights[0]);
       
 12197       const end = parseInt(weights[1]);
       
 12198       for (let i = start; i <= end; i += 100) {
       
 12199         result.push(i);
       
 12200       }
       
 12201     } else if (weights.length === 1) {
       
 12202       result.push(parseInt(weights[0]));
       
 12203     }
       
 12204   });
       
 12205   return result;
       
 12206 }
       
 12207 
       
 12208 /*
       
 12209  * Format the font family to use in the CSS font-family property of a CSS rule.
       
 12210  *
       
 12211  * The input can be a string with the font family name or a string with multiple font family names separated by commas.
       
 12212  * It follows the recommendations from the CSS Fonts Module Level 4.
       
 12213  * https://www.w3.org/TR/css-fonts-4/#font-family-prop
       
 12214  *
       
 12215  * @param {string} input - The font family.
       
 12216  * @return {string} The formatted font family.
       
 12217  *
       
 12218  * Example:
       
 12219  * formatFontFamily( "Open Sans, Font+Name, sans-serif" ) => '"Open Sans", "Font+Name", sans-serif'
       
 12220  * formatFontFamily( "'Open Sans', generic(kai), sans-serif" ) => '"Open Sans", sans-serif'
       
 12221  * formatFontFamily( "DotGothic16, Slabo 27px, serif" ) => '"DotGothic16","Slabo 27px",serif'
       
 12222  * formatFontFamily( "Mine's, Moe's Typography" ) => `"mine's","Moe's Typography"`
       
 12223  */
       
 12224 function formatFontFamily(input) {
       
 12225   // Matches strings that are not exclusively alphabetic characters or hyphens, and do not exactly follow the pattern generic(alphabetic characters or hyphens).
       
 12226   const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/;
       
 12227   const output = input.trim();
       
 12228   const formatItem = item => {
       
 12229     item = item.trim();
       
 12230     if (item.match(regex)) {
       
 12231       // removes leading and trailing quotes.
       
 12232       item = item.replace(/^["']|["']$/g, '');
       
 12233       return `"${item}"`;
       
 12234     }
       
 12235     return item;
       
 12236   };
       
 12237   if (output.includes(',')) {
       
 12238     return output.split(',').map(formatItem).filter(item => item !== '').join(', ');
       
 12239   }
       
 12240   return formatItem(output);
       
 12241 }
       
 12242 
       
 12243 /*
       
 12244  * Format the font face name to use in the font-family property of a font face.
       
 12245  *
       
 12246  * The input can be a string with the font face name or a string with multiple font face names separated by commas.
       
 12247  * It removes the leading and trailing quotes from the font face name.
       
 12248  *
       
 12249  * @param {string} input - The font face name.
       
 12250  * @return {string} The formatted font face name.
       
 12251  *
       
 12252  * Example:
       
 12253  * formatFontFaceName("Open Sans") => "Open Sans"
       
 12254  * formatFontFaceName("'Open Sans', sans-serif") => "Open Sans"
       
 12255  * formatFontFaceName(", 'Open Sans', 'Helvetica Neue', sans-serif") => "Open Sans"
       
 12256  */
       
 12257 function formatFontFaceName(input) {
       
 12258   if (!input) {
       
 12259     return '';
       
 12260   }
       
 12261   let output = input.trim();
       
 12262   if (output.includes(',')) {
       
 12263     output = output.split(',')
       
 12264     // finds the first item that is not an empty string.
       
 12265     .find(item => item.trim() !== '').trim();
       
 12266   }
       
 12267   // removes leading and trailing quotes.
       
 12268   output = output.replace(/^["']|["']$/g, '');
       
 12269 
       
 12270   // Firefox needs the font name to be wrapped in double quotes meanwhile other browsers don't.
       
 12271   if (window.navigator.userAgent.toLowerCase().includes('firefox')) {
       
 12272     output = `"${output}"`;
       
 12273   }
       
 12274   return output;
       
 12275 }
       
 12276 function getFamilyPreviewStyle(family) {
       
 12277   const style = {
       
 12278     fontFamily: formatFontFamily(family.fontFamily)
       
 12279   };
       
 12280   if (!Array.isArray(family.fontFace)) {
       
 12281     style.fontWeight = '400';
       
 12282     style.fontStyle = 'normal';
       
 12283     return style;
       
 12284   }
       
 12285   if (family.fontFace) {
       
 12286     //get all the font faces with normal style
       
 12287     const normalFaces = family.fontFace.filter(face => face?.fontStyle && face.fontStyle.toLowerCase() === 'normal');
       
 12288     if (normalFaces.length > 0) {
       
 12289       style.fontStyle = 'normal';
       
 12290       const normalWeights = extractFontWeights(normalFaces);
       
 12291       const nearestWeight = findNearest(400, normalWeights);
       
 12292       style.fontWeight = String(nearestWeight) || '400';
       
 12293     } else {
       
 12294       style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || 'normal';
       
 12295       style.fontWeight = family.fontFace.length && String(family.fontFace[0].fontWeight) || '400';
       
 12296     }
       
 12297   }
       
 12298   return style;
       
 12299 }
       
 12300 function getFacePreviewStyle(face) {
       
 12301   return {
       
 12302     fontFamily: formatFontFamily(face.fontFamily),
       
 12303     fontStyle: face.fontStyle || 'normal',
       
 12304     fontWeight: face.fontWeight || '400'
       
 12305   };
       
 12306 }
       
 12307 
       
 12308 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/utils.js
       
 12309 /**
       
 12310  *
       
 12311  * @param {string} variation The variation name.
       
 12312  *
       
 12313  * @return {string} The variation class name.
       
 12314  */
       
 12315 function getVariationClassName(variation) {
       
 12316   if (!variation) {
       
 12317     return '';
       
 12318   }
       
 12319   return `is-style-${variation}`;
       
 12320 }
       
 12321 
       
 12322 /**
       
 12323  * Iterates through the presets array and searches for slugs that start with the specified
       
 12324  * slugPrefix followed by a numerical suffix. It identifies the highest numerical suffix found
       
 12325  * and returns one greater than the highest found suffix, ensuring that the new index is unique.
       
 12326  *
       
 12327  * @param {Array}  presets    The array of preset objects, each potentially containing a slug property.
       
 12328  * @param {string} slugPrefix The prefix to look for in the preset slugs.
       
 12329  *
       
 12330  * @return {number} The next available index for a preset with the specified slug prefix, or 1 if no matching slugs are found.
       
 12331  */
       
 12332 function getNewIndexFromPresets(presets, slugPrefix) {
       
 12333   const nameRegex = new RegExp(`^${slugPrefix}([\\d]+)$`);
       
 12334   const highestPresetValue = presets.reduce((currentHighest, preset) => {
       
 12335     if (typeof preset?.slug === 'string') {
       
 12336       const matches = preset?.slug.match(nameRegex);
       
 12337       if (matches) {
       
 12338         const id = parseInt(matches[1], 10);
       
 12339         if (id > currentHighest) {
       
 12340           return id;
       
 12341         }
       
 12342       }
       
 12343     }
       
 12344     return currentHighest;
       
 12345   }, 0);
       
 12346   return highestPresetValue + 1;
       
 12347 }
       
 12348 function getFontFamilyFromSetting(fontFamilies, setting) {
       
 12349   if (!Array.isArray(fontFamilies) || !setting) {
       
 12350     return null;
       
 12351   }
       
 12352   const fontFamilyVariable = setting.replace('var(', '').replace(')', '');
       
 12353   const fontFamilySlug = fontFamilyVariable?.split('--').slice(-1)[0];
       
 12354   return fontFamilies.find(fontFamily => fontFamily.slug === fontFamilySlug);
       
 12355 }
       
 12356 function getFontFamilies(themeJson) {
       
 12357   const fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.
       
 12358   const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
       
 12359   const bodyFontFamily = getFontFamilyFromSetting(fontFamilies, bodyFontFamilySetting);
       
 12360   const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
       
 12361   let headingFontFamily;
       
 12362   if (!headingFontFamilySetting) {
       
 12363     headingFontFamily = bodyFontFamily;
       
 12364   } else {
       
 12365     headingFontFamily = getFontFamilyFromSetting(fontFamilies, themeJson?.styles?.elements?.heading?.typography?.fontFamily);
       
 12366   }
       
 12367   return [bodyFontFamily, headingFontFamily];
       
 12368 }
       
 12369 
       
 12370 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typography-example.js
       
 12371 /**
       
 12372  * WordPress dependencies
       
 12373  */
       
 12374 
       
 12375 
       
 12376 
       
 12377 
       
 12378 
       
 12379 
       
 12380 /**
       
 12381  * Internal dependencies
       
 12382  */
       
 12383 
       
 12384 
       
 12385 
       
 12386 
       
 12387 
       
 12388 const {
       
 12389   GlobalStylesContext: typography_example_GlobalStylesContext
       
 12390 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 12391 const {
       
 12392   mergeBaseAndUserConfigs: typography_example_mergeBaseAndUserConfigs
       
 12393 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 12394 function PreviewTypography({
       
 12395   fontSize,
       
 12396   variation
       
 12397 }) {
       
 12398   const {
       
 12399     base
       
 12400   } = (0,external_wp_element_namespaceObject.useContext)(typography_example_GlobalStylesContext);
       
 12401   let config = base;
       
 12402   if (variation) {
       
 12403     config = typography_example_mergeBaseAndUserConfigs(base, variation);
       
 12404   }
       
 12405   const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config);
       
 12406   const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {};
       
 12407   const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {};
       
 12408   if (fontSize) {
       
 12409     bodyPreviewStyle.fontSize = fontSize;
       
 12410     headingPreviewStyle.fontSize = fontSize;
       
 12411   }
       
 12412   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 12413     animate: {
       
 12414       scale: 1,
       
 12415       opacity: 1
       
 12416     },
       
 12417     initial: {
       
 12418       scale: 0.1,
       
 12419       opacity: 0
       
 12420     },
       
 12421     transition: {
       
 12422       delay: 0.3,
       
 12423       type: 'tween'
       
 12424     },
       
 12425     style: {
       
 12426       textAlign: 'center'
       
 12427     },
       
 12428     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 12429       style: headingPreviewStyle,
       
 12430       children: (0,external_wp_i18n_namespaceObject._x)('A', 'Uppercase letter A')
       
 12431     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 12432       style: bodyPreviewStyle,
       
 12433       children: (0,external_wp_i18n_namespaceObject._x)('a', 'Lowercase letter A')
       
 12434     })]
       
 12435   });
       
 12436 }
       
 12437 
       
 12438 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/highlighted-colors.js
       
 12439 /**
       
 12440  * WordPress dependencies
       
 12441  */
       
 12442 
       
 12443 
       
 12444 /**
       
 12445  * Internal dependencies
       
 12446  */
       
 12447 
       
 12448 
       
 12449 function HighlightedColors({
       
 12450   normalizedColorSwatchSize,
       
 12451   ratio
       
 12452 }) {
       
 12453   const {
       
 12454     highlightedColors
       
 12455   } = useStylesPreviewColors();
       
 12456   const scaledSwatchSize = normalizedColorSwatchSize * ratio;
       
 12457   return highlightedColors.map(({
       
 12458     slug,
       
 12459     color
       
 12460   }, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 12461     style: {
       
 12462       height: scaledSwatchSize,
       
 12463       width: scaledSwatchSize,
       
 12464       background: color,
       
 12465       borderRadius: scaledSwatchSize / 2
       
 12466     },
       
 12467     animate: {
       
 12468       scale: 1,
       
 12469       opacity: 1
       
 12470     },
       
 12471     initial: {
       
 12472       scale: 0.1,
       
 12473       opacity: 0
       
 12474     },
       
 12475     transition: {
       
 12476       delay: index === 1 ? 0.2 : 0.1
       
 12477     }
       
 12478   }, `${slug}-${index}`));
       
 12479 }
       
 12480 
       
 12481 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preview-iframe.js
       
 12482 /**
       
 12483  * WordPress dependencies
       
 12484  */
       
 12485 
       
 12486 
       
 12487 
       
 12488 
       
 12489 
       
 12490 /**
       
 12491  * Internal dependencies
       
 12492  */
       
 12493 
       
 12494 
       
 12495 
       
 12496 
       
 12497 const {
       
 12498   useGlobalStyle: preview_iframe_useGlobalStyle,
       
 12499   useGlobalStylesOutput: preview_iframe_useGlobalStylesOutput
       
 12500 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 12501 const normalizedWidth = 248;
       
 12502 const normalizedHeight = 152;
       
 12503 
       
 12504 // Throttle options for useThrottle. Must be defined outside of the component,
       
 12505 // so that the object reference is the same on each render.
       
 12506 const THROTTLE_OPTIONS = {
       
 12507   leading: true,
       
 12508   trailing: true
       
 12509 };
       
 12510 function PreviewIframe({
       
 12511   children,
       
 12512   label,
       
 12513   isFocused,
       
 12514   withHoverView
       
 12515 }) {
       
 12516   const [backgroundColor = 'white'] = preview_iframe_useGlobalStyle('color.background');
       
 12517   const [gradientValue] = preview_iframe_useGlobalStyle('color.gradient');
       
 12518   const [styles] = preview_iframe_useGlobalStylesOutput();
       
 12519   const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
       
 12520   const [isHovered, setIsHovered] = (0,external_wp_element_namespaceObject.useState)(false);
       
 12521   const [containerResizeListener, {
       
 12522     width
       
 12523   }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
       
 12524   const [throttledWidth, setThrottledWidthState] = (0,external_wp_element_namespaceObject.useState)(width);
       
 12525   const [ratioState, setRatioState] = (0,external_wp_element_namespaceObject.useState)();
       
 12526   const setThrottledWidth = (0,external_wp_compose_namespaceObject.useThrottle)(setThrottledWidthState, 250, THROTTLE_OPTIONS);
       
 12527 
       
 12528   // Must use useLayoutEffect to avoid a flash of the iframe at the wrong
       
 12529   // size before the width is set.
       
 12530   (0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
       
 12531     if (width) {
       
 12532       setThrottledWidth(width);
       
 12533     }
       
 12534   }, [width, setThrottledWidth]);
       
 12535 
       
 12536   // Must use useLayoutEffect to avoid a flash of the iframe at the wrong
       
 12537   // size before the width is set.
       
 12538   (0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
       
 12539     const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
       
 12540     const ratioDiff = newRatio - (ratioState || 0);
       
 12541 
       
 12542     // Only update the ratio state if the difference is big enough
       
 12543     // or if the ratio state is not yet set. This is to avoid an
       
 12544     // endless loop of updates at particular viewport heights when the
       
 12545     // presence of a scrollbar causes the width to change slightly.
       
 12546     const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
       
 12547     if (isRatioDiffBigEnough || !ratioState) {
       
 12548       setRatioState(newRatio);
       
 12549     }
       
 12550   }, [throttledWidth, ratioState]);
       
 12551 
       
 12552   // Set a fallbackRatio to use before the throttled ratio has been set.
       
 12553   const fallbackRatio = width ? width / normalizedWidth : 1;
       
 12554   /*
       
 12555    * Use the throttled ratio if it has been calculated, otherwise
       
 12556    * use the fallback ratio. The throttled ratio is used to avoid
       
 12557    * an endless loop of updates at particular viewport heights.
       
 12558    * See: https://github.com/WordPress/gutenberg/issues/55112
       
 12559    */
       
 12560   const ratio = ratioState ? ratioState : fallbackRatio;
       
 12561 
       
 12562   /*
       
 12563    * Reset leaked styles from WP common.css and remove main content layout padding and border.
       
 12564    * Add pointer cursor to the body to indicate the iframe is interactive,
       
 12565    * similar to Typography variation previews.
       
 12566    */
       
 12567   const editorStyles = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 12568     if (styles) {
       
 12569       return [...styles, {
       
 12570         css: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;cursor: pointer;}',
       
 12571         isGlobalStyles: true
       
 12572       }];
       
 12573     }
       
 12574     return styles;
       
 12575   }, [styles]);
       
 12576   const isReady = !!width;
       
 12577   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 12578     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 12579       style: {
       
 12580         position: 'relative'
       
 12581       },
       
 12582       children: containerResizeListener
       
 12583     }), isReady && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.__unstableIframe, {
       
 12584       className: "edit-site-global-styles-preview__iframe",
       
 12585       style: {
       
 12586         height: normalizedHeight * ratio
       
 12587       },
       
 12588       onMouseEnter: () => setIsHovered(true),
       
 12589       onMouseLeave: () => setIsHovered(false),
       
 12590       tabIndex: -1,
       
 12591       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
       
 12592         styles: editorStyles
       
 12593       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 12594         style: {
       
 12595           height: normalizedHeight * ratio,
       
 12596           width: '100%',
       
 12597           background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor,
       
 12598           cursor: withHoverView ? 'pointer' : undefined
       
 12599         },
       
 12600         initial: "start",
       
 12601         animate: (isHovered || isFocused) && !disableMotion && label ? 'hover' : 'start',
       
 12602         children: [].concat(children) // This makes sure children is always an array.
       
 12603         .map((child, key) => child({
       
 12604           ratio,
       
 12605           key
       
 12606         }))
       
 12607       })]
       
 12608     })]
       
 12609   });
       
 12610 }
       
 12611 
       
 12612 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preview-styles.js
       
 12613 /**
       
 12614  * WordPress dependencies
       
 12615  */
       
 12616 
       
 12617 
       
 12618 
       
 12619 /**
       
 12620  * Internal dependencies
       
 12621  */
       
 12622 
       
 12623 
       
 12624 
       
 12625 
       
 12626 
       
 12627 
       
 12628 
       
 12629 const {
       
 12630   useGlobalStyle: preview_styles_useGlobalStyle
       
 12631 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 12632 const firstFrameVariants = {
       
 12633   start: {
       
 12634     scale: 1,
       
 12635     opacity: 1
       
 12636   },
       
 12637   hover: {
       
 12638     scale: 0,
       
 12639     opacity: 0
       
 12640   }
       
 12641 };
       
 12642 const midFrameVariants = {
       
 12643   hover: {
       
 12644     opacity: 1
       
 12645   },
       
 12646   start: {
       
 12647     opacity: 0.5
       
 12648   }
       
 12649 };
       
 12650 const secondFrameVariants = {
       
 12651   hover: {
       
 12652     scale: 1,
       
 12653     opacity: 1
       
 12654   },
       
 12655   start: {
       
 12656     scale: 0,
       
 12657     opacity: 0
       
 12658   }
       
 12659 };
       
 12660 const PreviewStyles = ({
       
 12661   label,
       
 12662   isFocused,
       
 12663   withHoverView,
       
 12664   variation
       
 12665 }) => {
       
 12666   const [fontWeight] = preview_styles_useGlobalStyle('typography.fontWeight');
       
 12667   const [fontFamily = 'serif'] = preview_styles_useGlobalStyle('typography.fontFamily');
       
 12668   const [headingFontFamily = fontFamily] = preview_styles_useGlobalStyle('elements.h1.typography.fontFamily');
       
 12669   const [headingFontWeight = fontWeight] = preview_styles_useGlobalStyle('elements.h1.typography.fontWeight');
       
 12670   const [textColor = 'black'] = preview_styles_useGlobalStyle('color.text');
       
 12671   const [headingColor = textColor] = preview_styles_useGlobalStyle('elements.h1.color.text');
       
 12672   const {
       
 12673     paletteColors
       
 12674   } = useStylesPreviewColors();
       
 12675   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(PreviewIframe, {
       
 12676     label: label,
       
 12677     isFocused: isFocused,
       
 12678     withHoverView: withHoverView,
       
 12679     children: [({
       
 12680       ratio,
       
 12681       key
       
 12682     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 12683       variants: firstFrameVariants,
       
 12684       style: {
       
 12685         height: '100%',
       
 12686         overflow: 'hidden'
       
 12687       },
       
 12688       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 12689         spacing: 10 * ratio,
       
 12690         justify: "center",
       
 12691         style: {
       
 12692           height: '100%',
       
 12693           overflow: 'hidden'
       
 12694         },
       
 12695         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewTypography, {
       
 12696           fontSize: 65 * ratio,
       
 12697           variation: variation
       
 12698         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 12699           spacing: 4 * ratio,
       
 12700           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(HighlightedColors, {
       
 12701             normalizedColorSwatchSize: 32,
       
 12702             ratio: ratio
       
 12703           })
       
 12704         })]
       
 12705       })
       
 12706     }, key), ({
       
 12707       key
       
 12708     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 12709       variants: withHoverView && midFrameVariants,
       
 12710       style: {
       
 12711         height: '100%',
       
 12712         width: '100%',
       
 12713         position: 'absolute',
       
 12714         top: 0,
       
 12715         overflow: 'hidden',
       
 12716         filter: 'blur(60px)',
       
 12717         opacity: 0.1
       
 12718       },
       
 12719       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 12720         spacing: 0,
       
 12721         justify: "flex-start",
       
 12722         style: {
       
 12723           height: '100%',
       
 12724           overflow: 'hidden'
       
 12725         },
       
 12726         children: paletteColors.slice(0, 4).map(({
       
 12727           color
       
 12728         }, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 12729           style: {
       
 12730             height: '100%',
       
 12731             background: color,
       
 12732             flexGrow: 1
       
 12733           }
       
 12734         }, index))
       
 12735       })
       
 12736     }, key), ({
       
 12737       ratio,
       
 12738       key
       
 12739     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 12740       variants: secondFrameVariants,
       
 12741       style: {
       
 12742         height: '100%',
       
 12743         width: '100%',
       
 12744         overflow: 'hidden',
       
 12745         position: 'absolute',
       
 12746         top: 0
       
 12747       },
       
 12748       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 12749         spacing: 3 * ratio,
       
 12750         justify: "center",
       
 12751         style: {
       
 12752           height: '100%',
       
 12753           overflow: 'hidden',
       
 12754           padding: 10 * ratio,
       
 12755           boxSizing: 'border-box'
       
 12756         },
       
 12757         children: label && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 12758           style: {
       
 12759             fontSize: 40 * ratio,
       
 12760             fontFamily: headingFontFamily,
       
 12761             color: headingColor,
       
 12762             fontWeight: headingFontWeight,
       
 12763             lineHeight: '1em',
       
 12764             textAlign: 'center'
       
 12765           },
       
 12766           children: label
       
 12767         })
       
 12768       })
       
 12769     }, key)]
       
 12770   });
       
 12771 };
       
 12772 /* harmony default export */ const preview_styles = (PreviewStyles);
       
 12773 
       
 12774 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-root.js
       
 12775 /**
       
 12776  * WordPress dependencies
       
 12777  */
       
 12778 
       
 12779 
       
 12780 
       
 12781 
       
 12782 
       
 12783 
       
 12784 
       
 12785 /**
       
 12786  * Internal dependencies
       
 12787  */
       
 12788 
       
 12789 
       
 12790 
       
 12791 
       
 12792 
       
 12793 
       
 12794 
       
 12795 
       
 12796 const {
       
 12797   useGlobalStyle: screen_root_useGlobalStyle
       
 12798 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 12799 function ScreenRoot() {
       
 12800   const [customCSS] = screen_root_useGlobalStyle('css');
       
 12801   const {
       
 12802     hasVariations,
       
 12803     canEditCSS
       
 12804   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 12805     const {
       
 12806       getEntityRecord,
       
 12807       __experimentalGetCurrentGlobalStylesId,
       
 12808       __experimentalGetCurrentThemeGlobalStylesVariations
       
 12809     } = select(external_wp_coreData_namespaceObject.store);
       
 12810     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 12811     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 12812     return {
       
 12813       hasVariations: !!__experimentalGetCurrentThemeGlobalStylesVariations()?.length,
       
 12814       canEditCSS: !!globalStyles?._links?.['wp:action-edit-css']
       
 12815     };
       
 12816   }, []);
       
 12817   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Card, {
       
 12818     size: "small",
       
 12819     className: "edit-site-global-styles-screen-root",
       
 12820     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CardBody, {
       
 12821       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 12822         spacing: 4,
       
 12823         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Card, {
       
 12824           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CardMedia, {
       
 12825             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(preview_styles, {})
       
 12826           })
       
 12827         }), hasVariations && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 12828           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12829             path: "/variations",
       
 12830             "aria-label": (0,external_wp_i18n_namespaceObject.__)('Browse styles'),
       
 12831             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 12832               justify: "space-between",
       
 12833               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 12834                 children: (0,external_wp_i18n_namespaceObject.__)('Browse styles')
       
 12835               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(IconWithCurrentColor, {
       
 12836                 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
       
 12837               })]
       
 12838             })
       
 12839           })
       
 12840         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(root_menu, {})]
       
 12841       })
       
 12842     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CardDivider, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.CardBody, {
       
 12843       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 12844         as: "p",
       
 12845         paddingTop: 2
       
 12846         /*
       
 12847          * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).
       
 12848          * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the
       
 12849          * the nav button inset should be looked at before reusing further.
       
 12850          */,
       
 12851         paddingX: "13px",
       
 12852         marginBottom: 4,
       
 12853         children: (0,external_wp_i18n_namespaceObject.__)('Customize the appearance of specific blocks for the whole site.')
       
 12854       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 12855         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12856           path: "/blocks",
       
 12857           "aria-label": (0,external_wp_i18n_namespaceObject.__)('Blocks styles'),
       
 12858           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 12859             justify: "space-between",
       
 12860             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 12861               children: (0,external_wp_i18n_namespaceObject.__)('Blocks')
       
 12862             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(IconWithCurrentColor, {
       
 12863               icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
       
 12864             })]
       
 12865           })
       
 12866         })
       
 12867       })]
       
 12868     }), canEditCSS && !!customCSS && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 12869       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CardDivider, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.CardBody, {
       
 12870         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 12871           as: "p",
       
 12872           paddingTop: 2,
       
 12873           paddingX: "13px",
       
 12874           marginBottom: 4,
       
 12875           children: (0,external_wp_i18n_namespaceObject.__)('Add your own CSS to customize the appearance and layout of your site.')
       
 12876         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 12877           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12878             path: "/css",
       
 12879             "aria-label": (0,external_wp_i18n_namespaceObject.__)('Additional CSS'),
       
 12880             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 12881               justify: "space-between",
       
 12882               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 12883                 children: (0,external_wp_i18n_namespaceObject.__)('Additional CSS')
       
 12884               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(IconWithCurrentColor, {
       
 12885                 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
       
 12886               })]
       
 12887             })
       
 12888           })
       
 12889         })]
       
 12890       })]
       
 12891     })]
       
 12892   });
       
 12893 }
       
 12894 /* harmony default export */ const screen_root = (ScreenRoot);
       
 12895 
       
 12896 ;// CONCATENATED MODULE: external ["wp","a11y"]
       
 12897 const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
       
 12898 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variations-panel.js
       
 12899 /**
       
 12900  * WordPress dependencies
       
 12901  */
       
 12902 
       
 12903 
       
 12904 
       
 12905 
       
 12906 
       
 12907 /**
       
 12908  * Internal dependencies
       
 12909  */
       
 12910 
       
 12911 
       
 12912 
       
 12913 const {
       
 12914   useGlobalStyle: variations_panel_useGlobalStyle
       
 12915 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 12916 
       
 12917 // Only core block styles (source === block) or block styles with a matching
       
 12918 // theme.json style variation will be configurable via Global Styles.
       
 12919 function getFilteredBlockStyles(blockStyles, variations) {
       
 12920   return blockStyles?.filter(style => style.source === 'block' || variations.includes(style.name));
       
 12921 }
       
 12922 function useBlockVariations(name) {
       
 12923   const blockStyles = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 12924     const {
       
 12925       getBlockStyles
       
 12926     } = select(external_wp_blocks_namespaceObject.store);
       
 12927     return getBlockStyles(name);
       
 12928   }, [name]);
       
 12929   const [variations] = variations_panel_useGlobalStyle('variations', name);
       
 12930   const variationNames = Object.keys(variations !== null && variations !== void 0 ? variations : {});
       
 12931   return getFilteredBlockStyles(blockStyles, variationNames);
       
 12932 }
       
 12933 function VariationsPanel({
       
 12934   name
       
 12935 }) {
       
 12936   const coreBlockStyles = useBlockVariations(name);
       
 12937   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 12938     isBordered: true,
       
 12939     isSeparated: true,
       
 12940     children: coreBlockStyles.map((style, index) => {
       
 12941       if (style?.isDefault) {
       
 12942         return null;
       
 12943       }
       
 12944       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 12945         path: '/blocks/' + encodeURIComponent(name) + '/variations/' + encodeURIComponent(style.name),
       
 12946         "aria-label": style.label,
       
 12947         children: style.label
       
 12948       }, index);
       
 12949     })
       
 12950   });
       
 12951 }
       
 12952 
       
 12953 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/header.js
       
 12954 /**
       
 12955  * WordPress dependencies
       
 12956  */
       
 12957 
       
 12958 
       
 12959 
       
 12960 
       
 12961 
       
 12962 function ScreenHeader({
       
 12963   title,
       
 12964   description,
       
 12965   onBack
       
 12966 }) {
       
 12967   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 12968     spacing: 0,
       
 12969     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalView, {
       
 12970       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 12971         marginBottom: 0,
       
 12972         paddingX: 4,
       
 12973         paddingY: 3,
       
 12974         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 12975           spacing: 2,
       
 12976           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNavigatorToParentButton, {
       
 12977             style:
       
 12978             // TODO: This style override is also used in ToolsPanelHeader.
       
 12979             // It should be supported out-of-the-box by Button.
       
 12980             {
       
 12981               minWidth: 24,
       
 12982               padding: 0
       
 12983             },
       
 12984             icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right : chevron_left,
       
 12985             size: "small",
       
 12986             label: (0,external_wp_i18n_namespaceObject.__)('Back'),
       
 12987             onClick: onBack
       
 12988           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 12989             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 12990               className: "edit-site-global-styles-header",
       
 12991               level: 2,
       
 12992               size: 13,
       
 12993               children: title
       
 12994             })
       
 12995           })]
       
 12996         })
       
 12997       })
       
 12998     }), description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 12999       className: "edit-site-global-styles-header__description",
       
 13000       children: description
       
 13001     })]
       
 13002   });
       
 13003 }
       
 13004 /* harmony default export */ const header = (ScreenHeader);
       
 13005 
       
 13006 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-block-list.js
       
 13007 /**
       
 13008  * WordPress dependencies
       
 13009  */
       
 13010 
       
 13011 
       
 13012 
       
 13013 
       
 13014 
       
 13015 
       
 13016 
       
 13017 
       
 13018 
       
 13019 /**
       
 13020  * Internal dependencies
       
 13021  */
       
 13022 
       
 13023 
       
 13024 
       
 13025 
       
 13026 
       
 13027 
       
 13028 
       
 13029 const {
       
 13030   useHasDimensionsPanel: screen_block_list_useHasDimensionsPanel,
       
 13031   useHasTypographyPanel: screen_block_list_useHasTypographyPanel,
       
 13032   useHasBorderPanel,
       
 13033   useGlobalSetting: screen_block_list_useGlobalSetting,
       
 13034   useSettingsForBlockElement: screen_block_list_useSettingsForBlockElement,
       
 13035   useHasColorPanel: screen_block_list_useHasColorPanel
       
 13036 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 13037 function useSortedBlockTypes() {
       
 13038   const blockItems = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blocks_namespaceObject.store).getBlockTypes(), []);
       
 13039   // Ensure core blocks are prioritized in the returned results,
       
 13040   // because third party blocks can be registered earlier than
       
 13041   // the core blocks (usually by using the `init` action),
       
 13042   // thus affecting the display order.
       
 13043   // We don't sort reusable blocks as they are handled differently.
       
 13044   const groupByType = (blocks, block) => {
       
 13045     const {
       
 13046       core,
       
 13047       noncore
       
 13048     } = blocks;
       
 13049     const type = block.name.startsWith('core/') ? core : noncore;
       
 13050     type.push(block);
       
 13051     return blocks;
       
 13052   };
       
 13053   const {
       
 13054     core: coreItems,
       
 13055     noncore: nonCoreItems
       
 13056   } = blockItems.reduce(groupByType, {
       
 13057     core: [],
       
 13058     noncore: []
       
 13059   });
       
 13060   return [...coreItems, ...nonCoreItems];
       
 13061 }
       
 13062 function useBlockHasGlobalStyles(blockName) {
       
 13063   const [rawSettings] = screen_block_list_useGlobalSetting('', blockName);
       
 13064   const settings = screen_block_list_useSettingsForBlockElement(rawSettings, blockName);
       
 13065   const hasTypographyPanel = screen_block_list_useHasTypographyPanel(settings);
       
 13066   const hasColorPanel = screen_block_list_useHasColorPanel(settings);
       
 13067   const hasBorderPanel = useHasBorderPanel(settings);
       
 13068   const hasDimensionsPanel = screen_block_list_useHasDimensionsPanel(settings);
       
 13069   const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
       
 13070   const hasVariationsPanel = !!useBlockVariations(blockName)?.length;
       
 13071   const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasLayoutPanel || hasVariationsPanel;
       
 13072   return hasGlobalStyles;
       
 13073 }
       
 13074 function BlockMenuItem({
       
 13075   block
       
 13076 }) {
       
 13077   const hasBlockMenuItem = useBlockHasGlobalStyles(block.name);
       
 13078   if (!hasBlockMenuItem) {
       
 13079     return null;
       
 13080   }
       
 13081   const navigationButtonLabel = (0,external_wp_i18n_namespaceObject.sprintf)(
       
 13082   // translators: %s: is the name of a block e.g., 'Image' or 'Table'.
       
 13083   (0,external_wp_i18n_namespaceObject.__)('%s block styles'), block.title);
       
 13084   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 13085     path: '/blocks/' + encodeURIComponent(block.name),
       
 13086     "aria-label": navigationButtonLabel,
       
 13087     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 13088       justify: "flex-start",
       
 13089       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
       
 13090         icon: block.icon
       
 13091       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 13092         children: block.title
       
 13093       })]
       
 13094     })
       
 13095   });
       
 13096 }
       
 13097 function BlockList({
       
 13098   filterValue
       
 13099 }) {
       
 13100   const sortedBlockTypes = useSortedBlockTypes();
       
 13101   const debouncedSpeak = (0,external_wp_compose_namespaceObject.useDebounce)(external_wp_a11y_namespaceObject.speak, 500);
       
 13102   const {
       
 13103     isMatchingSearchTerm
       
 13104   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blocks_namespaceObject.store);
       
 13105   const filteredBlockTypes = !filterValue ? sortedBlockTypes : sortedBlockTypes.filter(blockType => isMatchingSearchTerm(blockType, filterValue));
       
 13106   const blockTypesListRef = (0,external_wp_element_namespaceObject.useRef)();
       
 13107 
       
 13108   // Announce search results on change
       
 13109   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 13110     if (!filterValue) {
       
 13111       return;
       
 13112     }
       
 13113     // We extract the results from the wrapper div's `ref` because
       
 13114     // filtered items can contain items that will eventually not
       
 13115     // render and there is no reliable way to detect when a child
       
 13116     // will return `null`.
       
 13117     // TODO: We should find a better way of handling this as it's
       
 13118     // fragile and depends on the number of rendered elements of `BlockMenuItem`,
       
 13119     // which is now one.
       
 13120     // @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116
       
 13121     const count = blockTypesListRef.current.childElementCount;
       
 13122     const resultsFoundMessage = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: number of results. */
       
 13123     (0,external_wp_i18n_namespaceObject._n)('%d result found.', '%d results found.', count), count);
       
 13124     debouncedSpeak(resultsFoundMessage, count);
       
 13125   }, [filterValue, debouncedSpeak]);
       
 13126   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 13127     ref: blockTypesListRef,
       
 13128     className: "edit-site-block-types-item-list",
       
 13129     children: filteredBlockTypes.map(block => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockMenuItem, {
       
 13130       block: block
       
 13131     }, 'menu-itemblock-' + block.name))
       
 13132   });
       
 13133 }
       
 13134 const MemoizedBlockList = (0,external_wp_element_namespaceObject.memo)(BlockList);
       
 13135 function ScreenBlockList() {
       
 13136   const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)('');
       
 13137   const deferredFilterValue = (0,external_wp_element_namespaceObject.useDeferredValue)(filterValue);
       
 13138   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 13139     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 13140       title: (0,external_wp_i18n_namespaceObject.__)('Blocks'),
       
 13141       description: (0,external_wp_i18n_namespaceObject.__)('Customize the appearance of specific blocks and for the whole site.')
       
 13142     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SearchControl, {
       
 13143       __nextHasNoMarginBottom: true,
       
 13144       className: "edit-site-block-types-search",
       
 13145       onChange: setFilterValue,
       
 13146       value: filterValue,
       
 13147       label: (0,external_wp_i18n_namespaceObject.__)('Search for blocks'),
       
 13148       placeholder: (0,external_wp_i18n_namespaceObject.__)('Search')
       
 13149     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MemoizedBlockList, {
       
 13150       filterValue: deferredFilterValue
       
 13151     })]
       
 13152   });
       
 13153 }
       
 13154 /* harmony default export */ const screen_block_list = (ScreenBlockList);
       
 13155 
       
 13156 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/block-preview-panel.js
       
 13157 /**
       
 13158  * WordPress dependencies
       
 13159  */
       
 13160 
       
 13161 
       
 13162 
       
 13163 
       
 13164 
       
 13165 /**
       
 13166  * Internal dependencies
       
 13167  */
       
 13168 
       
 13169 
       
 13170 const BlockPreviewPanel = ({
       
 13171   name,
       
 13172   variation = ''
       
 13173 }) => {
       
 13174   var _blockExample$viewpor;
       
 13175   const blockExample = (0,external_wp_blocks_namespaceObject.getBlockType)(name)?.example;
       
 13176   const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 13177     if (!blockExample) {
       
 13178       return null;
       
 13179     }
       
 13180     let example = blockExample;
       
 13181     if (variation) {
       
 13182       example = {
       
 13183         ...example,
       
 13184         attributes: {
       
 13185           ...example.attributes,
       
 13186           className: getVariationClassName(variation)
       
 13187         }
       
 13188       };
       
 13189     }
       
 13190     return (0,external_wp_blocks_namespaceObject.getBlockFromExample)(name, example);
       
 13191   }, [name, blockExample, variation]);
       
 13192   const viewportWidth = (_blockExample$viewpor = blockExample?.viewportWidth) !== null && _blockExample$viewpor !== void 0 ? _blockExample$viewpor : null;
       
 13193   const previewHeight = 150;
       
 13194   if (!blockExample) {
       
 13195     return null;
       
 13196   }
       
 13197   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 13198     marginX: 4,
       
 13199     marginBottom: 4,
       
 13200     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 13201       className: "edit-site-global-styles__block-preview-panel",
       
 13202       style: {
       
 13203         maxHeight: previewHeight,
       
 13204         boxSizing: 'initial'
       
 13205       },
       
 13206       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockPreview, {
       
 13207         blocks: blocks,
       
 13208         viewportWidth: viewportWidth,
       
 13209         minHeight: previewHeight,
       
 13210         additionalStyles: [{
       
 13211           css: `
       
 13212 								body{
       
 13213 									min-height:${previewHeight}px;
       
 13214 									display:flex;align-items:center;justify-content:center;
       
 13215 								}
       
 13216 							`
       
 13217         }]
       
 13218       })
       
 13219     })
       
 13220   });
       
 13221 };
       
 13222 /* harmony default export */ const block_preview_panel = (BlockPreviewPanel);
       
 13223 
       
 13224 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/subtitle.js
       
 13225 /**
       
 13226  * WordPress dependencies
       
 13227  */
       
 13228 
       
 13229 
       
 13230 function Subtitle({
       
 13231   children,
       
 13232   level
       
 13233 }) {
       
 13234   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 13235     className: "edit-site-global-styles-subtitle",
       
 13236     level: level !== null && level !== void 0 ? level : 2,
       
 13237     children: children
       
 13238   });
       
 13239 }
       
 13240 /* harmony default export */ const subtitle = (Subtitle);
       
 13241 
       
 13242 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-block.js
       
 13243 /**
       
 13244  * WordPress dependencies
       
 13245  */
       
 13246 
       
 13247 
       
 13248 
       
 13249 
       
 13250 
       
 13251 
       
 13252 
       
 13253 
       
 13254 /**
       
 13255  * Internal dependencies
       
 13256  */
       
 13257 
       
 13258 
       
 13259 
       
 13260 
       
 13261 
       
 13262 
       
 13263 
       
 13264 
       
 13265 function applyFallbackStyle(border) {
       
 13266   if (!border) {
       
 13267     return border;
       
 13268   }
       
 13269   const hasColorOrWidth = border.color || border.width;
       
 13270   if (!border.style && hasColorOrWidth) {
       
 13271     return {
       
 13272       ...border,
       
 13273       style: 'solid'
       
 13274     };
       
 13275   }
       
 13276   if (border.style && !hasColorOrWidth) {
       
 13277     return undefined;
       
 13278   }
       
 13279   return border;
       
 13280 }
       
 13281 function applyAllFallbackStyles(border) {
       
 13282   if (!border) {
       
 13283     return border;
       
 13284   }
       
 13285   if ((0,external_wp_components_namespaceObject.__experimentalHasSplitBorders)(border)) {
       
 13286     return {
       
 13287       top: applyFallbackStyle(border.top),
       
 13288       right: applyFallbackStyle(border.right),
       
 13289       bottom: applyFallbackStyle(border.bottom),
       
 13290       left: applyFallbackStyle(border.left)
       
 13291     };
       
 13292   }
       
 13293   return applyFallbackStyle(border);
       
 13294 }
       
 13295 const {
       
 13296   useHasDimensionsPanel: screen_block_useHasDimensionsPanel,
       
 13297   useHasTypographyPanel: screen_block_useHasTypographyPanel,
       
 13298   useHasBorderPanel: screen_block_useHasBorderPanel,
       
 13299   useGlobalSetting: screen_block_useGlobalSetting,
       
 13300   useSettingsForBlockElement: screen_block_useSettingsForBlockElement,
       
 13301   useHasColorPanel: screen_block_useHasColorPanel,
       
 13302   useHasFiltersPanel,
       
 13303   useHasImageSettingsPanel,
       
 13304   useGlobalStyle: screen_block_useGlobalStyle,
       
 13305   BorderPanel: StylesBorderPanel,
       
 13306   ColorPanel: StylesColorPanel,
       
 13307   TypographyPanel: StylesTypographyPanel,
       
 13308   DimensionsPanel: StylesDimensionsPanel,
       
 13309   FiltersPanel: StylesFiltersPanel,
       
 13310   ImageSettingsPanel,
       
 13311   AdvancedPanel: StylesAdvancedPanel
       
 13312 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 13313 function ScreenBlock({
       
 13314   name,
       
 13315   variation
       
 13316 }) {
       
 13317   let prefixParts = [];
       
 13318   if (variation) {
       
 13319     prefixParts = ['variations', variation].concat(prefixParts);
       
 13320   }
       
 13321   const prefix = prefixParts.join('.');
       
 13322   const [style] = screen_block_useGlobalStyle(prefix, name, 'user', {
       
 13323     shouldDecodeEncode: false
       
 13324   });
       
 13325   const [inheritedStyle, setStyle] = screen_block_useGlobalStyle(prefix, name, 'all', {
       
 13326     shouldDecodeEncode: false
       
 13327   });
       
 13328   const [userSettings] = screen_block_useGlobalSetting('', name, 'user');
       
 13329   const [rawSettings, setSettings] = screen_block_useGlobalSetting('', name);
       
 13330   const settings = screen_block_useSettingsForBlockElement(rawSettings, name);
       
 13331   const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
       
 13332 
       
 13333   // Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.
       
 13334   if (settings?.spacing?.blockGap && blockType?.supports?.spacing?.blockGap && (blockType?.supports?.spacing?.__experimentalSkipSerialization === true || blockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(spacingType => spacingType === 'blockGap'))) {
       
 13335     settings.spacing.blockGap = false;
       
 13336   }
       
 13337 
       
 13338   // Only allow `aspectRatio` support if the block is not the grouping block.
       
 13339   // The grouping block allows the user to use Group, Row and Stack variations,
       
 13340   // and it is highly likely that the user will not want to set an aspect ratio
       
 13341   // for all three at once. Until there is the ability to set a different aspect
       
 13342   // ratio for each variation, we disable the aspect ratio controls for the
       
 13343   // grouping block in global styles.
       
 13344   if (settings?.dimensions?.aspectRatio && name === 'core/group') {
       
 13345     settings.dimensions.aspectRatio = false;
       
 13346   }
       
 13347   const blockVariations = useBlockVariations(name);
       
 13348   const hasTypographyPanel = screen_block_useHasTypographyPanel(settings);
       
 13349   const hasColorPanel = screen_block_useHasColorPanel(settings);
       
 13350   const hasBorderPanel = screen_block_useHasBorderPanel(settings);
       
 13351   const hasDimensionsPanel = screen_block_useHasDimensionsPanel(settings);
       
 13352   const hasFiltersPanel = useHasFiltersPanel(settings);
       
 13353   const hasImageSettingsPanel = useHasImageSettingsPanel(name, userSettings, settings);
       
 13354   const hasVariationsPanel = !!blockVariations?.length && !variation;
       
 13355   const {
       
 13356     canEditCSS
       
 13357   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 13358     const {
       
 13359       getEntityRecord,
       
 13360       __experimentalGetCurrentGlobalStylesId
       
 13361     } = select(external_wp_coreData_namespaceObject.store);
       
 13362     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 13363     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 13364     return {
       
 13365       canEditCSS: !!globalStyles?._links?.['wp:action-edit-css']
       
 13366     };
       
 13367   }, []);
       
 13368   const currentBlockStyle = variation ? blockVariations.find(s => s.name === variation) : null;
       
 13369 
       
 13370   // These intermediary objects are needed because the "layout" property is stored
       
 13371   // in settings rather than styles.
       
 13372   const inheritedStyleWithLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 13373     return {
       
 13374       ...inheritedStyle,
       
 13375       layout: settings.layout
       
 13376     };
       
 13377   }, [inheritedStyle, settings.layout]);
       
 13378   const styleWithLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 13379     return {
       
 13380       ...style,
       
 13381       layout: userSettings.layout
       
 13382     };
       
 13383   }, [style, userSettings.layout]);
       
 13384   const onChangeDimensions = newStyle => {
       
 13385     const updatedStyle = {
       
 13386       ...newStyle
       
 13387     };
       
 13388     delete updatedStyle.layout;
       
 13389     setStyle(updatedStyle);
       
 13390     if (newStyle.layout !== userSettings.layout) {
       
 13391       setSettings({
       
 13392         ...userSettings,
       
 13393         layout: newStyle.layout
       
 13394       });
       
 13395     }
       
 13396   };
       
 13397   const onChangeLightbox = newSetting => {
       
 13398     // If the newSetting is undefined, this means that the user has deselected
       
 13399     // (reset) the lightbox setting.
       
 13400     if (newSetting === undefined) {
       
 13401       setSettings({
       
 13402         ...rawSettings,
       
 13403         lightbox: undefined
       
 13404       });
       
 13405 
       
 13406       // Otherwise, we simply set the lightbox setting to the new value but
       
 13407       // taking care of not overriding the other lightbox settings.
       
 13408     } else {
       
 13409       setSettings({
       
 13410         ...rawSettings,
       
 13411         lightbox: {
       
 13412           ...rawSettings.lightbox,
       
 13413           ...newSetting
       
 13414         }
       
 13415       });
       
 13416     }
       
 13417   };
       
 13418   const onChangeBorders = newStyle => {
       
 13419     if (!newStyle?.border) {
       
 13420       setStyle(newStyle);
       
 13421       return;
       
 13422     }
       
 13423 
       
 13424     // As Global Styles can't conditionally generate styles based on if
       
 13425     // other style properties have been set, we need to force split
       
 13426     // border definitions for user set global border styles. Border
       
 13427     // radius is derived from the same property i.e. `border.radius` if
       
 13428     // it is a string that is used. The longhand border radii styles are
       
 13429     // only generated if that property is an object.
       
 13430     //
       
 13431     // For borders (color, style, and width) those are all properties on
       
 13432     // the `border` style property. This means if the theme.json defined
       
 13433     // split borders and the user condenses them into a flat border or
       
 13434     // vice-versa we'd get both sets of styles which would conflict.
       
 13435     const {
       
 13436       radius,
       
 13437       ...newBorder
       
 13438     } = newStyle.border;
       
 13439     const border = applyAllFallbackStyles(newBorder);
       
 13440     const updatedBorder = !(0,external_wp_components_namespaceObject.__experimentalHasSplitBorders)(border) ? {
       
 13441       top: border,
       
 13442       right: border,
       
 13443       bottom: border,
       
 13444       left: border
       
 13445     } : {
       
 13446       color: null,
       
 13447       style: null,
       
 13448       width: null,
       
 13449       ...border
       
 13450     };
       
 13451     setStyle({
       
 13452       ...newStyle,
       
 13453       border: {
       
 13454         ...updatedBorder,
       
 13455         radius
       
 13456       }
       
 13457     });
       
 13458   };
       
 13459   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 13460     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 13461       title: variation ? currentBlockStyle?.label : blockType.title
       
 13462     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_preview_panel, {
       
 13463       name: name,
       
 13464       variation: variation
       
 13465     }), hasVariationsPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 13466       className: "edit-site-global-styles-screen-variations",
       
 13467       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 13468         spacing: 3,
       
 13469         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 13470           children: (0,external_wp_i18n_namespaceObject.__)('Style Variations')
       
 13471         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(VariationsPanel, {
       
 13472           name: name
       
 13473         })]
       
 13474       })
       
 13475     }), hasColorPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StylesColorPanel, {
       
 13476       inheritedValue: inheritedStyle,
       
 13477       value: style,
       
 13478       onChange: setStyle,
       
 13479       settings: settings
       
 13480     }), hasTypographyPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StylesTypographyPanel, {
       
 13481       inheritedValue: inheritedStyle,
       
 13482       value: style,
       
 13483       onChange: setStyle,
       
 13484       settings: settings
       
 13485     }), hasDimensionsPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StylesDimensionsPanel, {
       
 13486       inheritedValue: inheritedStyleWithLayout,
       
 13487       value: styleWithLayout,
       
 13488       onChange: onChangeDimensions,
       
 13489       settings: settings,
       
 13490       includeLayoutControls: true
       
 13491     }), hasBorderPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StylesBorderPanel, {
       
 13492       inheritedValue: inheritedStyle,
       
 13493       value: style,
       
 13494       onChange: onChangeBorders,
       
 13495       settings: settings
       
 13496     }), hasFiltersPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StylesFiltersPanel, {
       
 13497       inheritedValue: inheritedStyleWithLayout,
       
 13498       value: styleWithLayout,
       
 13499       onChange: setStyle,
       
 13500       settings: settings,
       
 13501       includeLayoutControls: true
       
 13502     }), hasImageSettingsPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageSettingsPanel, {
       
 13503       onChange: onChangeLightbox,
       
 13504       value: userSettings,
       
 13505       inheritedValue: settings
       
 13506     }), canEditCSS && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
       
 13507       title: (0,external_wp_i18n_namespaceObject.__)('Advanced'),
       
 13508       initialOpen: false,
       
 13509       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 13510         children: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 13511         // translators: %s: is the name of a block e.g., 'Image' or 'Table'.
       
 13512         (0,external_wp_i18n_namespaceObject.__)('Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'), blockType?.title)
       
 13513       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StylesAdvancedPanel, {
       
 13514         value: style,
       
 13515         onChange: setStyle,
       
 13516         inheritedValue: inheritedStyle
       
 13517       })]
       
 13518     })]
       
 13519   });
       
 13520 }
       
 13521 /* harmony default export */ const screen_block = (ScreenBlock);
       
 13522 
       
 13523 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typography-elements.js
       
 13524 /**
       
 13525  * WordPress dependencies
       
 13526  */
       
 13527 
       
 13528 
       
 13529 
       
 13530 
       
 13531 /**
       
 13532  * Internal dependencies
       
 13533  */
       
 13534 
       
 13535 
       
 13536 
       
 13537 
       
 13538 
       
 13539 const {
       
 13540   useGlobalStyle: typography_elements_useGlobalStyle
       
 13541 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 13542 function ElementItem({
       
 13543   parentMenu,
       
 13544   element,
       
 13545   label
       
 13546 }) {
       
 13547   var _ref;
       
 13548   const prefix = element === 'text' || !element ? '' : `elements.${element}.`;
       
 13549   const extraStyles = element === 'link' ? {
       
 13550     textDecoration: 'underline'
       
 13551   } : {};
       
 13552   const [fontFamily] = typography_elements_useGlobalStyle(prefix + 'typography.fontFamily');
       
 13553   const [fontStyle] = typography_elements_useGlobalStyle(prefix + 'typography.fontStyle');
       
 13554   const [fontWeight] = typography_elements_useGlobalStyle(prefix + 'typography.fontWeight');
       
 13555   const [letterSpacing] = typography_elements_useGlobalStyle(prefix + 'typography.letterSpacing');
       
 13556   const [backgroundColor] = typography_elements_useGlobalStyle(prefix + 'color.background');
       
 13557   const [fallbackBackgroundColor] = typography_elements_useGlobalStyle('color.background');
       
 13558   const [gradientValue] = typography_elements_useGlobalStyle(prefix + 'color.gradient');
       
 13559   const [color] = typography_elements_useGlobalStyle(prefix + 'color.text');
       
 13560   const navigationButtonLabel = (0,external_wp_i18n_namespaceObject.sprintf)(
       
 13561   // translators: %s: is a subset of Typography, e.g., 'text' or 'links'.
       
 13562   (0,external_wp_i18n_namespaceObject.__)('Typography %s styles'), label);
       
 13563   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 13564     path: parentMenu + '/typography/' + element,
       
 13565     "aria-label": navigationButtonLabel,
       
 13566     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 13567       justify: "flex-start",
       
 13568       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 13569         className: "edit-site-global-styles-screen-typography__indicator",
       
 13570         style: {
       
 13571           fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
       
 13572           background: (_ref = gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor) !== null && _ref !== void 0 ? _ref : fallbackBackgroundColor,
       
 13573           color,
       
 13574           fontStyle,
       
 13575           fontWeight,
       
 13576           letterSpacing,
       
 13577           ...extraStyles
       
 13578         },
       
 13579         children: (0,external_wp_i18n_namespaceObject.__)('Aa')
       
 13580       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 13581         children: label
       
 13582       })]
       
 13583     })
       
 13584   });
       
 13585 }
       
 13586 function TypographyElements() {
       
 13587   const parentMenu = '';
       
 13588   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 13589     spacing: 3,
       
 13590     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 13591       level: 3,
       
 13592       children: (0,external_wp_i18n_namespaceObject.__)('Elements')
       
 13593     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 13594       isBordered: true,
       
 13595       isSeparated: true,
       
 13596       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ElementItem, {
       
 13597         parentMenu: parentMenu,
       
 13598         element: "text",
       
 13599         label: (0,external_wp_i18n_namespaceObject.__)('Text')
       
 13600       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ElementItem, {
       
 13601         parentMenu: parentMenu,
       
 13602         element: "link",
       
 13603         label: (0,external_wp_i18n_namespaceObject.__)('Links')
       
 13604       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ElementItem, {
       
 13605         parentMenu: parentMenu,
       
 13606         element: "heading",
       
 13607         label: (0,external_wp_i18n_namespaceObject.__)('Headings')
       
 13608       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ElementItem, {
       
 13609         parentMenu: parentMenu,
       
 13610         element: "caption",
       
 13611         label: (0,external_wp_i18n_namespaceObject.__)('Captions')
       
 13612       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ElementItem, {
       
 13613         parentMenu: parentMenu,
       
 13614         element: "button",
       
 13615         label: (0,external_wp_i18n_namespaceObject.__)('Buttons')
       
 13616       })]
       
 13617     })]
       
 13618   });
       
 13619 }
       
 13620 /* harmony default export */ const typography_elements = (TypographyElements);
       
 13621 
       
 13622 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variation.js
       
 13623 /**
       
 13624  * External dependencies
       
 13625  */
       
 13626 
       
 13627 
       
 13628 /**
       
 13629  * WordPress dependencies
       
 13630  */
       
 13631 
       
 13632 
       
 13633 
       
 13634 
       
 13635 
       
 13636 
       
 13637 /**
       
 13638  * Internal dependencies
       
 13639  */
       
 13640 
       
 13641 
       
 13642 
       
 13643 const {
       
 13644   mergeBaseAndUserConfigs: variation_mergeBaseAndUserConfigs
       
 13645 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 13646 const {
       
 13647   GlobalStylesContext: variation_GlobalStylesContext,
       
 13648   areGlobalStyleConfigsEqual
       
 13649 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 13650 function Variation({
       
 13651   variation,
       
 13652   children,
       
 13653   isPill,
       
 13654   property
       
 13655 }) {
       
 13656   const [isFocused, setIsFocused] = (0,external_wp_element_namespaceObject.useState)(false);
       
 13657   const {
       
 13658     base,
       
 13659     user,
       
 13660     setUserConfig
       
 13661   } = (0,external_wp_element_namespaceObject.useContext)(variation_GlobalStylesContext);
       
 13662   const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 13663     let merged = variation_mergeBaseAndUserConfigs(base, variation);
       
 13664     if (property) {
       
 13665       merged = filterObjectByProperty(merged, property);
       
 13666     }
       
 13667     return {
       
 13668       user: variation,
       
 13669       base,
       
 13670       merged,
       
 13671       setUserConfig: () => {}
       
 13672     };
       
 13673   }, [variation, base, property]);
       
 13674   const selectVariation = () => setUserConfig(variation);
       
 13675   const selectOnEnter = event => {
       
 13676     if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER) {
       
 13677       event.preventDefault();
       
 13678       selectVariation();
       
 13679     }
       
 13680   };
       
 13681   const isActive = (0,external_wp_element_namespaceObject.useMemo)(() => areGlobalStyleConfigsEqual(user, variation), [user, variation]);
       
 13682   let label = variation?.title;
       
 13683   if (variation?.description) {
       
 13684     label = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %1$s: variation title. %2$s variation description. */
       
 13685     (0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), variation?.title, variation?.description);
       
 13686   }
       
 13687   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(variation_GlobalStylesContext.Provider, {
       
 13688     value: context,
       
 13689     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 13690       className: dist_clsx('edit-site-global-styles-variations_item', {
       
 13691         'is-active': isActive
       
 13692       }),
       
 13693       role: "button",
       
 13694       onClick: selectVariation,
       
 13695       onKeyDown: selectOnEnter,
       
 13696       tabIndex: "0",
       
 13697       "aria-label": label,
       
 13698       "aria-current": isActive,
       
 13699       onFocus: () => setIsFocused(true),
       
 13700       onBlur: () => setIsFocused(false),
       
 13701       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 13702         className: dist_clsx('edit-site-global-styles-variations_item-preview', {
       
 13703           'is-pill': isPill
       
 13704         }),
       
 13705         children: children(isFocused)
       
 13706       })
       
 13707     })
       
 13708   });
       
 13709 }
       
 13710 
       
 13711 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variations-typography.js
       
 13712 /**
       
 13713  * WordPress dependencies
       
 13714  */
       
 13715 
       
 13716 
       
 13717 /**
       
 13718  * Internal dependencies
       
 13719  */
       
 13720 
       
 13721 
       
 13722 
       
 13723 
       
 13724 
       
 13725 
       
 13726 
       
 13727 function TypographyVariations({
       
 13728   title,
       
 13729   gap = 2
       
 13730 }) {
       
 13731   const typographyVariations = useTypographyVariations();
       
 13732 
       
 13733   // Return null if there is only one variation (the default).
       
 13734   if (typographyVariations?.length <= 1) {
       
 13735     return null;
       
 13736   }
       
 13737   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 13738     spacing: 3,
       
 13739     children: [title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 13740       level: 3,
       
 13741       children: title
       
 13742     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalGrid, {
       
 13743       columns: 3,
       
 13744       gap: gap,
       
 13745       className: "edit-site-global-styles-style-variations-container",
       
 13746       children: typographyVariations && typographyVariations.length && typographyVariations.map((variation, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Variation, {
       
 13747         variation: variation,
       
 13748         property: "typography",
       
 13749         children: isFocused => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewIframe, {
       
 13750           label: variation?.title,
       
 13751           isFocused: isFocused,
       
 13752           children: ({
       
 13753             ratio,
       
 13754             key
       
 13755           }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 13756             spacing: 10 * ratio,
       
 13757             justify: "center",
       
 13758             style: {
       
 13759               height: '100%',
       
 13760               overflow: 'hidden'
       
 13761             },
       
 13762             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewTypography, {
       
 13763               variation: variation,
       
 13764               fontSize: 85 * ratio
       
 13765             })
       
 13766           }, key)
       
 13767         })
       
 13768       }, index))
       
 13769     })]
       
 13770   });
       
 13771 }
       
 13772 
       
 13773 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/settings.js
       
 13774 /**
       
 13775  * WordPress dependencies
       
 13776  */
       
 13777 
       
 13778 
       
 13779 
       
 13780 const settings_settings = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, {
       
 13781   xmlns: "http://www.w3.org/2000/svg",
       
 13782   viewBox: "0 0 24 24",
       
 13783   children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 13784     d: "m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"
       
 13785   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 13786     d: "m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"
       
 13787   })]
       
 13788 });
       
 13789 /* harmony default export */ const library_settings = (settings_settings);
       
 13790 
       
 13791 ;// CONCATENATED MODULE: external ["wp","apiFetch"]
       
 13792 const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
       
 13793 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
       
 13794 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/resolvers.js
       
 13795 /**
       
 13796  * WordPress dependencies
       
 13797  */
       
 13798 
       
 13799 const FONT_FAMILIES_URL = '/wp/v2/font-families';
       
 13800 const FONT_COLLECTIONS_URL = '/wp/v2/font-collections';
       
 13801 async function fetchInstallFontFamily(data) {
       
 13802   const config = {
       
 13803     path: FONT_FAMILIES_URL,
       
 13804     method: 'POST',
       
 13805     body: data
       
 13806   };
       
 13807   const response = await external_wp_apiFetch_default()(config);
       
 13808   return {
       
 13809     id: response.id,
       
 13810     ...response.font_family_settings,
       
 13811     fontFace: []
       
 13812   };
       
 13813 }
       
 13814 async function fetchInstallFontFace(fontFamilyId, data) {
       
 13815   const config = {
       
 13816     path: `${FONT_FAMILIES_URL}/${fontFamilyId}/font-faces`,
       
 13817     method: 'POST',
       
 13818     body: data
       
 13819   };
       
 13820   const response = await external_wp_apiFetch_default()(config);
       
 13821   return {
       
 13822     id: response.id,
       
 13823     ...response.font_face_settings
       
 13824   };
       
 13825 }
       
 13826 async function fetchGetFontFamilyBySlug(slug) {
       
 13827   const config = {
       
 13828     path: `${FONT_FAMILIES_URL}?slug=${slug}&_embed=true`,
       
 13829     method: 'GET'
       
 13830   };
       
 13831   const response = await external_wp_apiFetch_default()(config);
       
 13832   if (!response || response.length === 0) {
       
 13833     return null;
       
 13834   }
       
 13835   const fontFamilyPost = response[0];
       
 13836   return {
       
 13837     id: fontFamilyPost.id,
       
 13838     ...fontFamilyPost.font_family_settings,
       
 13839     fontFace: fontFamilyPost?._embedded?.font_faces.map(face => face.font_face_settings) || []
       
 13840   };
       
 13841 }
       
 13842 async function fetchUninstallFontFamily(fontFamilyId) {
       
 13843   const config = {
       
 13844     path: `${FONT_FAMILIES_URL}/${fontFamilyId}?force=true`,
       
 13845     method: 'DELETE'
       
 13846   };
       
 13847   return await external_wp_apiFetch_default()(config);
       
 13848 }
       
 13849 async function fetchFontCollections() {
       
 13850   const config = {
       
 13851     path: `${FONT_COLLECTIONS_URL}?_fields=slug,name,description`,
       
 13852     method: 'GET'
       
 13853   };
       
 13854   return await external_wp_apiFetch_default()(config);
       
 13855 }
       
 13856 async function fetchFontCollection(id) {
       
 13857   const config = {
       
 13858     path: `${FONT_COLLECTIONS_URL}/${id}`,
       
 13859     method: 'GET'
       
 13860   };
       
 13861   return await external_wp_apiFetch_default()(config);
       
 13862 }
       
 13863 
       
 13864 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/constants.js
       
 13865 /**
       
 13866  * WordPress dependencies
       
 13867  */
       
 13868 
       
 13869 const ALLOWED_FILE_EXTENSIONS = ['otf', 'ttf', 'woff', 'woff2'];
       
 13870 const FONT_WEIGHTS = {
       
 13871   100: (0,external_wp_i18n_namespaceObject._x)('Thin', 'font weight'),
       
 13872   200: (0,external_wp_i18n_namespaceObject._x)('Extra-light', 'font weight'),
       
 13873   300: (0,external_wp_i18n_namespaceObject._x)('Light', 'font weight'),
       
 13874   400: (0,external_wp_i18n_namespaceObject._x)('Normal', 'font weight'),
       
 13875   500: (0,external_wp_i18n_namespaceObject._x)('Medium', 'font weight'),
       
 13876   600: (0,external_wp_i18n_namespaceObject._x)('Semi-bold', 'font weight'),
       
 13877   700: (0,external_wp_i18n_namespaceObject._x)('Bold', 'font weight'),
       
 13878   800: (0,external_wp_i18n_namespaceObject._x)('Extra-bold', 'font weight'),
       
 13879   900: (0,external_wp_i18n_namespaceObject._x)('Black', 'font weight')
       
 13880 };
       
 13881 const FONT_STYLES = {
       
 13882   normal: (0,external_wp_i18n_namespaceObject._x)('Normal', 'font style'),
       
 13883   italic: (0,external_wp_i18n_namespaceObject._x)('Italic', 'font style')
       
 13884 };
       
 13885 
       
 13886 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/index.js
       
 13887 /**
       
 13888  * WordPress dependencies
       
 13889  */
       
 13890 
       
 13891 
       
 13892 /**
       
 13893  * Internal dependencies
       
 13894  */
       
 13895 
       
 13896 
       
 13897 
       
 13898 
       
 13899 
       
 13900 /**
       
 13901  * Browser dependencies
       
 13902  */
       
 13903 const {
       
 13904   File
       
 13905 } = window;
       
 13906 const {
       
 13907   kebabCase
       
 13908 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 13909 function setUIValuesNeeded(font, extraValues = {}) {
       
 13910   if (!font.name && (font.fontFamily || font.slug)) {
       
 13911     font.name = font.fontFamily || font.slug;
       
 13912   }
       
 13913   return {
       
 13914     ...font,
       
 13915     ...extraValues
       
 13916   };
       
 13917 }
       
 13918 function isUrlEncoded(url) {
       
 13919   if (typeof url !== 'string') {
       
 13920     return false;
       
 13921   }
       
 13922   return url !== decodeURIComponent(url);
       
 13923 }
       
 13924 function getFontFaceVariantName(face) {
       
 13925   const weightName = FONT_WEIGHTS[face.fontWeight] || face.fontWeight;
       
 13926   const styleName = face.fontStyle === 'normal' ? '' : FONT_STYLES[face.fontStyle] || face.fontStyle;
       
 13927   return `${weightName} ${styleName}`;
       
 13928 }
       
 13929 function mergeFontFaces(existing = [], incoming = []) {
       
 13930   const map = new Map();
       
 13931   for (const face of existing) {
       
 13932     map.set(`${face.fontWeight}${face.fontStyle}`, face);
       
 13933   }
       
 13934   for (const face of incoming) {
       
 13935     // This will overwrite if the src already exists, keeping it unique.
       
 13936     map.set(`${face.fontWeight}${face.fontStyle}`, face);
       
 13937   }
       
 13938   return Array.from(map.values());
       
 13939 }
       
 13940 function mergeFontFamilies(existing = [], incoming = []) {
       
 13941   const map = new Map();
       
 13942   // Add the existing array to the map.
       
 13943   for (const font of existing) {
       
 13944     map.set(font.slug, {
       
 13945       ...font
       
 13946     });
       
 13947   }
       
 13948   // Add the incoming array to the map, overwriting existing values excepting fontFace that need to be merged.
       
 13949   for (const font of incoming) {
       
 13950     if (map.has(font.slug)) {
       
 13951       const {
       
 13952         fontFace: incomingFontFaces,
       
 13953         ...restIncoming
       
 13954       } = font;
       
 13955       const existingFont = map.get(font.slug);
       
 13956       // Merge the fontFaces existing with the incoming fontFaces.
       
 13957       const mergedFontFaces = mergeFontFaces(existingFont.fontFace, incomingFontFaces);
       
 13958       // Except for the fontFace key all the other keys are overwritten with the incoming values.
       
 13959       map.set(font.slug, {
       
 13960         ...restIncoming,
       
 13961         fontFace: mergedFontFaces
       
 13962       });
       
 13963     } else {
       
 13964       map.set(font.slug, {
       
 13965         ...font
       
 13966       });
       
 13967     }
       
 13968   }
       
 13969   return Array.from(map.values());
       
 13970 }
       
 13971 
       
 13972 /*
       
 13973  * Loads the font face from a URL and adds it to the browser.
       
 13974  * It also adds it to the iframe document.
       
 13975  */
       
 13976 async function loadFontFaceInBrowser(fontFace, source, addTo = 'all') {
       
 13977   let dataSource;
       
 13978   if (typeof source === 'string') {
       
 13979     dataSource = `url(${source})`;
       
 13980     // eslint-disable-next-line no-undef
       
 13981   } else if (source instanceof File) {
       
 13982     dataSource = await source.arrayBuffer();
       
 13983   } else {
       
 13984     return;
       
 13985   }
       
 13986   const newFont = new window.FontFace(formatFontFaceName(fontFace.fontFamily), dataSource, {
       
 13987     style: fontFace.fontStyle,
       
 13988     weight: fontFace.fontWeight
       
 13989   });
       
 13990   const loadedFace = await newFont.load();
       
 13991   if (addTo === 'document' || addTo === 'all') {
       
 13992     document.fonts.add(loadedFace);
       
 13993   }
       
 13994   if (addTo === 'iframe' || addTo === 'all') {
       
 13995     const iframeDocument = document.querySelector('iframe[name="editor-canvas"]').contentDocument;
       
 13996     iframeDocument.fonts.add(loadedFace);
       
 13997   }
       
 13998 }
       
 13999 
       
 14000 /*
       
 14001  * Unloads the font face and remove it from the browser.
       
 14002  * It also removes it from the iframe document.
       
 14003  *
       
 14004  * Note that Font faces that were added to the set using the CSS @font-face rule
       
 14005  * remain connected to the corresponding CSS, and cannot be deleted.
       
 14006  *
       
 14007  * @see https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/delete.
       
 14008  */
       
 14009 function unloadFontFaceInBrowser(fontFace, removeFrom = 'all') {
       
 14010   const unloadFontFace = fonts => {
       
 14011     fonts.forEach(f => {
       
 14012       if (f.family === formatFontFaceName(fontFace?.fontFamily) && f.weight === fontFace?.fontWeight && f.style === fontFace?.fontStyle) {
       
 14013         fonts.delete(f);
       
 14014       }
       
 14015     });
       
 14016   };
       
 14017   if (removeFrom === 'document' || removeFrom === 'all') {
       
 14018     unloadFontFace(document.fonts);
       
 14019   }
       
 14020   if (removeFrom === 'iframe' || removeFrom === 'all') {
       
 14021     const iframeDocument = document.querySelector('iframe[name="editor-canvas"]').contentDocument;
       
 14022     unloadFontFace(iframeDocument.fonts);
       
 14023   }
       
 14024 }
       
 14025 
       
 14026 /**
       
 14027  * Retrieves the display source from a font face src.
       
 14028  *
       
 14029  * @param {string|string[]} input - The font face src.
       
 14030  * @return {string|undefined} The display source or undefined if the input is invalid.
       
 14031  */
       
 14032 function getDisplaySrcFromFontFace(input) {
       
 14033   if (!input) {
       
 14034     return;
       
 14035   }
       
 14036   let src;
       
 14037   if (Array.isArray(input)) {
       
 14038     src = input[0];
       
 14039   } else {
       
 14040     src = input;
       
 14041   }
       
 14042   // It's expected theme fonts will already be loaded in the browser.
       
 14043   if (src.startsWith('file:.')) {
       
 14044     return;
       
 14045   }
       
 14046   if (!isUrlEncoded(src)) {
       
 14047     src = encodeURI(src);
       
 14048   }
       
 14049   return src;
       
 14050 }
       
 14051 function makeFontFamilyFormData(fontFamily) {
       
 14052   const formData = new FormData();
       
 14053   const {
       
 14054     fontFace,
       
 14055     category,
       
 14056     ...familyWithValidParameters
       
 14057   } = fontFamily;
       
 14058   const fontFamilySettings = {
       
 14059     ...familyWithValidParameters,
       
 14060     slug: kebabCase(fontFamily.slug)
       
 14061   };
       
 14062   formData.append('font_family_settings', JSON.stringify(fontFamilySettings));
       
 14063   return formData;
       
 14064 }
       
 14065 function makeFontFacesFormData(font) {
       
 14066   if (font?.fontFace) {
       
 14067     const fontFacesFormData = font.fontFace.map((item, faceIndex) => {
       
 14068       const face = {
       
 14069         ...item
       
 14070       };
       
 14071       const formData = new FormData();
       
 14072       if (face.file) {
       
 14073         // Normalize to an array, since face.file may be a single file or an array of files.
       
 14074         const files = Array.isArray(face.file) ? face.file : [face.file];
       
 14075         const src = [];
       
 14076         files.forEach((file, key) => {
       
 14077           // Slugified file name because the it might contain spaces or characters treated differently on the server.
       
 14078           const fileId = `file-${faceIndex}-${key}`;
       
 14079           // Add the files to the formData
       
 14080           formData.append(fileId, file, file.name);
       
 14081           src.push(fileId);
       
 14082         });
       
 14083         face.src = src.length === 1 ? src[0] : src;
       
 14084         delete face.file;
       
 14085         formData.append('font_face_settings', JSON.stringify(face));
       
 14086       } else {
       
 14087         formData.append('font_face_settings', JSON.stringify(face));
       
 14088       }
       
 14089       return formData;
       
 14090     });
       
 14091     return fontFacesFormData;
       
 14092   }
       
 14093 }
       
 14094 async function batchInstallFontFaces(fontFamilyId, fontFacesData) {
       
 14095   const responses = [];
       
 14096 
       
 14097   /*
       
 14098    * Uses the same response format as Promise.allSettled, but executes requests in sequence to work
       
 14099    * around a race condition that can cause an error when the fonts directory doesn't exist yet.
       
 14100    */
       
 14101   for (const faceData of fontFacesData) {
       
 14102     try {
       
 14103       const response = await fetchInstallFontFace(fontFamilyId, faceData);
       
 14104       responses.push({
       
 14105         status: 'fulfilled',
       
 14106         value: response
       
 14107       });
       
 14108     } catch (error) {
       
 14109       responses.push({
       
 14110         status: 'rejected',
       
 14111         reason: error
       
 14112       });
       
 14113     }
       
 14114   }
       
 14115   const results = {
       
 14116     errors: [],
       
 14117     successes: []
       
 14118   };
       
 14119   responses.forEach((result, index) => {
       
 14120     if (result.status === 'fulfilled') {
       
 14121       const response = result.value;
       
 14122       if (response.id) {
       
 14123         results.successes.push(response);
       
 14124       } else {
       
 14125         results.errors.push({
       
 14126           data: fontFacesData[index],
       
 14127           message: `Error: ${response.message}`
       
 14128         });
       
 14129       }
       
 14130     } else {
       
 14131       // Handle network errors or other fetch-related errors
       
 14132       results.errors.push({
       
 14133         data: fontFacesData[index],
       
 14134         message: result.reason.message
       
 14135       });
       
 14136     }
       
 14137   });
       
 14138   return results;
       
 14139 }
       
 14140 
       
 14141 /*
       
 14142  * Downloads a font face asset from a URL to the client and returns a File object.
       
 14143  */
       
 14144 async function downloadFontFaceAssets(src) {
       
 14145   // Normalize to an array, since `src` could be a string or array.
       
 14146   src = Array.isArray(src) ? src : [src];
       
 14147   const files = await Promise.all(src.map(async url => {
       
 14148     return fetch(new Request(url)).then(response => {
       
 14149       if (!response.ok) {
       
 14150         throw new Error(`Error downloading font face asset from ${url}. Server responded with status: ${response.status}`);
       
 14151       }
       
 14152       return response.blob();
       
 14153     }).then(blob => {
       
 14154       const filename = url.split('/').pop();
       
 14155       const file = new File([blob], filename, {
       
 14156         type: blob.type
       
 14157       });
       
 14158       return file;
       
 14159     });
       
 14160   }));
       
 14161 
       
 14162   // If we only have one file return it (not the array).  Otherwise return all of them in the array.
       
 14163   return files.length === 1 ? files[0] : files;
       
 14164 }
       
 14165 
       
 14166 /*
       
 14167  * Determine if a given Font Face is present in a given collection.
       
 14168  * We determine that a font face has been installed by comparing the fontWeight and fontStyle
       
 14169  *
       
 14170  * @param {Object} fontFace The Font Face to seek
       
 14171  * @param {Array} collection The Collection to seek in
       
 14172  * @returns True if the font face is found in the collection.  Otherwise False.
       
 14173  */
       
 14174 function checkFontFaceInstalled(fontFace, collection) {
       
 14175   return -1 !== collection.findIndex(collectionFontFace => {
       
 14176     return collectionFontFace.fontWeight === fontFace.fontWeight && collectionFontFace.fontStyle === fontFace.fontStyle;
       
 14177   });
       
 14178 }
       
 14179 
       
 14180 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/toggleFont.js
       
 14181 /**
       
 14182  * Toggles the activation of a given font or font variant within a list of custom fonts.
       
 14183  *
       
 14184  * - If only the font is provided (without face), the entire font family's activation is toggled.
       
 14185  * - If both font and face are provided, the activation of the specific font variant is toggled.
       
 14186  *
       
 14187  * @param {Object} font            - The font to be toggled.
       
 14188  * @param {string} font.slug       - The unique identifier for the font.
       
 14189  * @param {Array}  [font.fontFace] - The list of font variants (faces) associated with the font.
       
 14190  *
       
 14191  * @param {Object} [face]          - The specific font variant to be toggled.
       
 14192  * @param {string} face.fontWeight - The weight of the font variant.
       
 14193  * @param {string} face.fontStyle  - The style of the font variant.
       
 14194  *
       
 14195  * @param {Array}  initialfonts    - The initial list of custom fonts.
       
 14196  *
       
 14197  * @return {Array} - The updated list of custom fonts with the font/font variant toggled.
       
 14198  *
       
 14199  * @example
       
 14200  * const customFonts = [
       
 14201  *     { slug: 'roboto', fontFace: [{ fontWeight: '400', fontStyle: 'normal' }] }
       
 14202  * ];
       
 14203  *
       
 14204  * toggleFont({ slug: 'roboto' }, null, customFonts);
       
 14205  * // This will remove 'roboto' from customFonts
       
 14206  *
       
 14207  * toggleFont({ slug: 'roboto' }, { fontWeight: '400', fontStyle: 'normal' }, customFonts);
       
 14208  * // This will remove the specified face from 'roboto' in customFonts
       
 14209  *
       
 14210  * toggleFont({ slug: 'roboto' }, { fontWeight: '500', fontStyle: 'normal' }, customFonts);
       
 14211  * // This will add the specified face to 'roboto' in customFonts
       
 14212  */
       
 14213 function toggleFont(font, face, initialfonts) {
       
 14214   // Helper to check if a font is activated based on its slug
       
 14215   const isFontActivated = f => f.slug === font.slug;
       
 14216 
       
 14217   // Helper to get the activated font from a list of fonts
       
 14218   const getActivatedFont = fonts => fonts.find(isFontActivated);
       
 14219 
       
 14220   // Toggle the activation status of an entire font family
       
 14221   const toggleEntireFontFamily = activatedFont => {
       
 14222     if (!activatedFont) {
       
 14223       // If the font is not active, activate the entire font family
       
 14224       return [...initialfonts, font];
       
 14225     }
       
 14226     // If the font is already active, deactivate the entire font family
       
 14227     return initialfonts.filter(f => !isFontActivated(f));
       
 14228   };
       
 14229 
       
 14230   // Toggle the activation status of a specific font variant
       
 14231   const toggleFontVariant = activatedFont => {
       
 14232     const isFaceActivated = f => f.fontWeight === face.fontWeight && f.fontStyle === face.fontStyle;
       
 14233     if (!activatedFont) {
       
 14234       // If the font family is not active, activate the font family with the font variant
       
 14235       return [...initialfonts, {
       
 14236         ...font,
       
 14237         fontFace: [face]
       
 14238       }];
       
 14239     }
       
 14240     let newFontFaces = activatedFont.fontFace || [];
       
 14241     if (newFontFaces.find(isFaceActivated)) {
       
 14242       // If the font variant is active, deactivate it
       
 14243       newFontFaces = newFontFaces.filter(f => !isFaceActivated(f));
       
 14244     } else {
       
 14245       // If the font variant is not active, activate it
       
 14246       newFontFaces = [...newFontFaces, face];
       
 14247     }
       
 14248 
       
 14249     // If there are no more font faces, deactivate the font family
       
 14250     if (newFontFaces.length === 0) {
       
 14251       return initialfonts.filter(f => !isFontActivated(f));
       
 14252     }
       
 14253 
       
 14254     // Return updated fonts list with toggled font variant
       
 14255     return initialfonts.map(f => isFontActivated(f) ? {
       
 14256       ...f,
       
 14257       fontFace: newFontFaces
       
 14258     } : f);
       
 14259   };
       
 14260   const activatedFont = getActivatedFont(initialfonts);
       
 14261   if (!face) {
       
 14262     return toggleEntireFontFamily(activatedFont);
       
 14263   }
       
 14264   return toggleFontVariant(activatedFont);
       
 14265 }
       
 14266 
       
 14267 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/context.js
       
 14268 /**
       
 14269  * WordPress dependencies
       
 14270  */
       
 14271 
       
 14272 
       
 14273 
       
 14274 
       
 14275 
       
 14276 
       
 14277 /**
       
 14278  * Internal dependencies
       
 14279  */
       
 14280 
       
 14281 
       
 14282 const {
       
 14283   useGlobalSetting: context_useGlobalSetting
       
 14284 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 14285 
       
 14286 
       
 14287 
       
 14288 
       
 14289 const FontLibraryContext = (0,external_wp_element_namespaceObject.createContext)({});
       
 14290 function FontLibraryProvider({
       
 14291   children
       
 14292 }) {
       
 14293   const {
       
 14294     saveEntityRecord
       
 14295   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 14296   const {
       
 14297     globalStylesId
       
 14298   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 14299     const {
       
 14300       __experimentalGetCurrentGlobalStylesId
       
 14301     } = select(external_wp_coreData_namespaceObject.store);
       
 14302     return {
       
 14303       globalStylesId: __experimentalGetCurrentGlobalStylesId()
       
 14304     };
       
 14305   });
       
 14306   const globalStyles = (0,external_wp_coreData_namespaceObject.useEntityRecord)('root', 'globalStyles', globalStylesId);
       
 14307   const [isInstalling, setIsInstalling] = (0,external_wp_element_namespaceObject.useState)(false);
       
 14308   const [refreshKey, setRefreshKey] = (0,external_wp_element_namespaceObject.useState)(0);
       
 14309   const [notice, setNotice] = (0,external_wp_element_namespaceObject.useState)(null);
       
 14310   const refreshLibrary = () => {
       
 14311     setRefreshKey(Date.now());
       
 14312   };
       
 14313   const {
       
 14314     records: libraryPosts = [],
       
 14315     isResolving: isResolvingLibrary
       
 14316   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', 'wp_font_family', {
       
 14317     refreshKey,
       
 14318     _embed: true
       
 14319   });
       
 14320   const libraryFonts = (libraryPosts || []).map(fontFamilyPost => {
       
 14321     return {
       
 14322       id: fontFamilyPost.id,
       
 14323       ...fontFamilyPost.font_family_settings,
       
 14324       fontFace: fontFamilyPost?._embedded?.font_faces.map(face => face.font_face_settings) || []
       
 14325     };
       
 14326   }) || [];
       
 14327 
       
 14328   // Global Styles (settings) font families
       
 14329   const [fontFamilies, setFontFamilies] = context_useGlobalSetting('typography.fontFamilies');
       
 14330 
       
 14331   /*
       
 14332    * Save the font families to the database.
       
 14333   	 * This function is called when the user activates or deactivates a font family.
       
 14334    * It only updates the global styles post content in the database for new font families.
       
 14335    * This avoids saving other styles/settings changed by the user using other parts of the editor.
       
 14336    *
       
 14337    * It uses the font families from the param to avoid using the font families from an outdated state.
       
 14338    *
       
 14339    * @param {Array} fonts - The font families that will be saved to the database.
       
 14340    */
       
 14341   const saveFontFamilies = async fonts => {
       
 14342     // Gets the global styles database post content.
       
 14343     const updatedGlobalStyles = globalStyles.record;
       
 14344 
       
 14345     // Updates the database version of global styles with the edited font families in the client.
       
 14346     setNestedValue(updatedGlobalStyles, ['settings', 'typography', 'fontFamilies'], fonts);
       
 14347 
       
 14348     // Saves a new version of the global styles in the database.
       
 14349     await saveEntityRecord('root', 'globalStyles', updatedGlobalStyles);
       
 14350   };
       
 14351 
       
 14352   // Library Fonts
       
 14353   const [modalTabOpen, setModalTabOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 14354   const [libraryFontSelected, setLibraryFontSelected] = (0,external_wp_element_namespaceObject.useState)(null);
       
 14355 
       
 14356   // Themes Fonts are the fonts defined in the global styles (database persisted theme.json data).
       
 14357   const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map(f => setUIValuesNeeded(f, {
       
 14358     source: 'theme'
       
 14359   })).sort((a, b) => a.name.localeCompare(b.name)) : [];
       
 14360   const customFonts = fontFamilies?.custom ? fontFamilies.custom.map(f => setUIValuesNeeded(f, {
       
 14361     source: 'custom'
       
 14362   })).sort((a, b) => a.name.localeCompare(b.name)) : [];
       
 14363   const baseCustomFonts = libraryFonts ? libraryFonts.map(f => setUIValuesNeeded(f, {
       
 14364     source: 'custom'
       
 14365   })).sort((a, b) => a.name.localeCompare(b.name)) : [];
       
 14366   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 14367     if (!modalTabOpen) {
       
 14368       setLibraryFontSelected(null);
       
 14369     }
       
 14370   }, [modalTabOpen]);
       
 14371   const handleSetLibraryFontSelected = font => {
       
 14372     setNotice(null);
       
 14373 
       
 14374     // If font is null, reset the selected font
       
 14375     if (!font) {
       
 14376       setLibraryFontSelected(null);
       
 14377       return;
       
 14378     }
       
 14379     const fonts = font.source === 'theme' ? themeFonts : baseCustomFonts;
       
 14380 
       
 14381     // Tries to find the font in the installed fonts
       
 14382     const fontSelected = fonts.find(f => f.slug === font.slug);
       
 14383     // If the font is not found (it is only defined in custom styles), use the font from custom styles
       
 14384     setLibraryFontSelected({
       
 14385       ...(fontSelected || font),
       
 14386       source: font.source
       
 14387     });
       
 14388   };
       
 14389 
       
 14390   // Demo
       
 14391   const [loadedFontUrls] = (0,external_wp_element_namespaceObject.useState)(new Set());
       
 14392   const getAvailableFontsOutline = availableFontFamilies => {
       
 14393     const outline = availableFontFamilies.reduce((acc, font) => {
       
 14394       const availableFontFaces = font?.fontFace && font.fontFace?.length > 0 ? font?.fontFace.map(face => `${face.fontStyle + face.fontWeight}`) : ['normal400']; // If the font doesn't have fontFace, we assume it is a system font and we add the defaults: normal 400
       
 14395 
       
 14396       acc[font.slug] = availableFontFaces;
       
 14397       return acc;
       
 14398     }, {});
       
 14399     return outline;
       
 14400   };
       
 14401   const getActivatedFontsOutline = source => {
       
 14402     switch (source) {
       
 14403       case 'theme':
       
 14404         return getAvailableFontsOutline(themeFonts);
       
 14405       case 'custom':
       
 14406       default:
       
 14407         return getAvailableFontsOutline(customFonts);
       
 14408     }
       
 14409   };
       
 14410   const isFontActivated = (slug, style, weight, source) => {
       
 14411     if (!style && !weight) {
       
 14412       return !!getActivatedFontsOutline(source)[slug];
       
 14413     }
       
 14414     return !!getActivatedFontsOutline(source)[slug]?.includes(style + weight);
       
 14415   };
       
 14416   const getFontFacesActivated = (slug, source) => {
       
 14417     return getActivatedFontsOutline(source)[slug] || [];
       
 14418   };
       
 14419   async function installFonts(fontFamiliesToInstall) {
       
 14420     setIsInstalling(true);
       
 14421     try {
       
 14422       const fontFamiliesToActivate = [];
       
 14423       let installationErrors = [];
       
 14424       for (const fontFamilyToInstall of fontFamiliesToInstall) {
       
 14425         let isANewFontFamily = false;
       
 14426 
       
 14427         // Get the font family if it already exists.
       
 14428         let installedFontFamily = await fetchGetFontFamilyBySlug(fontFamilyToInstall.slug);
       
 14429 
       
 14430         // Otherwise create it.
       
 14431         if (!installedFontFamily) {
       
 14432           isANewFontFamily = true;
       
 14433           // Prepare font family form data to install.
       
 14434           installedFontFamily = await fetchInstallFontFamily(makeFontFamilyFormData(fontFamilyToInstall));
       
 14435         }
       
 14436 
       
 14437         // Collect font faces that have already been installed (to be activated later)
       
 14438         const alreadyInstalledFontFaces = installedFontFamily.fontFace && fontFamilyToInstall.fontFace ? installedFontFamily.fontFace.filter(fontFaceToInstall => checkFontFaceInstalled(fontFaceToInstall, fontFamilyToInstall.fontFace)) : [];
       
 14439 
       
 14440         // Filter out Font Faces that have already been installed (so that they are not re-installed)
       
 14441         if (installedFontFamily.fontFace && fontFamilyToInstall.fontFace) {
       
 14442           fontFamilyToInstall.fontFace = fontFamilyToInstall.fontFace.filter(fontFaceToInstall => !checkFontFaceInstalled(fontFaceToInstall, installedFontFamily.fontFace));
       
 14443         }
       
 14444 
       
 14445         // Install the fonts (upload the font files to the server and create the post in the database).
       
 14446         let successfullyInstalledFontFaces = [];
       
 14447         let unsuccessfullyInstalledFontFaces = [];
       
 14448         if (fontFamilyToInstall?.fontFace?.length > 0) {
       
 14449           const response = await batchInstallFontFaces(installedFontFamily.id, makeFontFacesFormData(fontFamilyToInstall));
       
 14450           successfullyInstalledFontFaces = response?.successes;
       
 14451           unsuccessfullyInstalledFontFaces = response?.errors;
       
 14452         }
       
 14453 
       
 14454         // Use the successfully installed font faces
       
 14455         // As well as any font faces that were already installed (those will be activated)
       
 14456         if (successfullyInstalledFontFaces?.length > 0 || alreadyInstalledFontFaces?.length > 0) {
       
 14457           // Use font data from REST API not from client to ensure
       
 14458           // correct font information is used.
       
 14459           installedFontFamily.fontFace = [...successfullyInstalledFontFaces];
       
 14460           fontFamiliesToActivate.push(installedFontFamily);
       
 14461         }
       
 14462 
       
 14463         // If it's a system font but was installed successfully, activate it.
       
 14464         if (installedFontFamily && !fontFamilyToInstall?.fontFace?.length) {
       
 14465           fontFamiliesToActivate.push(installedFontFamily);
       
 14466         }
       
 14467 
       
 14468         // If the font family is new and is not a system font, delete it to avoid having font families without font faces.
       
 14469         if (isANewFontFamily && fontFamilyToInstall?.fontFace?.length > 0 && successfullyInstalledFontFaces?.length === 0) {
       
 14470           await fetchUninstallFontFamily(installedFontFamily.id);
       
 14471         }
       
 14472         installationErrors = installationErrors.concat(unsuccessfullyInstalledFontFaces);
       
 14473       }
       
 14474       installationErrors = installationErrors.reduce((unique, item) => unique.includes(item.message) ? unique : [...unique, item.message], []);
       
 14475       if (fontFamiliesToActivate.length > 0) {
       
 14476         // Activate the font family (add the font family to the global styles).
       
 14477         const activeFonts = activateCustomFontFamilies(fontFamiliesToActivate);
       
 14478         // Save the global styles to the database.
       
 14479         await saveFontFamilies(activeFonts);
       
 14480         refreshLibrary();
       
 14481       }
       
 14482       if (installationErrors.length > 0) {
       
 14483         const installError = new Error((0,external_wp_i18n_namespaceObject.__)('There was an error installing fonts.'));
       
 14484         installError.installationErrors = installationErrors;
       
 14485         throw installError;
       
 14486       }
       
 14487     } finally {
       
 14488       setIsInstalling(false);
       
 14489     }
       
 14490   }
       
 14491   async function uninstallFontFamily(fontFamilyToUninstall) {
       
 14492     try {
       
 14493       // Uninstall the font family.
       
 14494       // (Removes the font files from the server and the posts from the database).
       
 14495       const uninstalledFontFamily = await fetchUninstallFontFamily(fontFamilyToUninstall.id);
       
 14496 
       
 14497       // Deactivate the font family if delete request is successful
       
 14498       // (Removes the font family from the global styles).
       
 14499       if (uninstalledFontFamily.deleted) {
       
 14500         const activeFonts = deactivateFontFamily(fontFamilyToUninstall);
       
 14501         // Save the global styles to the database.
       
 14502         await saveFontFamilies(activeFonts);
       
 14503       }
       
 14504 
       
 14505       // Refresh the library (the library font families from database).
       
 14506       refreshLibrary();
       
 14507       return uninstalledFontFamily;
       
 14508     } catch (error) {
       
 14509       // eslint-disable-next-line no-console
       
 14510       console.error(`There was an error uninstalling the font family:`, error);
       
 14511       throw error;
       
 14512     }
       
 14513   }
       
 14514   const deactivateFontFamily = font => {
       
 14515     var _fontFamilies$font$so;
       
 14516     // If the user doesn't have custom fonts defined, include as custom fonts all the theme fonts
       
 14517     // We want to save as active all the theme fonts at the beginning
       
 14518     const initialCustomFonts = (_fontFamilies$font$so = fontFamilies?.[font.source]) !== null && _fontFamilies$font$so !== void 0 ? _fontFamilies$font$so : [];
       
 14519     const newCustomFonts = initialCustomFonts.filter(f => f.slug !== font.slug);
       
 14520     const activeFonts = {
       
 14521       ...fontFamilies,
       
 14522       [font.source]: newCustomFonts
       
 14523     };
       
 14524     setFontFamilies(activeFonts);
       
 14525     if (font.fontFace) {
       
 14526       font.fontFace.forEach(face => {
       
 14527         unloadFontFaceInBrowser(face, 'all');
       
 14528       });
       
 14529     }
       
 14530     return activeFonts;
       
 14531   };
       
 14532   const activateCustomFontFamilies = fontsToAdd => {
       
 14533     const fontsToActivate = cleanFontsForSave(fontsToAdd);
       
 14534     const activeFonts = {
       
 14535       ...fontFamilies,
       
 14536       // Merge the existing custom fonts with the new fonts.
       
 14537       custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate)
       
 14538     };
       
 14539 
       
 14540     // Activate the fonts by set the new custom fonts array.
       
 14541     setFontFamilies(activeFonts);
       
 14542     loadFontsInBrowser(fontsToActivate);
       
 14543     return activeFonts;
       
 14544   };
       
 14545 
       
 14546   // Removes the id from the families and faces to avoid saving that to global styles post content.
       
 14547   const cleanFontsForSave = fonts => {
       
 14548     return fonts.map(({
       
 14549       id: _familyDbId,
       
 14550       fontFace,
       
 14551       ...font
       
 14552     }) => ({
       
 14553       ...font,
       
 14554       ...(fontFace && fontFace.length > 0 ? {
       
 14555         fontFace: fontFace.map(({
       
 14556           id: _faceDbId,
       
 14557           ...face
       
 14558         }) => face)
       
 14559       } : {})
       
 14560     }));
       
 14561   };
       
 14562   const loadFontsInBrowser = fonts => {
       
 14563     // Add custom fonts to the browser.
       
 14564     fonts.forEach(font => {
       
 14565       if (font.fontFace) {
       
 14566         font.fontFace.forEach(face => {
       
 14567           // Load font faces just in the iframe because they already are in the document.
       
 14568           loadFontFaceInBrowser(face, getDisplaySrcFromFontFace(face.src), 'all');
       
 14569         });
       
 14570       }
       
 14571     });
       
 14572   };
       
 14573   const toggleActivateFont = (font, face) => {
       
 14574     var _fontFamilies$font$so2;
       
 14575     // If the user doesn't have custom fonts defined, include as custom fonts all the theme fonts
       
 14576     // We want to save as active all the theme fonts at the beginning
       
 14577     const initialFonts = (_fontFamilies$font$so2 = fontFamilies?.[font.source]) !== null && _fontFamilies$font$so2 !== void 0 ? _fontFamilies$font$so2 : [];
       
 14578     // Toggles the received font family or font face
       
 14579     const newFonts = toggleFont(font, face, initialFonts);
       
 14580     // Updates the font families activated in global settings:
       
 14581     setFontFamilies({
       
 14582       ...fontFamilies,
       
 14583       [font.source]: newFonts
       
 14584     });
       
 14585     const isFaceActivated = isFontActivated(font.slug, face?.fontStyle, face?.fontWeight, font.source);
       
 14586     if (isFaceActivated) {
       
 14587       loadFontFaceInBrowser(face, getDisplaySrcFromFontFace(face?.src), 'all');
       
 14588     } else {
       
 14589       unloadFontFaceInBrowser(face, 'all');
       
 14590     }
       
 14591   };
       
 14592   const loadFontFaceAsset = async fontFace => {
       
 14593     // If the font doesn't have a src, don't load it.
       
 14594     if (!fontFace.src) {
       
 14595       return;
       
 14596     }
       
 14597     // Get the src of the font.
       
 14598     const src = getDisplaySrcFromFontFace(fontFace.src);
       
 14599     // If the font is already loaded, don't load it again.
       
 14600     if (!src || loadedFontUrls.has(src)) {
       
 14601       return;
       
 14602     }
       
 14603     // Load the font in the browser.
       
 14604     loadFontFaceInBrowser(fontFace, src, 'document');
       
 14605     // Add the font to the loaded fonts list.
       
 14606     loadedFontUrls.add(src);
       
 14607   };
       
 14608 
       
 14609   // Font Collections
       
 14610   const [collections, setFontCollections] = (0,external_wp_element_namespaceObject.useState)([]);
       
 14611   const getFontCollections = async () => {
       
 14612     const response = await fetchFontCollections();
       
 14613     setFontCollections(response);
       
 14614   };
       
 14615   const getFontCollection = async slug => {
       
 14616     try {
       
 14617       const hasData = !!collections.find(collection => collection.slug === slug)?.font_families;
       
 14618       if (hasData) {
       
 14619         return;
       
 14620       }
       
 14621       const response = await fetchFontCollection(slug);
       
 14622       const updatedCollections = collections.map(collection => collection.slug === slug ? {
       
 14623         ...collection,
       
 14624         ...response
       
 14625       } : collection);
       
 14626       setFontCollections(updatedCollections);
       
 14627     } catch (e) {
       
 14628       // eslint-disable-next-line no-console
       
 14629       console.error(e);
       
 14630       throw e;
       
 14631     }
       
 14632   };
       
 14633   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 14634     getFontCollections();
       
 14635   }, []);
       
 14636   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FontLibraryContext.Provider, {
       
 14637     value: {
       
 14638       libraryFontSelected,
       
 14639       handleSetLibraryFontSelected,
       
 14640       fontFamilies,
       
 14641       baseCustomFonts,
       
 14642       isFontActivated,
       
 14643       getFontFacesActivated,
       
 14644       loadFontFaceAsset,
       
 14645       installFonts,
       
 14646       uninstallFontFamily,
       
 14647       toggleActivateFont,
       
 14648       getAvailableFontsOutline,
       
 14649       modalTabOpen,
       
 14650       setModalTabOpen,
       
 14651       refreshLibrary,
       
 14652       notice,
       
 14653       setNotice,
       
 14654       saveFontFamilies,
       
 14655       isResolvingLibrary,
       
 14656       isInstalling,
       
 14657       collections,
       
 14658       getFontCollection
       
 14659     },
       
 14660     children: children
       
 14661   });
       
 14662 }
       
 14663 /* harmony default export */ const context = (FontLibraryProvider);
       
 14664 
       
 14665 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/font-demo.js
       
 14666 /**
       
 14667  * WordPress dependencies
       
 14668  */
       
 14669 
       
 14670 
       
 14671 
       
 14672 /**
       
 14673  * Internal dependencies
       
 14674  */
       
 14675 
       
 14676 
       
 14677 
       
 14678 function getPreviewUrl(fontFace) {
       
 14679   if (fontFace.preview) {
       
 14680     return fontFace.preview;
       
 14681   }
       
 14682   if (fontFace.src) {
       
 14683     return Array.isArray(fontFace.src) ? fontFace.src[0] : fontFace.src;
       
 14684   }
       
 14685 }
       
 14686 function getDisplayFontFace(font) {
       
 14687   // if this IS a font face return it
       
 14688   if (font.fontStyle || font.fontWeight) {
       
 14689     return font;
       
 14690   }
       
 14691   // if this is a font family with a collection of font faces
       
 14692   // return the first one that is normal and 400 OR just the first one
       
 14693   if (font.fontFace && font.fontFace.length) {
       
 14694     return font.fontFace.find(face => face.fontStyle === 'normal' && face.fontWeight === '400') || font.fontFace[0];
       
 14695   }
       
 14696   // This must be a font family with no font faces
       
 14697   // return a fake font face
       
 14698   return {
       
 14699     fontStyle: 'normal',
       
 14700     fontWeight: '400',
       
 14701     fontFamily: font.fontFamily,
       
 14702     fake: true
       
 14703   };
       
 14704 }
       
 14705 function FontDemo({
       
 14706   font,
       
 14707   text
       
 14708 }) {
       
 14709   const ref = (0,external_wp_element_namespaceObject.useRef)(null);
       
 14710   const fontFace = getDisplayFontFace(font);
       
 14711   const style = getFamilyPreviewStyle(font);
       
 14712   text = text || font.name;
       
 14713   const customPreviewUrl = font.preview;
       
 14714   const [isIntersecting, setIsIntersecting] = (0,external_wp_element_namespaceObject.useState)(false);
       
 14715   const [isAssetLoaded, setIsAssetLoaded] = (0,external_wp_element_namespaceObject.useState)(false);
       
 14716   const {
       
 14717     loadFontFaceAsset
       
 14718   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 14719   const previewUrl = customPreviewUrl !== null && customPreviewUrl !== void 0 ? customPreviewUrl : getPreviewUrl(fontFace);
       
 14720   const isPreviewImage = previewUrl && previewUrl.match(/\.(png|jpg|jpeg|gif|svg)$/i);
       
 14721   const faceStyles = getFacePreviewStyle(fontFace);
       
 14722   const textDemoStyle = {
       
 14723     fontSize: '18px',
       
 14724     lineHeight: 1,
       
 14725     opacity: isAssetLoaded ? '1' : '0',
       
 14726     ...style,
       
 14727     ...faceStyles
       
 14728   };
       
 14729   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 14730     const observer = new window.IntersectionObserver(([entry]) => {
       
 14731       setIsIntersecting(entry.isIntersecting);
       
 14732     }, {});
       
 14733     observer.observe(ref.current);
       
 14734     return () => observer.disconnect();
       
 14735   }, [ref]);
       
 14736   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 14737     const loadAsset = async () => {
       
 14738       if (isIntersecting) {
       
 14739         if (!isPreviewImage && fontFace.src) {
       
 14740           await loadFontFaceAsset(fontFace);
       
 14741         }
       
 14742         setIsAssetLoaded(true);
       
 14743       }
       
 14744     };
       
 14745     loadAsset();
       
 14746   }, [fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage]);
       
 14747   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 14748     ref: ref,
       
 14749     children: isPreviewImage ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
       
 14750       src: previewUrl,
       
 14751       loading: "lazy",
       
 14752       alt: text,
       
 14753       className: "font-library-modal__font-variant_demo-image"
       
 14754     }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 14755       style: textDemoStyle,
       
 14756       className: "font-library-modal__font-variant_demo-text",
       
 14757       children: text
       
 14758     })
       
 14759   });
       
 14760 }
       
 14761 /* harmony default export */ const font_demo = (FontDemo);
       
 14762 
       
 14763 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/font-card.js
       
 14764 /**
       
 14765  * WordPress dependencies
       
 14766  */
       
 14767 
       
 14768 
       
 14769 
       
 14770 /**
       
 14771  * Internal dependencies
       
 14772  */
       
 14773 
       
 14774 
       
 14775 
       
 14776 
       
 14777 function FontCard({
       
 14778   font,
       
 14779   onClick,
       
 14780   variantsText,
       
 14781   navigatorPath
       
 14782 }) {
       
 14783   const variantsCount = font.fontFace?.length || 1;
       
 14784   const style = {
       
 14785     cursor: !!onClick ? 'pointer' : 'default'
       
 14786   };
       
 14787   const navigator = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 14788   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 14789     onClick: () => {
       
 14790       onClick();
       
 14791       if (navigatorPath) {
       
 14792         navigator.goTo(navigatorPath);
       
 14793       }
       
 14794     },
       
 14795     style: style,
       
 14796     className: "font-library-modal__font-card",
       
 14797     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 14798       justify: "space-between",
       
 14799       wrap: false,
       
 14800       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_demo, {
       
 14801         font: font
       
 14802       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 14803         justify: "flex-end",
       
 14804         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 14805           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 14806             className: "font-library-modal__font-card__count",
       
 14807             children: variantsText || (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: Number of font variants. */
       
 14808             (0,external_wp_i18n_namespaceObject._n)('%d variant', '%d variants', variantsCount), variantsCount)
       
 14809           })
       
 14810         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 14811           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 14812             icon: chevron_right
       
 14813           })
       
 14814         })]
       
 14815       })]
       
 14816     })
       
 14817   });
       
 14818 }
       
 14819 /* harmony default export */ const font_card = (FontCard);
       
 14820 
       
 14821 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/library-font-variant.js
       
 14822 /**
       
 14823  * WordPress dependencies
       
 14824  */
       
 14825 
       
 14826 
       
 14827 
       
 14828 /**
       
 14829  * Internal dependencies
       
 14830  */
       
 14831 
       
 14832 
       
 14833 
       
 14834 
       
 14835 
       
 14836 
       
 14837 const {
       
 14838   kebabCase: library_font_variant_kebabCase
       
 14839 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 14840 function LibraryFontVariant({
       
 14841   face,
       
 14842   font
       
 14843 }) {
       
 14844   const {
       
 14845     isFontActivated,
       
 14846     toggleActivateFont
       
 14847   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 14848   const isInstalled = font?.fontFace?.length > 0 ? isFontActivated(font.slug, face.fontStyle, face.fontWeight, font.source) : isFontActivated(font.slug, null, null, font.source);
       
 14849   const handleToggleActivation = () => {
       
 14850     if (font?.fontFace?.length > 0) {
       
 14851       toggleActivateFont(font, face);
       
 14852       return;
       
 14853     }
       
 14854     toggleActivateFont(font);
       
 14855   };
       
 14856   const displayName = font.name + ' ' + getFontFaceVariantName(face);
       
 14857   const checkboxId = library_font_variant_kebabCase(`${font.slug}-${getFontFaceVariantName(face)}`);
       
 14858   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 14859     className: "font-library-modal__font-card",
       
 14860     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 14861       justify: "flex-start",
       
 14862       align: "center",
       
 14863       gap: "1rem",
       
 14864       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
       
 14865         checked: isInstalled,
       
 14866         onChange: handleToggleActivation,
       
 14867         __nextHasNoMarginBottom: true,
       
 14868         id: checkboxId
       
 14869       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("label", {
       
 14870         htmlFor: checkboxId,
       
 14871         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_demo, {
       
 14872           font: face,
       
 14873           text: displayName,
       
 14874           onClick: handleToggleActivation
       
 14875         })
       
 14876       })]
       
 14877     })
       
 14878   });
       
 14879 }
       
 14880 /* harmony default export */ const library_font_variant = (LibraryFontVariant);
       
 14881 
       
 14882 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js
       
 14883 function getNumericFontWeight(value) {
       
 14884   switch (value) {
       
 14885     case 'normal':
       
 14886       return 400;
       
 14887     case 'bold':
       
 14888       return 700;
       
 14889     case 'bolder':
       
 14890       return 500;
       
 14891     case 'lighter':
       
 14892       return 300;
       
 14893     default:
       
 14894       return parseInt(value, 10);
       
 14895   }
       
 14896 }
       
 14897 function sortFontFaces(faces) {
       
 14898   return faces.sort((a, b) => {
       
 14899     // Ensure 'normal' fontStyle is always first
       
 14900     if (a.fontStyle === 'normal' && b.fontStyle !== 'normal') {
       
 14901       return -1;
       
 14902     }
       
 14903     if (b.fontStyle === 'normal' && a.fontStyle !== 'normal') {
       
 14904       return 1;
       
 14905     }
       
 14906 
       
 14907     // If both fontStyles are the same, sort by fontWeight
       
 14908     if (a.fontStyle === b.fontStyle) {
       
 14909       return getNumericFontWeight(a.fontWeight) - getNumericFontWeight(b.fontWeight);
       
 14910     }
       
 14911 
       
 14912     // Sort other fontStyles alphabetically
       
 14913     return a.fontStyle.localeCompare(b.fontStyle);
       
 14914   });
       
 14915 }
       
 14916 
       
 14917 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/installed-fonts.js
       
 14918 /**
       
 14919  * WordPress dependencies
       
 14920  */
       
 14921 
       
 14922 
       
 14923 
       
 14924 
       
 14925 
       
 14926 
       
 14927 
       
 14928 
       
 14929 /**
       
 14930  * Internal dependencies
       
 14931  */
       
 14932 
       
 14933 
       
 14934 
       
 14935 
       
 14936 
       
 14937 
       
 14938 
       
 14939 
       
 14940 
       
 14941 const {
       
 14942   useGlobalSetting: installed_fonts_useGlobalSetting
       
 14943 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 14944 function InstalledFonts() {
       
 14945   const {
       
 14946     baseCustomFonts,
       
 14947     libraryFontSelected,
       
 14948     handleSetLibraryFontSelected,
       
 14949     refreshLibrary,
       
 14950     uninstallFontFamily,
       
 14951     isResolvingLibrary,
       
 14952     isInstalling,
       
 14953     saveFontFamilies,
       
 14954     getFontFacesActivated,
       
 14955     notice,
       
 14956     setNotice,
       
 14957     fontFamilies
       
 14958   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 14959   const [isConfirmDeleteOpen, setIsConfirmDeleteOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 14960   const [baseFontFamilies] = installed_fonts_useGlobalSetting('typography.fontFamilies', undefined, 'base');
       
 14961   const globalStylesId = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 14962     const {
       
 14963       __experimentalGetCurrentGlobalStylesId
       
 14964     } = select(external_wp_coreData_namespaceObject.store);
       
 14965     return __experimentalGetCurrentGlobalStylesId();
       
 14966   });
       
 14967   const globalStyles = (0,external_wp_coreData_namespaceObject.useEntityRecord)('root', 'globalStyles', globalStylesId);
       
 14968   const fontFamiliesHasChanges = !!globalStyles?.edits?.settings?.typography?.fontFamilies;
       
 14969   const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map(f => setUIValuesNeeded(f, {
       
 14970     source: 'theme'
       
 14971   })).sort((a, b) => a.name.localeCompare(b.name)) : [];
       
 14972   const themeFontsSlugs = new Set(themeFonts.map(f => f.slug));
       
 14973   const baseThemeFonts = baseFontFamilies?.theme ? themeFonts.concat(baseFontFamilies.theme.filter(f => !themeFontsSlugs.has(f.slug)).map(f => setUIValuesNeeded(f, {
       
 14974     source: 'theme'
       
 14975   })).sort((a, b) => a.name.localeCompare(b.name))) : [];
       
 14976   const customFontFamilyId = libraryFontSelected?.source === 'custom' && libraryFontSelected?.id;
       
 14977   const canUserDelete = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 14978     const {
       
 14979       canUser
       
 14980     } = select(external_wp_coreData_namespaceObject.store);
       
 14981     return customFontFamilyId && canUser('delete', 'font-families', customFontFamilyId);
       
 14982   }, [customFontFamilyId]);
       
 14983   const shouldDisplayDeleteButton = !!libraryFontSelected && libraryFontSelected?.source !== 'theme' && canUserDelete;
       
 14984   const handleUninstallClick = () => {
       
 14985     setIsConfirmDeleteOpen(true);
       
 14986   };
       
 14987   const getFontFacesToDisplay = font => {
       
 14988     if (!font) {
       
 14989       return [];
       
 14990     }
       
 14991     if (!font.fontFace || !font.fontFace.length) {
       
 14992       return [{
       
 14993         fontFamily: font.fontFamily,
       
 14994         fontStyle: 'normal',
       
 14995         fontWeight: '400'
       
 14996       }];
       
 14997     }
       
 14998     return sortFontFaces(font.fontFace);
       
 14999   };
       
 15000   const getFontCardVariantsText = font => {
       
 15001     const variantsInstalled = font?.fontFace?.length > 0 ? font.fontFace.length : 1;
       
 15002     const variantsActive = getFontFacesActivated(font.slug, font.source).length;
       
 15003     return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Active font variants, 2: Total font variants. */
       
 15004     (0,external_wp_i18n_namespaceObject.__)('%1$s/%2$s variants active'), variantsActive, variantsInstalled);
       
 15005   };
       
 15006   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 15007     handleSetLibraryFontSelected(libraryFontSelected);
       
 15008     refreshLibrary();
       
 15009   }, []);
       
 15010   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 15011     className: "font-library-modal__tabpanel-layout",
       
 15012     children: [isResolvingLibrary && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 15013       className: "font-library-modal__loading",
       
 15014       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ProgressBar, {})
       
 15015     }), !isResolvingLibrary && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 15016       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalNavigatorProvider, {
       
 15017         initialPath: libraryFontSelected ? '/fontFamily' : '/',
       
 15018         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
       
 15019           path: "/",
       
 15020           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 15021             spacing: "8",
       
 15022             children: [notice && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
       
 15023               status: notice.type,
       
 15024               onRemove: () => setNotice(null),
       
 15025               children: notice.message
       
 15026             }), baseCustomFonts.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 15027               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
       
 15028                 className: "font-library-modal__fonts-title",
       
 15029                 children: (0,external_wp_i18n_namespaceObject.__)('Installed Fonts')
       
 15030               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
       
 15031                 role: "list",
       
 15032                 className: "font-library-modal__fonts-list",
       
 15033                 children: baseCustomFonts.map(font => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
       
 15034                   className: "font-library-modal__fonts-list-item",
       
 15035                   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_card, {
       
 15036                     font: font,
       
 15037                     navigatorPath: "/fontFamily",
       
 15038                     variantsText: getFontCardVariantsText(font),
       
 15039                     onClick: () => {
       
 15040                       handleSetLibraryFontSelected(font);
       
 15041                     }
       
 15042                   })
       
 15043                 }, font.slug))
       
 15044               })]
       
 15045             }), baseThemeFonts.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 15046               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
       
 15047                 className: "font-library-modal__fonts-title",
       
 15048                 children: (0,external_wp_i18n_namespaceObject.__)('Theme Fonts')
       
 15049               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
       
 15050                 role: "list",
       
 15051                 className: "font-library-modal__fonts-list",
       
 15052                 children: baseThemeFonts.map(font => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
       
 15053                   className: "font-library-modal__fonts-list-item",
       
 15054                   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_card, {
       
 15055                     font: font,
       
 15056                     navigatorPath: "/fontFamily",
       
 15057                     variantsText: getFontCardVariantsText(font),
       
 15058                     onClick: () => {
       
 15059                       handleSetLibraryFontSelected(font);
       
 15060                     }
       
 15061                   })
       
 15062                 }, font.slug))
       
 15063               })]
       
 15064             })]
       
 15065           })
       
 15066         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
       
 15067           path: "/fontFamily",
       
 15068           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ConfirmDeleteDialog, {
       
 15069             font: libraryFontSelected,
       
 15070             isOpen: isConfirmDeleteOpen,
       
 15071             setIsOpen: setIsConfirmDeleteOpen,
       
 15072             setNotice: setNotice,
       
 15073             uninstallFontFamily: uninstallFontFamily,
       
 15074             handleSetLibraryFontSelected: handleSetLibraryFontSelected
       
 15075           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 15076             justify: "flex-start",
       
 15077             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNavigatorToParentButton, {
       
 15078               icon: chevron_left,
       
 15079               size: "small",
       
 15080               onClick: () => {
       
 15081                 handleSetLibraryFontSelected(null);
       
 15082               },
       
 15083               label: (0,external_wp_i18n_namespaceObject.__)('Back')
       
 15084             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 15085               level: 2,
       
 15086               size: 13,
       
 15087               className: "edit-site-global-styles-header",
       
 15088               children: libraryFontSelected?.name
       
 15089             })]
       
 15090           }), notice && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 15091             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15092               margin: 1
       
 15093             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
       
 15094               status: notice.type,
       
 15095               onRemove: () => setNotice(null),
       
 15096               children: notice.message
       
 15097             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15098               margin: 1
       
 15099             })]
       
 15100           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15101             margin: 4
       
 15102           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 15103             children: (0,external_wp_i18n_namespaceObject.__)('Choose font variants. Keep in mind that too many variants could make your site slower.')
       
 15104           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15105             margin: 4
       
 15106           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 15107             spacing: 0,
       
 15108             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15109               margin: 8
       
 15110             }), getFontFacesToDisplay(libraryFontSelected).map((face, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(library_font_variant, {
       
 15111               font: libraryFontSelected,
       
 15112               face: face
       
 15113             }, `face${i}`))]
       
 15114           })]
       
 15115         })]
       
 15116       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 15117         justify: "flex-end",
       
 15118         className: "font-library-modal__tabpanel-layout__footer",
       
 15119         children: [isInstalling && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ProgressBar, {}), shouldDisplayDeleteButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15120           isDestructive: true,
       
 15121           variant: "tertiary",
       
 15122           onClick: handleUninstallClick,
       
 15123           children: (0,external_wp_i18n_namespaceObject.__)('Delete')
       
 15124         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15125           variant: "primary",
       
 15126           onClick: () => {
       
 15127             saveFontFamilies(fontFamilies);
       
 15128           },
       
 15129           disabled: !fontFamiliesHasChanges,
       
 15130           __experimentalIsFocusable: true,
       
 15131           children: (0,external_wp_i18n_namespaceObject.__)('Update')
       
 15132         })]
       
 15133       })]
       
 15134     })]
       
 15135   });
       
 15136 }
       
 15137 function ConfirmDeleteDialog({
       
 15138   font,
       
 15139   isOpen,
       
 15140   setIsOpen,
       
 15141   setNotice,
       
 15142   uninstallFontFamily,
       
 15143   handleSetLibraryFontSelected
       
 15144 }) {
       
 15145   const navigator = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 15146   const handleConfirmUninstall = async () => {
       
 15147     setNotice(null);
       
 15148     setIsOpen(false);
       
 15149     try {
       
 15150       await uninstallFontFamily(font);
       
 15151       navigator.goBack();
       
 15152       handleSetLibraryFontSelected(null);
       
 15153       setNotice({
       
 15154         type: 'success',
       
 15155         message: (0,external_wp_i18n_namespaceObject.__)('Font family uninstalled successfully.')
       
 15156       });
       
 15157     } catch (error) {
       
 15158       setNotice({
       
 15159         type: 'error',
       
 15160         message: (0,external_wp_i18n_namespaceObject.__)('There was an error uninstalling the font family. ') + error.message
       
 15161       });
       
 15162     }
       
 15163   };
       
 15164   const handleCancelUninstall = () => {
       
 15165     setIsOpen(false);
       
 15166   };
       
 15167   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
       
 15168     isOpen: isOpen,
       
 15169     cancelButtonText: (0,external_wp_i18n_namespaceObject.__)('Cancel'),
       
 15170     confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Delete'),
       
 15171     onCancel: handleCancelUninstall,
       
 15172     onConfirm: handleConfirmUninstall,
       
 15173     size: "medium",
       
 15174     children: font && (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Name of the font. */
       
 15175     (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete "%s" font and all its variants and assets?'), font.name)
       
 15176   });
       
 15177 }
       
 15178 /* harmony default export */ const installed_fonts = (InstalledFonts);
       
 15179 
       
 15180 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js
       
 15181 /**
       
 15182  * Filters a list of fonts based on the specified filters.
       
 15183  *
       
 15184  * This function filters a given array of fonts based on the criteria provided in the filters object.
       
 15185  * It supports filtering by category and a search term. If the category is provided and not equal to 'all',
       
 15186  * the function filters the fonts array to include only those fonts that belong to the specified category.
       
 15187  * Additionally, if a search term is provided, it filters the fonts array to include only those fonts
       
 15188  * whose name includes the search term, case-insensitively.
       
 15189  *
       
 15190  * @param {Array}  fonts   Array of font objects in font-collection schema fashion to be filtered. Each font object should have a 'categories' property and a 'font_family_settings' property with a 'name' key.
       
 15191  * @param {Object} filters Object containing the filter criteria. It should have a 'category' key and/or a 'search' key.
       
 15192  *                         The 'category' key is a string representing the category to filter by.
       
 15193  *                         The 'search' key is a string representing the search term to filter by.
       
 15194  * @return {Array} Array of filtered font objects based on the provided criteria.
       
 15195  */
       
 15196 function filterFonts(fonts, filters) {
       
 15197   const {
       
 15198     category,
       
 15199     search
       
 15200   } = filters;
       
 15201   let filteredFonts = fonts || [];
       
 15202   if (category && category !== 'all') {
       
 15203     filteredFonts = filteredFonts.filter(font => font.categories.indexOf(category) !== -1);
       
 15204   }
       
 15205   if (search) {
       
 15206     filteredFonts = filteredFonts.filter(font => font.font_family_settings.name.toLowerCase().includes(search.toLowerCase()));
       
 15207   }
       
 15208   return filteredFonts;
       
 15209 }
       
 15210 
       
 15211 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js
       
 15212 function getFontsOutline(fonts) {
       
 15213   return fonts.reduce((acc, font) => ({
       
 15214     ...acc,
       
 15215     [font.slug]: (font?.fontFace || []).reduce((faces, face) => ({
       
 15216       ...faces,
       
 15217       [`${face.fontStyle}-${face.fontWeight}`]: true
       
 15218     }), {})
       
 15219   }), {});
       
 15220 }
       
 15221 function isFontFontFaceInOutline(slug, face, outline) {
       
 15222   if (!face) {
       
 15223     return !!outline[slug];
       
 15224   }
       
 15225   return !!outline[slug]?.[`${face.fontStyle}-${face.fontWeight}`];
       
 15226 }
       
 15227 
       
 15228 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js
       
 15229 /**
       
 15230  * WordPress dependencies
       
 15231  */
       
 15232 
       
 15233 
       
 15234 
       
 15235 
       
 15236 function GoogleFontsConfirmDialog() {
       
 15237   const handleConfirm = () => {
       
 15238     // eslint-disable-next-line no-undef
       
 15239     window.localStorage.setItem('wp-font-library-google-fonts-permission', 'true');
       
 15240     window.dispatchEvent(new Event('storage'));
       
 15241   };
       
 15242   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 15243     className: "font-library__google-fonts-confirm",
       
 15244     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Card, {
       
 15245       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.CardBody, {
       
 15246         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 15247           level: 2,
       
 15248           children: (0,external_wp_i18n_namespaceObject.__)('Connect to Google Fonts')
       
 15249         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15250           margin: 6
       
 15251         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 15252           as: "p",
       
 15253           children: (0,external_wp_i18n_namespaceObject.__)('To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.')
       
 15254         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15255           margin: 3
       
 15256         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 15257           as: "p",
       
 15258           children: (0,external_wp_i18n_namespaceObject.__)('You can alternatively upload files directly on the Upload tab.')
       
 15259         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15260           margin: 6
       
 15261         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15262           __next40pxDefaultSize: true,
       
 15263           variant: "primary",
       
 15264           onClick: handleConfirm,
       
 15265           children: (0,external_wp_i18n_namespaceObject.__)('Allow access to Google Fonts')
       
 15266         })]
       
 15267       })
       
 15268     })
       
 15269   });
       
 15270 }
       
 15271 /* harmony default export */ const google_fonts_confirm_dialog = (GoogleFontsConfirmDialog);
       
 15272 
       
 15273 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/collection-font-variant.js
       
 15274 /**
       
 15275  * WordPress dependencies
       
 15276  */
       
 15277 
       
 15278 
       
 15279 /**
       
 15280  * Internal dependencies
       
 15281  */
       
 15282 
       
 15283 
       
 15284 
       
 15285 
       
 15286 
       
 15287 const {
       
 15288   kebabCase: collection_font_variant_kebabCase
       
 15289 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 15290 function CollectionFontVariant({
       
 15291   face,
       
 15292   font,
       
 15293   handleToggleVariant,
       
 15294   selected
       
 15295 }) {
       
 15296   const handleToggleActivation = () => {
       
 15297     if (font?.fontFace) {
       
 15298       handleToggleVariant(font, face);
       
 15299       return;
       
 15300     }
       
 15301     handleToggleVariant(font);
       
 15302   };
       
 15303   const displayName = font.name + ' ' + getFontFaceVariantName(face);
       
 15304   const checkboxId = collection_font_variant_kebabCase(`${font.slug}-${getFontFaceVariantName(face)}`);
       
 15305   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 15306     className: "font-library-modal__font-card",
       
 15307     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 15308       justify: "flex-start",
       
 15309       align: "center",
       
 15310       gap: "1rem",
       
 15311       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
       
 15312         checked: selected,
       
 15313         onChange: handleToggleActivation,
       
 15314         __nextHasNoMarginBottom: true,
       
 15315         id: checkboxId
       
 15316       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("label", {
       
 15317         htmlFor: checkboxId,
       
 15318         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_demo, {
       
 15319           font: face,
       
 15320           text: displayName,
       
 15321           onClick: handleToggleActivation
       
 15322         })
       
 15323       })]
       
 15324     })
       
 15325   });
       
 15326 }
       
 15327 /* harmony default export */ const collection_font_variant = (CollectionFontVariant);
       
 15328 
       
 15329 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/font-collection.js
       
 15330 /**
       
 15331  * WordPress dependencies
       
 15332  */
       
 15333 
       
 15334 
       
 15335 
       
 15336 
       
 15337 
       
 15338 
       
 15339 /**
       
 15340  * Internal dependencies
       
 15341  */
       
 15342 
       
 15343 
       
 15344 
       
 15345 
       
 15346 
       
 15347 
       
 15348 
       
 15349 
       
 15350 
       
 15351 
       
 15352 
       
 15353 
       
 15354 const DEFAULT_CATEGORY = {
       
 15355   slug: 'all',
       
 15356   name: (0,external_wp_i18n_namespaceObject._x)('All', 'font categories')
       
 15357 };
       
 15358 const LOCAL_STORAGE_ITEM = 'wp-font-library-google-fonts-permission';
       
 15359 const MIN_WINDOW_HEIGHT = 500;
       
 15360 function FontCollection({
       
 15361   slug
       
 15362 }) {
       
 15363   var _selectedCollection$c;
       
 15364   const requiresPermission = slug === 'google-fonts';
       
 15365   const getGoogleFontsPermissionFromStorage = () => {
       
 15366     return window.localStorage.getItem(LOCAL_STORAGE_ITEM) === 'true';
       
 15367   };
       
 15368   const [selectedFont, setSelectedFont] = (0,external_wp_element_namespaceObject.useState)(null);
       
 15369   const [fontsToInstall, setFontsToInstall] = (0,external_wp_element_namespaceObject.useState)([]);
       
 15370   const [page, setPage] = (0,external_wp_element_namespaceObject.useState)(1);
       
 15371   const [filters, setFilters] = (0,external_wp_element_namespaceObject.useState)({});
       
 15372   const [renderConfirmDialog, setRenderConfirmDialog] = (0,external_wp_element_namespaceObject.useState)(requiresPermission && !getGoogleFontsPermissionFromStorage());
       
 15373   const {
       
 15374     collections,
       
 15375     getFontCollection,
       
 15376     installFonts,
       
 15377     isInstalling,
       
 15378     notice,
       
 15379     setNotice
       
 15380   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 15381   const selectedCollection = collections.find(collection => collection.slug === slug);
       
 15382   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 15383     const handleStorage = () => {
       
 15384       setRenderConfirmDialog(requiresPermission && !getGoogleFontsPermissionFromStorage());
       
 15385     };
       
 15386     handleStorage();
       
 15387     window.addEventListener('storage', handleStorage);
       
 15388     return () => window.removeEventListener('storage', handleStorage);
       
 15389   }, [slug, requiresPermission]);
       
 15390   const revokeAccess = () => {
       
 15391     window.localStorage.setItem(LOCAL_STORAGE_ITEM, 'false');
       
 15392     window.dispatchEvent(new Event('storage'));
       
 15393   };
       
 15394   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 15395     const fetchFontCollection = async () => {
       
 15396       try {
       
 15397         await getFontCollection(slug);
       
 15398         resetFilters();
       
 15399       } catch (e) {
       
 15400         if (!notice) {
       
 15401           setNotice({
       
 15402             type: 'error',
       
 15403             message: e?.message
       
 15404           });
       
 15405         }
       
 15406       }
       
 15407     };
       
 15408     fetchFontCollection();
       
 15409   }, [slug, getFontCollection, setNotice, notice]);
       
 15410   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 15411     setSelectedFont(null);
       
 15412     setNotice(null);
       
 15413   }, [slug, setNotice]);
       
 15414   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 15415     // If the selected fonts change, reset the selected fonts to install
       
 15416     setFontsToInstall([]);
       
 15417   }, [selectedFont]);
       
 15418   const collectionFonts = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 15419     var _selectedCollection$f;
       
 15420     return (_selectedCollection$f = selectedCollection?.font_families) !== null && _selectedCollection$f !== void 0 ? _selectedCollection$f : [];
       
 15421   }, [selectedCollection]);
       
 15422   const collectionCategories = (_selectedCollection$c = selectedCollection?.categories) !== null && _selectedCollection$c !== void 0 ? _selectedCollection$c : [];
       
 15423   const categories = [DEFAULT_CATEGORY, ...collectionCategories];
       
 15424   const fonts = (0,external_wp_element_namespaceObject.useMemo)(() => filterFonts(collectionFonts, filters), [collectionFonts, filters]);
       
 15425   const isLoading = !selectedCollection?.font_families && !notice;
       
 15426 
       
 15427   // NOTE: The height of the font library modal unavailable to use for rendering font family items is roughly 417px
       
 15428   // The height of each font family item is 61px.
       
 15429   const windowHeight = Math.max(window.innerHeight, MIN_WINDOW_HEIGHT);
       
 15430   const pageSize = Math.floor((windowHeight - 417) / 61);
       
 15431   const totalPages = Math.ceil(fonts.length / pageSize);
       
 15432   const itemsStart = (page - 1) * pageSize;
       
 15433   const itemsLimit = page * pageSize;
       
 15434   const items = fonts.slice(itemsStart, itemsLimit);
       
 15435   const handleCategoryFilter = category => {
       
 15436     setFilters({
       
 15437       ...filters,
       
 15438       category
       
 15439     });
       
 15440     setPage(1);
       
 15441   };
       
 15442   const handleUpdateSearchInput = value => {
       
 15443     setFilters({
       
 15444       ...filters,
       
 15445       search: value
       
 15446     });
       
 15447     setPage(1);
       
 15448   };
       
 15449   const debouncedUpdateSearchInput = (0,external_wp_compose_namespaceObject.debounce)(handleUpdateSearchInput, 300);
       
 15450   const resetFilters = () => {
       
 15451     setFilters({});
       
 15452     setPage(1);
       
 15453   };
       
 15454   const handleToggleVariant = (font, face) => {
       
 15455     const newFontsToInstall = toggleFont(font, face, fontsToInstall);
       
 15456     setFontsToInstall(newFontsToInstall);
       
 15457   };
       
 15458   const fontToInstallOutline = getFontsOutline(fontsToInstall);
       
 15459   const resetFontsToInstall = () => {
       
 15460     setFontsToInstall([]);
       
 15461   };
       
 15462   const handleInstall = async () => {
       
 15463     setNotice(null);
       
 15464     const fontFamily = fontsToInstall[0];
       
 15465     try {
       
 15466       if (fontFamily?.fontFace) {
       
 15467         await Promise.all(fontFamily.fontFace.map(async fontFace => {
       
 15468           if (fontFace.src) {
       
 15469             fontFace.file = await downloadFontFaceAssets(fontFace.src);
       
 15470           }
       
 15471         }));
       
 15472       }
       
 15473     } catch (error) {
       
 15474       // If any of the fonts fail to download,
       
 15475       // show an error notice and stop the request from being sent.
       
 15476       setNotice({
       
 15477         type: 'error',
       
 15478         message: (0,external_wp_i18n_namespaceObject.__)('Error installing the fonts, could not be downloaded.')
       
 15479       });
       
 15480       return;
       
 15481     }
       
 15482     try {
       
 15483       await installFonts([fontFamily]);
       
 15484       setNotice({
       
 15485         type: 'success',
       
 15486         message: (0,external_wp_i18n_namespaceObject.__)('Fonts were installed successfully.')
       
 15487       });
       
 15488     } catch (error) {
       
 15489       setNotice({
       
 15490         type: 'error',
       
 15491         message: error.message
       
 15492       });
       
 15493     }
       
 15494     resetFontsToInstall();
       
 15495   };
       
 15496   const getSortedFontFaces = fontFamily => {
       
 15497     if (!fontFamily) {
       
 15498       return [];
       
 15499     }
       
 15500     if (!fontFamily.fontFace || !fontFamily.fontFace.length) {
       
 15501       return [{
       
 15502         fontFamily: fontFamily.fontFamily,
       
 15503         fontStyle: 'normal',
       
 15504         fontWeight: '400'
       
 15505       }];
       
 15506     }
       
 15507     return sortFontFaces(fontFamily.fontFace);
       
 15508   };
       
 15509   if (renderConfirmDialog) {
       
 15510     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(google_fonts_confirm_dialog, {});
       
 15511   }
       
 15512   const ActionsComponent = () => {
       
 15513     if (slug !== 'google-fonts' || renderConfirmDialog || selectedFont) {
       
 15514       return null;
       
 15515     }
       
 15516     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
       
 15517       icon: more_vertical,
       
 15518       label: (0,external_wp_i18n_namespaceObject.__)('Actions'),
       
 15519       popoverProps: {
       
 15520         position: 'bottom left'
       
 15521       },
       
 15522       controls: [{
       
 15523         title: (0,external_wp_i18n_namespaceObject.__)('Revoke access to Google Fonts'),
       
 15524         onClick: revokeAccess
       
 15525       }]
       
 15526     });
       
 15527   };
       
 15528   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 15529     className: "font-library-modal__tabpanel-layout",
       
 15530     children: [isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 15531       className: "font-library-modal__loading",
       
 15532       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ProgressBar, {})
       
 15533     }), !isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 15534       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalNavigatorProvider, {
       
 15535         initialPath: "/",
       
 15536         className: "font-library-modal__tabpanel-layout",
       
 15537         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
       
 15538           path: "/",
       
 15539           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 15540             justify: "space-between",
       
 15541             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 15542               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 15543                 level: 2,
       
 15544                 size: 13,
       
 15545                 children: selectedCollection.name
       
 15546               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 15547                 children: selectedCollection.description
       
 15548               })]
       
 15549             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionsComponent, {})]
       
 15550           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15551             margin: 4
       
 15552           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 15553             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 15554               children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SearchControl, {
       
 15555                 className: "font-library-modal__search",
       
 15556                 value: filters.search,
       
 15557                 placeholder: (0,external_wp_i18n_namespaceObject.__)('Font name…'),
       
 15558                 label: (0,external_wp_i18n_namespaceObject.__)('Search'),
       
 15559                 onChange: debouncedUpdateSearchInput,
       
 15560                 __nextHasNoMarginBottom: true,
       
 15561                 hideLabelFromVision: false
       
 15562               })
       
 15563             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 15564               children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
       
 15565                 label: (0,external_wp_i18n_namespaceObject.__)('Category'),
       
 15566                 value: filters.category,
       
 15567                 onChange: handleCategoryFilter,
       
 15568                 children: categories && categories.map(category => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("option", {
       
 15569                   value: category.slug,
       
 15570                   children: category.name
       
 15571                 }, category.slug))
       
 15572               })
       
 15573             })]
       
 15574           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15575             margin: 4
       
 15576           }), !!selectedCollection?.font_families?.length && !fonts.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 15577             children: (0,external_wp_i18n_namespaceObject.__)('No fonts found. Try with a different search term')
       
 15578           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 15579             className: "font-library-modal__fonts-grid__main",
       
 15580             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
       
 15581               role: "list",
       
 15582               className: "font-library-modal__fonts-list",
       
 15583               children: items.map(font => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
       
 15584                 className: "font-library-modal__fonts-list-item",
       
 15585                 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_card, {
       
 15586                   font: font.font_family_settings,
       
 15587                   navigatorPath: "/fontFamily",
       
 15588                   onClick: () => {
       
 15589                     setSelectedFont(font.font_family_settings);
       
 15590                   }
       
 15591                 })
       
 15592               }, font.font_family_settings.slug))
       
 15593             }), ' ']
       
 15594           })]
       
 15595         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
       
 15596           path: "/fontFamily",
       
 15597           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 15598             justify: "flex-start",
       
 15599             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNavigatorToParentButton, {
       
 15600               icon: chevron_left,
       
 15601               size: "small",
       
 15602               onClick: () => {
       
 15603                 setSelectedFont(null);
       
 15604                 setNotice(null);
       
 15605               },
       
 15606               label: (0,external_wp_i18n_namespaceObject.__)('Back')
       
 15607             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 15608               level: 2,
       
 15609               size: 13,
       
 15610               className: "edit-site-global-styles-header",
       
 15611               children: selectedFont?.name
       
 15612             })]
       
 15613           }), notice && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 15614             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15615               margin: 1
       
 15616             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
       
 15617               status: notice.type,
       
 15618               onRemove: () => setNotice(null),
       
 15619               children: notice.message
       
 15620             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15621               margin: 1
       
 15622             })]
       
 15623           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15624             margin: 4
       
 15625           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 15626             children: (0,external_wp_i18n_namespaceObject.__)('Select font variants to install.')
       
 15627           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15628             margin: 4
       
 15629           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 15630             spacing: 0,
       
 15631             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15632               margin: 8
       
 15633             }), getSortedFontFaces(selectedFont).map((face, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(collection_font_variant, {
       
 15634               font: selectedFont,
       
 15635               face: face,
       
 15636               handleToggleVariant: handleToggleVariant,
       
 15637               selected: isFontFontFaceInOutline(selectedFont.slug, selectedFont.fontFace ? face : null,
       
 15638               // If the font has no fontFace, we want to check if the font is in the outline
       
 15639               fontToInstallOutline)
       
 15640             }, `face${i}`))]
       
 15641           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 15642             margin: 16
       
 15643           })]
       
 15644         })]
       
 15645       }), selectedFont && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
       
 15646         justify: "flex-end",
       
 15647         className: "font-library-modal__tabpanel-layout__footer",
       
 15648         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15649           variant: "primary",
       
 15650           onClick: handleInstall,
       
 15651           isBusy: isInstalling,
       
 15652           disabled: fontsToInstall.length === 0 || isInstalling,
       
 15653           __experimentalIsFocusable: true,
       
 15654           children: (0,external_wp_i18n_namespaceObject.__)('Install')
       
 15655         })
       
 15656       }), !selectedFont && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 15657         justify: "center",
       
 15658         className: "font-library-modal__tabpanel-layout__footer",
       
 15659         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15660           label: (0,external_wp_i18n_namespaceObject.__)('First page'),
       
 15661           size: "compact",
       
 15662           onClick: () => setPage(1),
       
 15663           disabled: page === 1,
       
 15664           __experimentalIsFocusable: true,
       
 15665           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 15666             children: "\xAB"
       
 15667           })
       
 15668         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15669           label: (0,external_wp_i18n_namespaceObject.__)('Previous page'),
       
 15670           size: "compact",
       
 15671           onClick: () => setPage(page - 1),
       
 15672           disabled: page === 1,
       
 15673           __experimentalIsFocusable: true,
       
 15674           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 15675             children: "\u2039"
       
 15676           })
       
 15677         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 15678           justify: "flex-start",
       
 15679           expanded: false,
       
 15680           spacing: 2,
       
 15681           children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)(
       
 15682           // translators: %s: Total number of pages.
       
 15683           (0,external_wp_i18n_namespaceObject._x)('Page <CurrentPageControl /> of %s', 'paging'), totalPages), {
       
 15684             CurrentPageControl: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
       
 15685               "aria-label": (0,external_wp_i18n_namespaceObject.__)('Current page'),
       
 15686               value: page,
       
 15687               options: [...Array(totalPages)].map((e, i) => {
       
 15688                 return {
       
 15689                   label: i + 1,
       
 15690                   value: i + 1
       
 15691                 };
       
 15692               }),
       
 15693               onChange: newPage => setPage(parseInt(newPage)),
       
 15694               size: "compact",
       
 15695               __nextHasNoMarginBottom: true
       
 15696             })
       
 15697           })
       
 15698         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15699           label: (0,external_wp_i18n_namespaceObject.__)('Next page'),
       
 15700           size: "compact",
       
 15701           onClick: () => setPage(page + 1),
       
 15702           disabled: page === totalPages,
       
 15703           __experimentalIsFocusable: true,
       
 15704           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 15705             children: "\u203A"
       
 15706           })
       
 15707         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 15708           label: (0,external_wp_i18n_namespaceObject.__)('Last page'),
       
 15709           size: "compact",
       
 15710           onClick: () => setPage(totalPages),
       
 15711           disabled: page === totalPages,
       
 15712           __experimentalIsFocusable: true,
       
 15713           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 15714             children: "\xBB"
       
 15715           })
       
 15716         })]
       
 15717       })]
       
 15718     })]
       
 15719   });
       
 15720 }
       
 15721 /* harmony default export */ const font_collection = (FontCollection);
       
 15722 
       
 15723 // EXTERNAL MODULE: ./node_modules/@wordpress/edit-site/lib/unbrotli.js
       
 15724 var unbrotli = __webpack_require__(8572);
       
 15725 var unbrotli_default = /*#__PURE__*/__webpack_require__.n(unbrotli);
       
 15726 // EXTERNAL MODULE: ./node_modules/@wordpress/edit-site/lib/inflate.js
       
 15727 var inflate = __webpack_require__(4660);
       
 15728 var inflate_default = /*#__PURE__*/__webpack_require__.n(inflate);
       
 15729 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/lib/lib-font.browser.js
       
 15730 /* eslint eslint-comments/no-unlimited-disable: 0 */
       
 15731 /* eslint-disable */
       
 15732 // import pako from 'pako';
       
 15733 
       
 15734 
       
 15735 
       
 15736 let fetchFunction = globalThis.fetch;
       
 15737 // if ( ! fetchFunction ) {
       
 15738 // 	let backlog = [];
       
 15739 // 	fetchFunction = globalThis.fetch = ( ...args ) =>
       
 15740 // 		new Promise( ( resolve, reject ) => {
       
 15741 // 			backlog.push( { args: args, resolve: resolve, reject: reject } );
       
 15742 // 		} );
       
 15743 // 	import( 'fs' )
       
 15744 // 		.then( ( fs ) => {
       
 15745 // 			fetchFunction = globalThis.fetch = async function ( path ) {
       
 15746 // 				return new Promise( ( resolve, reject ) => {
       
 15747 // 					fs.readFile( path, ( err, data ) => {
       
 15748 // 						if ( err ) return reject( err );
       
 15749 // 						resolve( { ok: true, arrayBuffer: () => data.buffer } );
       
 15750 // 					} );
       
 15751 // 				} );
       
 15752 // 			};
       
 15753 // 			while ( backlog.length ) {
       
 15754 // 				let instruction = backlog.shift();
       
 15755 // 				fetchFunction( ...instruction.args )
       
 15756 // 					.then( ( data ) => instruction.resolve( data ) )
       
 15757 // 					.catch( ( err ) => instruction.reject( err ) );
       
 15758 // 			}
       
 15759 // 		} )
       
 15760 // 		.catch( ( err ) => {
       
 15761 // 			console.error( err );
       
 15762 // 			throw new Error(
       
 15763 // 				`lib-font cannot run unless either the Fetch API or Node's filesystem module is available.`
       
 15764 // 			);
       
 15765 // 		} );
       
 15766 // }
       
 15767 class lib_font_browser_Event {
       
 15768 	constructor( type, detail = {}, msg ) {
       
 15769 		this.type = type;
       
 15770 		this.detail = detail;
       
 15771 		this.msg = msg;
       
 15772 		Object.defineProperty( this, `__mayPropagate`, {
       
 15773 			enumerable: false,
       
 15774 			writable: true,
       
 15775 		} );
       
 15776 		this.__mayPropagate = true;
       
 15777 	}
       
 15778 	preventDefault() {}
       
 15779 	stopPropagation() {
       
 15780 		this.__mayPropagate = false;
       
 15781 	}
       
 15782 	valueOf() {
       
 15783 		return this;
       
 15784 	}
       
 15785 	toString() {
       
 15786 		return this.msg
       
 15787 			? `[${ this.type } event]: ${ this.msg }`
       
 15788 			: `[${ this.type } event]`;
       
 15789 	}
       
 15790 }
       
 15791 class EventManager {
       
 15792 	constructor() {
       
 15793 		this.listeners = {};
       
 15794 	}
       
 15795 	addEventListener( type, listener, useCapture ) {
       
 15796 		let bin = this.listeners[ type ] || [];
       
 15797 		if ( useCapture ) bin.unshift( listener );
       
 15798 		else bin.push( listener );
       
 15799 		this.listeners[ type ] = bin;
       
 15800 	}
       
 15801 	removeEventListener( type, listener ) {
       
 15802 		let bin = this.listeners[ type ] || [];
       
 15803 		let pos = bin.findIndex( ( e ) => e === listener );
       
 15804 		if ( pos > -1 ) {
       
 15805 			bin.splice( pos, 1 );
       
 15806 			this.listeners[ type ] = bin;
       
 15807 		}
       
 15808 	}
       
 15809 	dispatch( event ) {
       
 15810 		let bin = this.listeners[ event.type ];
       
 15811 		if ( bin ) {
       
 15812 			for ( let l = 0, e = bin.length; l < e; l++ ) {
       
 15813 				if ( ! event.__mayPropagate ) break;
       
 15814 				bin[ l ]( event );
       
 15815 			}
       
 15816 		}
       
 15817 	}
       
 15818 }
       
 15819 const startDate = new Date( `1904-01-01T00:00:00+0000` ).getTime();
       
 15820 function asText( data ) {
       
 15821 	return Array.from( data )
       
 15822 		.map( ( v ) => String.fromCharCode( v ) )
       
 15823 		.join( `` );
       
 15824 }
       
 15825 class Parser {
       
 15826 	constructor( dict, dataview, name ) {
       
 15827 		this.name = ( name || dict.tag || `` ).trim();
       
 15828 		this.length = dict.length;
       
 15829 		this.start = dict.offset;
       
 15830 		this.offset = 0;
       
 15831 		this.data = dataview;
       
 15832 		[
       
 15833 			`getInt8`,
       
 15834 			`getUint8`,
       
 15835 			`getInt16`,
       
 15836 			`getUint16`,
       
 15837 			`getInt32`,
       
 15838 			`getUint32`,
       
 15839 			`getBigInt64`,
       
 15840 			`getBigUint64`,
       
 15841 		].forEach( ( name ) => {
       
 15842 			let fn = name.replace( /get(Big)?/, '' ).toLowerCase();
       
 15843 			let increment = parseInt( name.replace( /[^\d]/g, '' ) ) / 8;
       
 15844 			Object.defineProperty( this, fn, {
       
 15845 				get: () => this.getValue( name, increment ),
       
 15846 			} );
       
 15847 		} );
       
 15848 	}
       
 15849 	get currentPosition() {
       
 15850 		return this.start + this.offset;
       
 15851 	}
       
 15852 	set currentPosition( position ) {
       
 15853 		this.start = position;
       
 15854 		this.offset = 0;
       
 15855 	}
       
 15856 	skip( n = 0, bits = 8 ) {
       
 15857 		this.offset += ( n * bits ) / 8;
       
 15858 	}
       
 15859 	getValue( type, increment ) {
       
 15860 		let pos = this.start + this.offset;
       
 15861 		this.offset += increment;
       
 15862 		try {
       
 15863 			return this.data[ type ]( pos );
       
 15864 		} catch ( e ) {
       
 15865 			console.error( `parser`, type, increment, this );
       
 15866 			console.error( `parser`, this.start, this.offset );
       
 15867 			throw e;
       
 15868 		}
       
 15869 	}
       
 15870 	flags( n ) {
       
 15871 		if ( n === 8 || n === 16 || n === 32 || n === 64 ) {
       
 15872 			return this[ `uint${ n }` ]
       
 15873 				.toString( 2 )
       
 15874 				.padStart( n, 0 )
       
 15875 				.split( `` )
       
 15876 				.map( ( v ) => v === '1' );
       
 15877 		}
       
 15878 		console.error(
       
 15879 			`Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`
       
 15880 		);
       
 15881 		console.trace();
       
 15882 	}
       
 15883 	get tag() {
       
 15884 		const t = this.uint32;
       
 15885 		return asText( [
       
 15886 			( t >> 24 ) & 255,
       
 15887 			( t >> 16 ) & 255,
       
 15888 			( t >> 8 ) & 255,
       
 15889 			t & 255,
       
 15890 		] );
       
 15891 	}
       
 15892 	get fixed() {
       
 15893 		let major = this.int16;
       
 15894 		let minor = Math.round( ( 1e3 * this.uint16 ) / 65356 );
       
 15895 		return major + minor / 1e3;
       
 15896 	}
       
 15897 	get legacyFixed() {
       
 15898 		let major = this.uint16;
       
 15899 		let minor = this.uint16.toString( 16 ).padStart( 4, 0 );
       
 15900 		return parseFloat( `${ major }.${ minor }` );
       
 15901 	}
       
 15902 	get uint24() {
       
 15903 		return ( this.uint8 << 16 ) + ( this.uint8 << 8 ) + this.uint8;
       
 15904 	}
       
 15905 	get uint128() {
       
 15906 		let value = 0;
       
 15907 		for ( let i = 0; i < 5; i++ ) {
       
 15908 			let byte = this.uint8;
       
 15909 			value = value * 128 + ( byte & 127 );
       
 15910 			if ( byte < 128 ) break;
       
 15911 		}
       
 15912 		return value;
       
 15913 	}
       
 15914 	get longdatetime() {
       
 15915 		return new Date( startDate + 1e3 * parseInt( this.int64.toString() ) );
       
 15916 	}
       
 15917 	get fword() {
       
 15918 		return this.int16;
       
 15919 	}
       
 15920 	get ufword() {
       
 15921 		return this.uint16;
       
 15922 	}
       
 15923 	get Offset16() {
       
 15924 		return this.uint16;
       
 15925 	}
       
 15926 	get Offset32() {
       
 15927 		return this.uint32;
       
 15928 	}
       
 15929 	get F2DOT14() {
       
 15930 		const bits = p.uint16;
       
 15931 		const integer = [ 0, 1, -2, -1 ][ bits >> 14 ];
       
 15932 		const fraction = bits & 16383;
       
 15933 		return integer + fraction / 16384;
       
 15934 	}
       
 15935 	verifyLength() {
       
 15936 		if ( this.offset != this.length ) {
       
 15937 			console.error(
       
 15938 				`unexpected parsed table size (${ this.offset }) for "${ this.name }" (expected ${ this.length })`
       
 15939 			);
       
 15940 		}
       
 15941 	}
       
 15942 	readBytes( n = 0, position = 0, bits = 8, signed = false ) {
       
 15943 		n = n || this.length;
       
 15944 		if ( n === 0 ) return [];
       
 15945 		if ( position ) this.currentPosition = position;
       
 15946 		const fn = `${ signed ? `` : `u` }int${ bits }`,
       
 15947 			slice = [];
       
 15948 		while ( n-- ) slice.push( this[ fn ] );
       
 15949 		return slice;
       
 15950 	}
       
 15951 }
       
 15952 class ParsedData {
       
 15953 	constructor( parser ) {
       
 15954 		const pGetter = { enumerable: false, get: () => parser };
       
 15955 		Object.defineProperty( this, `parser`, pGetter );
       
 15956 		const start = parser.currentPosition;
       
 15957 		const startGetter = { enumerable: false, get: () => start };
       
 15958 		Object.defineProperty( this, `start`, startGetter );
       
 15959 	}
       
 15960 	load( struct ) {
       
 15961 		Object.keys( struct ).forEach( ( p ) => {
       
 15962 			let props = Object.getOwnPropertyDescriptor( struct, p );
       
 15963 			if ( props.get ) {
       
 15964 				this[ p ] = props.get.bind( this );
       
 15965 			} else if ( props.value !== undefined ) {
       
 15966 				this[ p ] = props.value;
       
 15967 			}
       
 15968 		} );
       
 15969 		if ( this.parser.length ) {
       
 15970 			this.parser.verifyLength();
       
 15971 		}
       
 15972 	}
       
 15973 }
       
 15974 class SimpleTable extends ParsedData {
       
 15975 	constructor( dict, dataview, name ) {
       
 15976 		const { parser: parser, start: start } = super(
       
 15977 			new Parser( dict, dataview, name )
       
 15978 		);
       
 15979 		const pGetter = { enumerable: false, get: () => parser };
       
 15980 		Object.defineProperty( this, `p`, pGetter );
       
 15981 		const startGetter = { enumerable: false, get: () => start };
       
 15982 		Object.defineProperty( this, `tableStart`, startGetter );
       
 15983 	}
       
 15984 }
       
 15985 function lazy$1( object, property, getter ) {
       
 15986 	let val;
       
 15987 	Object.defineProperty( object, property, {
       
 15988 		get: () => {
       
 15989 			if ( val ) return val;
       
 15990 			val = getter();
       
 15991 			return val;
       
 15992 		},
       
 15993 		enumerable: true,
       
 15994 	} );
       
 15995 }
       
 15996 class SFNT extends SimpleTable {
       
 15997 	constructor( font, dataview, createTable ) {
       
 15998 		const { p: p } = super( { offset: 0, length: 12 }, dataview, `sfnt` );
       
 15999 		this.version = p.uint32;
       
 16000 		this.numTables = p.uint16;
       
 16001 		this.searchRange = p.uint16;
       
 16002 		this.entrySelector = p.uint16;
       
 16003 		this.rangeShift = p.uint16;
       
 16004 		p.verifyLength();
       
 16005 		this.directory = [ ...new Array( this.numTables ) ].map(
       
 16006 			( _ ) => new TableRecord( p )
       
 16007 		);
       
 16008 		this.tables = {};
       
 16009 		this.directory.forEach( ( entry ) => {
       
 16010 			const getter = () =>
       
 16011 				createTable(
       
 16012 					this.tables,
       
 16013 					{
       
 16014 						tag: entry.tag,
       
 16015 						offset: entry.offset,
       
 16016 						length: entry.length,
       
 16017 					},
       
 16018 					dataview
       
 16019 				);
       
 16020 			lazy$1( this.tables, entry.tag.trim(), getter );
       
 16021 		} );
       
 16022 	}
       
 16023 }
       
 16024 class TableRecord {
       
 16025 	constructor( p ) {
       
 16026 		this.tag = p.tag;
       
 16027 		this.checksum = p.uint32;
       
 16028 		this.offset = p.uint32;
       
 16029 		this.length = p.uint32;
       
 16030 	}
       
 16031 }
       
 16032 const gzipDecode = (inflate_default()).inflate || undefined;
       
 16033 let nativeGzipDecode = undefined;
       
 16034 // if ( ! gzipDecode ) {
       
 16035 // 	import( 'zlib' ).then( ( zlib ) => {
       
 16036 // 		nativeGzipDecode = ( buffer ) => zlib.unzipSync( buffer );
       
 16037 // 	} );
       
 16038 // }
       
 16039 class WOFF$1 extends SimpleTable {
       
 16040 	constructor( font, dataview, createTable ) {
       
 16041 		const { p: p } = super( { offset: 0, length: 44 }, dataview, `woff` );
       
 16042 		this.signature = p.tag;
       
 16043 		this.flavor = p.uint32;
       
 16044 		this.length = p.uint32;
       
 16045 		this.numTables = p.uint16;
       
 16046 		p.uint16;
       
 16047 		this.totalSfntSize = p.uint32;
       
 16048 		this.majorVersion = p.uint16;
       
 16049 		this.minorVersion = p.uint16;
       
 16050 		this.metaOffset = p.uint32;
       
 16051 		this.metaLength = p.uint32;
       
 16052 		this.metaOrigLength = p.uint32;
       
 16053 		this.privOffset = p.uint32;
       
 16054 		this.privLength = p.uint32;
       
 16055 		p.verifyLength();
       
 16056 		this.directory = [ ...new Array( this.numTables ) ].map(
       
 16057 			( _ ) => new WoffTableDirectoryEntry( p )
       
 16058 		);
       
 16059 		buildWoffLazyLookups( this, dataview, createTable );
       
 16060 	}
       
 16061 }
       
 16062 class WoffTableDirectoryEntry {
       
 16063 	constructor( p ) {
       
 16064 		this.tag = p.tag;
       
 16065 		this.offset = p.uint32;
       
 16066 		this.compLength = p.uint32;
       
 16067 		this.origLength = p.uint32;
       
 16068 		this.origChecksum = p.uint32;
       
 16069 	}
       
 16070 }
       
 16071 function buildWoffLazyLookups( woff, dataview, createTable ) {
       
 16072 	woff.tables = {};
       
 16073 	woff.directory.forEach( ( entry ) => {
       
 16074 		lazy$1( woff.tables, entry.tag.trim(), () => {
       
 16075 			let offset = 0;
       
 16076 			let view = dataview;
       
 16077 			if ( entry.compLength !== entry.origLength ) {
       
 16078 				const data = dataview.buffer.slice(
       
 16079 					entry.offset,
       
 16080 					entry.offset + entry.compLength
       
 16081 				);
       
 16082 				let unpacked;
       
 16083 				if ( gzipDecode ) {
       
 16084 					unpacked = gzipDecode( new Uint8Array( data ) );
       
 16085 				} else if ( nativeGzipDecode ) {
       
 16086 					unpacked = nativeGzipDecode( new Uint8Array( data ) );
       
 16087 				} else {
       
 16088 					const msg = `no brotli decoder available to decode WOFF2 font`;
       
 16089 					if ( font.onerror ) font.onerror( msg );
       
 16090 					throw new Error( msg );
       
 16091 				}
       
 16092 				view = new DataView( unpacked.buffer );
       
 16093 			} else {
       
 16094 				offset = entry.offset;
       
 16095 			}
       
 16096 			return createTable(
       
 16097 				woff.tables,
       
 16098 				{ tag: entry.tag, offset: offset, length: entry.origLength },
       
 16099 				view
       
 16100 			);
       
 16101 		} );
       
 16102 	} );
       
 16103 }
       
 16104 const brotliDecode = (unbrotli_default());
       
 16105 let nativeBrotliDecode = undefined;
       
 16106 // if ( ! brotliDecode ) {
       
 16107 // 	import( 'zlib' ).then( ( zlib ) => {
       
 16108 // 		nativeBrotliDecode = ( buffer ) => zlib.brotliDecompressSync( buffer );
       
 16109 // 	} );
       
 16110 // }
       
 16111 class WOFF2$1 extends SimpleTable {
       
 16112 	constructor( font, dataview, createTable ) {
       
 16113 		const { p: p } = super( { offset: 0, length: 48 }, dataview, `woff2` );
       
 16114 		this.signature = p.tag;
       
 16115 		this.flavor = p.uint32;
       
 16116 		this.length = p.uint32;
       
 16117 		this.numTables = p.uint16;
       
 16118 		p.uint16;
       
 16119 		this.totalSfntSize = p.uint32;
       
 16120 		this.totalCompressedSize = p.uint32;
       
 16121 		this.majorVersion = p.uint16;
       
 16122 		this.minorVersion = p.uint16;
       
 16123 		this.metaOffset = p.uint32;
       
 16124 		this.metaLength = p.uint32;
       
 16125 		this.metaOrigLength = p.uint32;
       
 16126 		this.privOffset = p.uint32;
       
 16127 		this.privLength = p.uint32;
       
 16128 		p.verifyLength();
       
 16129 		this.directory = [ ...new Array( this.numTables ) ].map(
       
 16130 			( _ ) => new Woff2TableDirectoryEntry( p )
       
 16131 		);
       
 16132 		let dictOffset = p.currentPosition;
       
 16133 		this.directory[ 0 ].offset = 0;
       
 16134 		this.directory.forEach( ( e, i ) => {
       
 16135 			let next = this.directory[ i + 1 ];
       
 16136 			if ( next ) {
       
 16137 				next.offset =
       
 16138 					e.offset +
       
 16139 					( e.transformLength !== undefined
       
 16140 						? e.transformLength
       
 16141 						: e.origLength );
       
 16142 			}
       
 16143 		} );
       
 16144 		let decoded;
       
 16145 		let buffer = dataview.buffer.slice( dictOffset );
       
 16146 		if ( brotliDecode ) {
       
 16147 			decoded = brotliDecode( new Uint8Array( buffer ) );
       
 16148 		} else if ( nativeBrotliDecode ) {
       
 16149 			decoded = new Uint8Array( nativeBrotliDecode( buffer ) );
       
 16150 		} else {
       
 16151 			const msg = `no brotli decoder available to decode WOFF2 font`;
       
 16152 			if ( font.onerror ) font.onerror( msg );
       
 16153 			throw new Error( msg );
       
 16154 		}
       
 16155 		buildWoff2LazyLookups( this, decoded, createTable );
       
 16156 	}
       
 16157 }
       
 16158 class Woff2TableDirectoryEntry {
       
 16159 	constructor( p ) {
       
 16160 		this.flags = p.uint8;
       
 16161 		const tagNumber = ( this.tagNumber = this.flags & 63 );
       
 16162 		if ( tagNumber === 63 ) {
       
 16163 			this.tag = p.tag;
       
 16164 		} else {
       
 16165 			this.tag = getWOFF2Tag( tagNumber );
       
 16166 		}
       
 16167 		const transformVersion = ( this.transformVersion =
       
 16168 			( this.flags & 192 ) >> 6 );
       
 16169 		let hasTransforms = transformVersion !== 0;
       
 16170 		if ( this.tag === `glyf` || this.tag === `loca` ) {
       
 16171 			hasTransforms = this.transformVersion !== 3;
       
 16172 		}
       
 16173 		this.origLength = p.uint128;
       
 16174 		if ( hasTransforms ) {
       
 16175 			this.transformLength = p.uint128;
       
 16176 		}
       
 16177 	}
       
 16178 }
       
 16179 function buildWoff2LazyLookups( woff2, decoded, createTable ) {
       
 16180 	woff2.tables = {};
       
 16181 	woff2.directory.forEach( ( entry ) => {
       
 16182 		lazy$1( woff2.tables, entry.tag.trim(), () => {
       
 16183 			const start = entry.offset;
       
 16184 			const end =
       
 16185 				start +
       
 16186 				( entry.transformLength
       
 16187 					? entry.transformLength
       
 16188 					: entry.origLength );
       
 16189 			const data = new DataView( decoded.slice( start, end ).buffer );
       
 16190 			try {
       
 16191 				return createTable(
       
 16192 					woff2.tables,
       
 16193 					{ tag: entry.tag, offset: 0, length: entry.origLength },
       
 16194 					data
       
 16195 				);
       
 16196 			} catch ( e ) {
       
 16197 				console.error( e );
       
 16198 			}
       
 16199 		} );
       
 16200 	} );
       
 16201 }
       
 16202 function getWOFF2Tag( flag ) {
       
 16203 	return [
       
 16204 		`cmap`,
       
 16205 		`head`,
       
 16206 		`hhea`,
       
 16207 		`hmtx`,
       
 16208 		`maxp`,
       
 16209 		`name`,
       
 16210 		`OS/2`,
       
 16211 		`post`,
       
 16212 		`cvt `,
       
 16213 		`fpgm`,
       
 16214 		`glyf`,
       
 16215 		`loca`,
       
 16216 		`prep`,
       
 16217 		`CFF `,
       
 16218 		`VORG`,
       
 16219 		`EBDT`,
       
 16220 		`EBLC`,
       
 16221 		`gasp`,
       
 16222 		`hdmx`,
       
 16223 		`kern`,
       
 16224 		`LTSH`,
       
 16225 		`PCLT`,
       
 16226 		`VDMX`,
       
 16227 		`vhea`,
       
 16228 		`vmtx`,
       
 16229 		`BASE`,
       
 16230 		`GDEF`,
       
 16231 		`GPOS`,
       
 16232 		`GSUB`,
       
 16233 		`EBSC`,
       
 16234 		`JSTF`,
       
 16235 		`MATH`,
       
 16236 		`CBDT`,
       
 16237 		`CBLC`,
       
 16238 		`COLR`,
       
 16239 		`CPAL`,
       
 16240 		`SVG `,
       
 16241 		`sbix`,
       
 16242 		`acnt`,
       
 16243 		`avar`,
       
 16244 		`bdat`,
       
 16245 		`bloc`,
       
 16246 		`bsln`,
       
 16247 		`cvar`,
       
 16248 		`fdsc`,
       
 16249 		`feat`,
       
 16250 		`fmtx`,
       
 16251 		`fvar`,
       
 16252 		`gvar`,
       
 16253 		`hsty`,
       
 16254 		`just`,
       
 16255 		`lcar`,
       
 16256 		`mort`,
       
 16257 		`morx`,
       
 16258 		`opbd`,
       
 16259 		`prop`,
       
 16260 		`trak`,
       
 16261 		`Zapf`,
       
 16262 		`Silf`,
       
 16263 		`Glat`,
       
 16264 		`Gloc`,
       
 16265 		`Feat`,
       
 16266 		`Sill`,
       
 16267 	][ flag & 63 ];
       
 16268 }
       
 16269 const tableClasses = {};
       
 16270 let tableClassesLoaded = false;
       
 16271 Promise.all( [
       
 16272 	Promise.resolve().then( function () {
       
 16273 		return cmap$1;
       
 16274 	} ),
       
 16275 	Promise.resolve().then( function () {
       
 16276 		return head$1;
       
 16277 	} ),
       
 16278 	Promise.resolve().then( function () {
       
 16279 		return hhea$1;
       
 16280 	} ),
       
 16281 	Promise.resolve().then( function () {
       
 16282 		return hmtx$1;
       
 16283 	} ),
       
 16284 	Promise.resolve().then( function () {
       
 16285 		return maxp$1;
       
 16286 	} ),
       
 16287 	Promise.resolve().then( function () {
       
 16288 		return name$1;
       
 16289 	} ),
       
 16290 	Promise.resolve().then( function () {
       
 16291 		return OS2$1;
       
 16292 	} ),
       
 16293 	Promise.resolve().then( function () {
       
 16294 		return post$1;
       
 16295 	} ),
       
 16296 	Promise.resolve().then( function () {
       
 16297 		return BASE$1;
       
 16298 	} ),
       
 16299 	Promise.resolve().then( function () {
       
 16300 		return GDEF$1;
       
 16301 	} ),
       
 16302 	Promise.resolve().then( function () {
       
 16303 		return GSUB$1;
       
 16304 	} ),
       
 16305 	Promise.resolve().then( function () {
       
 16306 		return GPOS$1;
       
 16307 	} ),
       
 16308 	Promise.resolve().then( function () {
       
 16309 		return SVG$1;
       
 16310 	} ),
       
 16311 	Promise.resolve().then( function () {
       
 16312 		return fvar$1;
       
 16313 	} ),
       
 16314 	Promise.resolve().then( function () {
       
 16315 		return cvt$1;
       
 16316 	} ),
       
 16317 	Promise.resolve().then( function () {
       
 16318 		return fpgm$1;
       
 16319 	} ),
       
 16320 	Promise.resolve().then( function () {
       
 16321 		return gasp$1;
       
 16322 	} ),
       
 16323 	Promise.resolve().then( function () {
       
 16324 		return glyf$1;
       
 16325 	} ),
       
 16326 	Promise.resolve().then( function () {
       
 16327 		return loca$1;
       
 16328 	} ),
       
 16329 	Promise.resolve().then( function () {
       
 16330 		return prep$1;
       
 16331 	} ),
       
 16332 	Promise.resolve().then( function () {
       
 16333 		return CFF$1;
       
 16334 	} ),
       
 16335 	Promise.resolve().then( function () {
       
 16336 		return CFF2$1;
       
 16337 	} ),
       
 16338 	Promise.resolve().then( function () {
       
 16339 		return VORG$1;
       
 16340 	} ),
       
 16341 	Promise.resolve().then( function () {
       
 16342 		return EBLC$1;
       
 16343 	} ),
       
 16344 	Promise.resolve().then( function () {
       
 16345 		return EBDT$1;
       
 16346 	} ),
       
 16347 	Promise.resolve().then( function () {
       
 16348 		return EBSC$1;
       
 16349 	} ),
       
 16350 	Promise.resolve().then( function () {
       
 16351 		return CBLC$1;
       
 16352 	} ),
       
 16353 	Promise.resolve().then( function () {
       
 16354 		return CBDT$1;
       
 16355 	} ),
       
 16356 	Promise.resolve().then( function () {
       
 16357 		return sbix$1;
       
 16358 	} ),
       
 16359 	Promise.resolve().then( function () {
       
 16360 		return COLR$1;
       
 16361 	} ),
       
 16362 	Promise.resolve().then( function () {
       
 16363 		return CPAL$1;
       
 16364 	} ),
       
 16365 	Promise.resolve().then( function () {
       
 16366 		return DSIG$1;
       
 16367 	} ),
       
 16368 	Promise.resolve().then( function () {
       
 16369 		return hdmx$1;
       
 16370 	} ),
       
 16371 	Promise.resolve().then( function () {
       
 16372 		return kern$1;
       
 16373 	} ),
       
 16374 	Promise.resolve().then( function () {
       
 16375 		return LTSH$1;
       
 16376 	} ),
       
 16377 	Promise.resolve().then( function () {
       
 16378 		return MERG$1;
       
 16379 	} ),
       
 16380 	Promise.resolve().then( function () {
       
 16381 		return meta$1;
       
 16382 	} ),
       
 16383 	Promise.resolve().then( function () {
       
 16384 		return PCLT$1;
       
 16385 	} ),
       
 16386 	Promise.resolve().then( function () {
       
 16387 		return VDMX$1;
       
 16388 	} ),
       
 16389 	Promise.resolve().then( function () {
       
 16390 		return vhea$1;
       
 16391 	} ),
       
 16392 	Promise.resolve().then( function () {
       
 16393 		return vmtx$1;
       
 16394 	} ),
       
 16395 ] ).then( ( data ) => {
       
 16396 	data.forEach( ( e ) => {
       
 16397 		let name = Object.keys( e )[ 0 ];
       
 16398 		tableClasses[ name ] = e[ name ];
       
 16399 	} );
       
 16400 	tableClassesLoaded = true;
       
 16401 } );
       
 16402 function createTable( tables, dict, dataview ) {
       
 16403 	let name = dict.tag.replace( /[^\w\d]/g, `` );
       
 16404 	let Type = tableClasses[ name ];
       
 16405 	if ( Type ) return new Type( dict, dataview, tables );
       
 16406 	console.warn(
       
 16407 		`lib-font has no definition for ${ name }. The table was skipped.`
       
 16408 	);
       
 16409 	return {};
       
 16410 }
       
 16411 function loadTableClasses() {
       
 16412 	let count = 0;
       
 16413 	function checkLoaded( resolve, reject ) {
       
 16414 		if ( ! tableClassesLoaded ) {
       
 16415 			if ( count > 10 ) {
       
 16416 				return reject( new Error( `loading took too long` ) );
       
 16417 			}
       
 16418 			count++;
       
 16419 			return setTimeout( () => checkLoaded( resolve ), 250 );
       
 16420 		}
       
 16421 		resolve( createTable );
       
 16422 	}
       
 16423 	return new Promise( ( resolve, reject ) => checkLoaded( resolve ) );
       
 16424 }
       
 16425 function getFontCSSFormat( path, errorOnStyle ) {
       
 16426 	let pos = path.lastIndexOf( `.` );
       
 16427 	let ext = ( path.substring( pos + 1 ) || `` ).toLowerCase();
       
 16428 	let format = {
       
 16429 		ttf: `truetype`,
       
 16430 		otf: `opentype`,
       
 16431 		woff: `woff`,
       
 16432 		woff2: `woff2`,
       
 16433 	}[ ext ];
       
 16434 	if ( format ) return format;
       
 16435 	let msg = {
       
 16436 		eot: `The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.`,
       
 16437 		svg: `The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.`,
       
 16438 		fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,
       
 16439 		ttc: `Based on the current CSS specification, font collections are not (yet?) supported.`,
       
 16440 	}[ ext ];
       
 16441 	if ( ! msg ) msg = `${ path } is not a known webfont format.`;
       
 16442 	if ( errorOnStyle ) {
       
 16443 		throw new Error( msg );
       
 16444 	} else {
       
 16445 		console.warn( `Could not load font: ${ msg }` );
       
 16446 	}
       
 16447 }
       
 16448 async function setupFontFace( name, url, options = {} ) {
       
 16449 	if ( ! globalThis.document ) return;
       
 16450 	let format = getFontCSSFormat( url, options.errorOnStyle );
       
 16451 	if ( ! format ) return;
       
 16452 	let style = document.createElement( `style` );
       
 16453 	style.className = `injected-by-Font-js`;
       
 16454 	let rules = [];
       
 16455 	if ( options.styleRules ) {
       
 16456 		rules = Object.entries( options.styleRules ).map(
       
 16457 			( [ key, value ] ) => `${ key }: ${ value };`
       
 16458 		);
       
 16459 	}
       
 16460 	style.textContent = `\n@font-face {\n    font-family: "${ name }";\n    ${ rules.join(
       
 16461 		`\n\t`
       
 16462 	) }\n    src: url("${ url }") format("${ format }");\n}`;
       
 16463 	globalThis.document.head.appendChild( style );
       
 16464 	return style;
       
 16465 }
       
 16466 const TTF = [ 0, 1, 0, 0 ];
       
 16467 const OTF = [ 79, 84, 84, 79 ];
       
 16468 const WOFF = [ 119, 79, 70, 70 ];
       
 16469 const WOFF2 = [ 119, 79, 70, 50 ];
       
 16470 function match( ar1, ar2 ) {
       
 16471 	if ( ar1.length !== ar2.length ) return;
       
 16472 	for ( let i = 0; i < ar1.length; i++ ) {
       
 16473 		if ( ar1[ i ] !== ar2[ i ] ) return;
       
 16474 	}
       
 16475 	return true;
       
 16476 }
       
 16477 function validFontFormat( dataview ) {
       
 16478 	const LEAD_BYTES = [
       
 16479 		dataview.getUint8( 0 ),
       
 16480 		dataview.getUint8( 1 ),
       
 16481 		dataview.getUint8( 2 ),
       
 16482 		dataview.getUint8( 3 ),
       
 16483 	];
       
 16484 	if ( match( LEAD_BYTES, TTF ) || match( LEAD_BYTES, OTF ) ) return `SFNT`;
       
 16485 	if ( match( LEAD_BYTES, WOFF ) ) return `WOFF`;
       
 16486 	if ( match( LEAD_BYTES, WOFF2 ) ) return `WOFF2`;
       
 16487 }
       
 16488 function checkFetchResponseStatus( response ) {
       
 16489 	if ( ! response.ok ) {
       
 16490 		throw new Error(
       
 16491 			`HTTP ${ response.status } - ${ response.statusText }`
       
 16492 		);
       
 16493 	}
       
 16494 	return response;
       
 16495 }
       
 16496 class Font extends EventManager {
       
 16497 	constructor( name, options = {} ) {
       
 16498 		super();
       
 16499 		this.name = name;
       
 16500 		this.options = options;
       
 16501 		this.metrics = false;
       
 16502 	}
       
 16503 	get src() {
       
 16504 		return this.__src;
       
 16505 	}
       
 16506 	set src( src ) {
       
 16507 		this.__src = src;
       
 16508 		( async () => {
       
 16509 			if ( globalThis.document && ! this.options.skipStyleSheet ) {
       
 16510 				await setupFontFace( this.name, src, this.options );
       
 16511 			}
       
 16512 			this.loadFont( src );
       
 16513 		} )();
       
 16514 	}
       
 16515 	async loadFont( url, filename ) {
       
 16516 		fetch( url )
       
 16517 			.then(
       
 16518 				( response ) =>
       
 16519 					checkFetchResponseStatus( response ) &&
       
 16520 					response.arrayBuffer()
       
 16521 			)
       
 16522 			.then( ( buffer ) =>
       
 16523 				this.fromDataBuffer( buffer, filename || url )
       
 16524 			)
       
 16525 			.catch( ( err ) => {
       
 16526 				const evt = new lib_font_browser_Event(
       
 16527 					`error`,
       
 16528 					err,
       
 16529 					`Failed to load font at ${ filename || url }`
       
 16530 				);
       
 16531 				this.dispatch( evt );
       
 16532 				if ( this.onerror ) this.onerror( evt );
       
 16533 			} );
       
 16534 	}
       
 16535 	async fromDataBuffer( buffer, filenameOrUrL ) {
       
 16536 		this.fontData = new DataView( buffer );
       
 16537 		let type = validFontFormat( this.fontData );
       
 16538 		if ( ! type ) {
       
 16539 			throw new Error(
       
 16540 				`${ filenameOrUrL } is either an unsupported font format, or not a font at all.`
       
 16541 			);
       
 16542 		}
       
 16543 		await this.parseBasicData( type );
       
 16544 		const evt = new lib_font_browser_Event( 'load', { font: this } );
       
 16545 		this.dispatch( evt );
       
 16546 		if ( this.onload ) this.onload( evt );
       
 16547 	}
       
 16548 	async parseBasicData( type ) {
       
 16549 		return loadTableClasses().then( ( createTable ) => {
       
 16550 			if ( type === `SFNT` ) {
       
 16551 				this.opentype = new SFNT( this, this.fontData, createTable );
       
 16552 			}
       
 16553 			if ( type === `WOFF` ) {
       
 16554 				this.opentype = new WOFF$1( this, this.fontData, createTable );
       
 16555 			}
       
 16556 			if ( type === `WOFF2` ) {
       
 16557 				this.opentype = new WOFF2$1( this, this.fontData, createTable );
       
 16558 			}
       
 16559 			return this.opentype;
       
 16560 		} );
       
 16561 	}
       
 16562 	getGlyphId( char ) {
       
 16563 		return this.opentype.tables.cmap.getGlyphId( char );
       
 16564 	}
       
 16565 	reverse( glyphid ) {
       
 16566 		return this.opentype.tables.cmap.reverse( glyphid );
       
 16567 	}
       
 16568 	supports( char ) {
       
 16569 		return this.getGlyphId( char ) !== 0;
       
 16570 	}
       
 16571 	supportsVariation( variation ) {
       
 16572 		return (
       
 16573 			this.opentype.tables.cmap.supportsVariation( variation ) !== false
       
 16574 		);
       
 16575 	}
       
 16576 	measureText( text, size = 16 ) {
       
 16577 		if ( this.__unloaded )
       
 16578 			throw new Error(
       
 16579 				'Cannot measure text: font was unloaded. Please reload before calling measureText()'
       
 16580 			);
       
 16581 		let d = document.createElement( 'div' );
       
 16582 		d.textContent = text;
       
 16583 		d.style.fontFamily = this.name;
       
 16584 		d.style.fontSize = `${ size }px`;
       
 16585 		d.style.color = `transparent`;
       
 16586 		d.style.background = `transparent`;
       
 16587 		d.style.top = `0`;
       
 16588 		d.style.left = `0`;
       
 16589 		d.style.position = `absolute`;
       
 16590 		document.body.appendChild( d );
       
 16591 		let bbox = d.getBoundingClientRect();
       
 16592 		document.body.removeChild( d );
       
 16593 		const OS2 = this.opentype.tables[ 'OS/2' ];
       
 16594 		bbox.fontSize = size;
       
 16595 		bbox.ascender = OS2.sTypoAscender;
       
 16596 		bbox.descender = OS2.sTypoDescender;
       
 16597 		return bbox;
       
 16598 	}
       
 16599 	unload() {
       
 16600 		if ( this.styleElement.parentNode ) {
       
 16601 			this.styleElement.parentNode.removeElement( this.styleElement );
       
 16602 			const evt = new lib_font_browser_Event( 'unload', { font: this } );
       
 16603 			this.dispatch( evt );
       
 16604 			if ( this.onunload ) this.onunload( evt );
       
 16605 		}
       
 16606 		this._unloaded = true;
       
 16607 	}
       
 16608 	load() {
       
 16609 		if ( this.__unloaded ) {
       
 16610 			delete this.__unloaded;
       
 16611 			document.head.appendChild( this.styleElement );
       
 16612 			const evt = new lib_font_browser_Event( 'load', { font: this } );
       
 16613 			this.dispatch( evt );
       
 16614 			if ( this.onload ) this.onload( evt );
       
 16615 		}
       
 16616 	}
       
 16617 }
       
 16618 globalThis.Font = Font;
       
 16619 class Subtable extends ParsedData {
       
 16620 	constructor( p, plaformID, encodingID ) {
       
 16621 		super( p );
       
 16622 		this.plaformID = plaformID;
       
 16623 		this.encodingID = encodingID;
       
 16624 	}
       
 16625 }
       
 16626 class Format0 extends Subtable {
       
 16627 	constructor( p, platformID, encodingID ) {
       
 16628 		super( p, platformID, encodingID );
       
 16629 		this.format = 0;
       
 16630 		this.length = p.uint16;
       
 16631 		this.language = p.uint16;
       
 16632 		this.glyphIdArray = [ ...new Array( 256 ) ].map( ( _ ) => p.uint8 );
       
 16633 	}
       
 16634 	supports( charCode ) {
       
 16635 		if ( charCode.charCodeAt ) {
       
 16636 			charCode = -1;
       
 16637 			console.warn(
       
 16638 				`supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`
       
 16639 			);
       
 16640 		}
       
 16641 		return 0 <= charCode && charCode <= 255;
       
 16642 	}
       
 16643 	reverse( glyphID ) {
       
 16644 		console.warn( `reverse not implemented for cmap subtable format 0` );
       
 16645 		return {};
       
 16646 	}
       
 16647 	getSupportedCharCodes() {
       
 16648 		return [ { start: 1, end: 256 } ];
       
 16649 	}
       
 16650 }
       
 16651 class Format2 extends Subtable {
       
 16652 	constructor( p, platformID, encodingID ) {
       
 16653 		super( p, platformID, encodingID );
       
 16654 		this.format = 2;
       
 16655 		this.length = p.uint16;
       
 16656 		this.language = p.uint16;
       
 16657 		this.subHeaderKeys = [ ...new Array( 256 ) ].map( ( _ ) => p.uint16 );
       
 16658 		const subHeaderCount = Math.max( ...this.subHeaderKeys );
       
 16659 		const subHeaderOffset = p.currentPosition;
       
 16660 		lazy$1( this, `subHeaders`, () => {
       
 16661 			p.currentPosition = subHeaderOffset;
       
 16662 			return [ ...new Array( subHeaderCount ) ].map(
       
 16663 				( _ ) => new SubHeader( p )
       
 16664 			);
       
 16665 		} );
       
 16666 		const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;
       
 16667 		lazy$1( this, `glyphIndexArray`, () => {
       
 16668 			p.currentPosition = glyphIndexOffset;
       
 16669 			return [ ...new Array( subHeaderCount ) ].map( ( _ ) => p.uint16 );
       
 16670 		} );
       
 16671 	}
       
 16672 	supports( charCode ) {
       
 16673 		if ( charCode.charCodeAt ) {
       
 16674 			charCode = -1;
       
 16675 			console.warn(
       
 16676 				`supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`
       
 16677 			);
       
 16678 		}
       
 16679 		const low = charCode && 255;
       
 16680 		const high = charCode && 65280;
       
 16681 		const subHeaderKey = this.subHeaders[ high ];
       
 16682 		const subheader = this.subHeaders[ subHeaderKey ];
       
 16683 		const first = subheader.firstCode;
       
 16684 		const last = first + subheader.entryCount;
       
 16685 		return first <= low && low <= last;
       
 16686 	}
       
 16687 	reverse( glyphID ) {
       
 16688 		console.warn( `reverse not implemented for cmap subtable format 2` );
       
 16689 		return {};
       
 16690 	}
       
 16691 	getSupportedCharCodes( preservePropNames = false ) {
       
 16692 		if ( preservePropNames ) {
       
 16693 			return this.subHeaders.map( ( h ) => ( {
       
 16694 				firstCode: h.firstCode,
       
 16695 				lastCode: h.lastCode,
       
 16696 			} ) );
       
 16697 		}
       
 16698 		return this.subHeaders.map( ( h ) => ( {
       
 16699 			start: h.firstCode,
       
 16700 			end: h.lastCode,
       
 16701 		} ) );
       
 16702 	}
       
 16703 }
       
 16704 class SubHeader {
       
 16705 	constructor( p ) {
       
 16706 		this.firstCode = p.uint16;
       
 16707 		this.entryCount = p.uint16;
       
 16708 		this.lastCode = this.first + this.entryCount;
       
 16709 		this.idDelta = p.int16;
       
 16710 		this.idRangeOffset = p.uint16;
       
 16711 	}
       
 16712 }
       
 16713 class Format4 extends Subtable {
       
 16714 	constructor( p, platformID, encodingID ) {
       
 16715 		super( p, platformID, encodingID );
       
 16716 		this.format = 4;
       
 16717 		this.length = p.uint16;
       
 16718 		this.language = p.uint16;
       
 16719 		this.segCountX2 = p.uint16;
       
 16720 		this.segCount = this.segCountX2 / 2;
       
 16721 		this.searchRange = p.uint16;
       
 16722 		this.entrySelector = p.uint16;
       
 16723 		this.rangeShift = p.uint16;
       
 16724 		const endCodePosition = p.currentPosition;
       
 16725 		lazy$1( this, `endCode`, () =>
       
 16726 			p.readBytes( this.segCount, endCodePosition, 16 )
       
 16727 		);
       
 16728 		const startCodePosition = endCodePosition + 2 + this.segCountX2;
       
 16729 		lazy$1( this, `startCode`, () =>
       
 16730 			p.readBytes( this.segCount, startCodePosition, 16 )
       
 16731 		);
       
 16732 		const idDeltaPosition = startCodePosition + this.segCountX2;
       
 16733 		lazy$1( this, `idDelta`, () =>
       
 16734 			p.readBytes( this.segCount, idDeltaPosition, 16, true )
       
 16735 		);
       
 16736 		const idRangePosition = idDeltaPosition + this.segCountX2;
       
 16737 		lazy$1( this, `idRangeOffset`, () =>
       
 16738 			p.readBytes( this.segCount, idRangePosition, 16 )
       
 16739 		);
       
 16740 		const glyphIdArrayPosition = idRangePosition + this.segCountX2;
       
 16741 		const glyphIdArrayLength =
       
 16742 			this.length - ( glyphIdArrayPosition - this.tableStart );
       
 16743 		lazy$1( this, `glyphIdArray`, () =>
       
 16744 			p.readBytes( glyphIdArrayLength, glyphIdArrayPosition, 16 )
       
 16745 		);
       
 16746 		lazy$1( this, `segments`, () =>
       
 16747 			this.buildSegments( idRangePosition, glyphIdArrayPosition, p )
       
 16748 		);
       
 16749 	}
       
 16750 	buildSegments( idRangePosition, glyphIdArrayPosition, p ) {
       
 16751 		const build = ( _, i ) => {
       
 16752 			let startCode = this.startCode[ i ],
       
 16753 				endCode = this.endCode[ i ],
       
 16754 				idDelta = this.idDelta[ i ],
       
 16755 				idRangeOffset = this.idRangeOffset[ i ],
       
 16756 				idRangeOffsetPointer = idRangePosition + 2 * i,
       
 16757 				glyphIDs = [];
       
 16758 			if ( idRangeOffset === 0 ) {
       
 16759 				for (
       
 16760 					let i = startCode + idDelta, e = endCode + idDelta;
       
 16761 					i <= e;
       
 16762 					i++
       
 16763 				) {
       
 16764 					glyphIDs.push( i );
       
 16765 				}
       
 16766 			} else {
       
 16767 				for ( let i = 0, e = endCode - startCode; i <= e; i++ ) {
       
 16768 					p.currentPosition =
       
 16769 						idRangeOffsetPointer + idRangeOffset + i * 2;
       
 16770 					glyphIDs.push( p.uint16 );
       
 16771 				}
       
 16772 			}
       
 16773 			return {
       
 16774 				startCode: startCode,
       
 16775 				endCode: endCode,
       
 16776 				idDelta: idDelta,
       
 16777 				idRangeOffset: idRangeOffset,
       
 16778 				glyphIDs: glyphIDs,
       
 16779 			};
       
 16780 		};
       
 16781 		return [ ...new Array( this.segCount ) ].map( build );
       
 16782 	}
       
 16783 	reverse( glyphID ) {
       
 16784 		let s = this.segments.find( ( v ) => v.glyphIDs.includes( glyphID ) );
       
 16785 		if ( ! s ) return {};
       
 16786 		const code = s.startCode + s.glyphIDs.indexOf( glyphID );
       
 16787 		return { code: code, unicode: String.fromCodePoint( code ) };
       
 16788 	}
       
 16789 	getGlyphId( charCode ) {
       
 16790 		if ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );
       
 16791 		if ( 55296 <= charCode && charCode <= 57343 ) return 0;
       
 16792 		if ( ( charCode & 65534 ) === 65534 || ( charCode & 65535 ) === 65535 )
       
 16793 			return 0;
       
 16794 		let segment = this.segments.find(
       
 16795 			( s ) => s.startCode <= charCode && charCode <= s.endCode
       
 16796 		);
       
 16797 		if ( ! segment ) return 0;
       
 16798 		return segment.glyphIDs[ charCode - segment.startCode ];
       
 16799 	}
       
 16800 	supports( charCode ) {
       
 16801 		return this.getGlyphId( charCode ) !== 0;
       
 16802 	}
       
 16803 	getSupportedCharCodes( preservePropNames = false ) {
       
 16804 		if ( preservePropNames ) return this.segments;
       
 16805 		return this.segments.map( ( v ) => ( {
       
 16806 			start: v.startCode,
       
 16807 			end: v.endCode,
       
 16808 		} ) );
       
 16809 	}
       
 16810 }
       
 16811 class Format6 extends Subtable {
       
 16812 	constructor( p, platformID, encodingID ) {
       
 16813 		super( p, platformID, encodingID );
       
 16814 		this.format = 6;
       
 16815 		this.length = p.uint16;
       
 16816 		this.language = p.uint16;
       
 16817 		this.firstCode = p.uint16;
       
 16818 		this.entryCount = p.uint16;
       
 16819 		this.lastCode = this.firstCode + this.entryCount - 1;
       
 16820 		const getter = () =>
       
 16821 			[ ...new Array( this.entryCount ) ].map( ( _ ) => p.uint16 );
       
 16822 		lazy$1( this, `glyphIdArray`, getter );
       
 16823 	}
       
 16824 	supports( charCode ) {
       
 16825 		if ( charCode.charCodeAt ) {
       
 16826 			charCode = -1;
       
 16827 			console.warn(
       
 16828 				`supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`
       
 16829 			);
       
 16830 		}
       
 16831 		if ( charCode < this.firstCode ) return {};
       
 16832 		if ( charCode > this.firstCode + this.entryCount ) return {};
       
 16833 		const code = charCode - this.firstCode;
       
 16834 		return { code: code, unicode: String.fromCodePoint( code ) };
       
 16835 	}
       
 16836 	reverse( glyphID ) {
       
 16837 		let pos = this.glyphIdArray.indexOf( glyphID );
       
 16838 		if ( pos > -1 ) return this.firstCode + pos;
       
 16839 	}
       
 16840 	getSupportedCharCodes( preservePropNames = false ) {
       
 16841 		if ( preservePropNames ) {
       
 16842 			return [ { firstCode: this.firstCode, lastCode: this.lastCode } ];
       
 16843 		}
       
 16844 		return [ { start: this.firstCode, end: this.lastCode } ];
       
 16845 	}
       
 16846 }
       
 16847 class Format8 extends Subtable {
       
 16848 	constructor( p, platformID, encodingID ) {
       
 16849 		super( p, platformID, encodingID );
       
 16850 		this.format = 8;
       
 16851 		p.uint16;
       
 16852 		this.length = p.uint32;
       
 16853 		this.language = p.uint32;
       
 16854 		this.is32 = [ ...new Array( 8192 ) ].map( ( _ ) => p.uint8 );
       
 16855 		this.numGroups = p.uint32;
       
 16856 		const getter = () =>
       
 16857 			[ ...new Array( this.numGroups ) ].map(
       
 16858 				( _ ) => new SequentialMapGroup$1( p )
       
 16859 			);
       
 16860 		lazy$1( this, `groups`, getter );
       
 16861 	}
       
 16862 	supports( charCode ) {
       
 16863 		if ( charCode.charCodeAt ) {
       
 16864 			charCode = -1;
       
 16865 			console.warn(
       
 16866 				`supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`
       
 16867 			);
       
 16868 		}
       
 16869 		return (
       
 16870 			this.groups.findIndex(
       
 16871 				( s ) =>
       
 16872 					s.startcharCode <= charCode && charCode <= s.endcharCode
       
 16873 			) !== -1
       
 16874 		);
       
 16875 	}
       
 16876 	reverse( glyphID ) {
       
 16877 		console.warn( `reverse not implemented for cmap subtable format 8` );
       
 16878 		return {};
       
 16879 	}
       
 16880 	getSupportedCharCodes( preservePropNames = false ) {
       
 16881 		if ( preservePropNames ) return this.groups;
       
 16882 		return this.groups.map( ( v ) => ( {
       
 16883 			start: v.startcharCode,
       
 16884 			end: v.endcharCode,
       
 16885 		} ) );
       
 16886 	}
       
 16887 }
       
 16888 class SequentialMapGroup$1 {
       
 16889 	constructor( p ) {
       
 16890 		this.startcharCode = p.uint32;
       
 16891 		this.endcharCode = p.uint32;
       
 16892 		this.startGlyphID = p.uint32;
       
 16893 	}
       
 16894 }
       
 16895 class Format10 extends Subtable {
       
 16896 	constructor( p, platformID, encodingID ) {
       
 16897 		super( p, platformID, encodingID );
       
 16898 		this.format = 10;
       
 16899 		p.uint16;
       
 16900 		this.length = p.uint32;
       
 16901 		this.language = p.uint32;
       
 16902 		this.startCharCode = p.uint32;
       
 16903 		this.numChars = p.uint32;
       
 16904 		this.endCharCode = this.startCharCode + this.numChars;
       
 16905 		const getter = () =>
       
 16906 			[ ...new Array( this.numChars ) ].map( ( _ ) => p.uint16 );
       
 16907 		lazy$1( this, `glyphs`, getter );
       
 16908 	}
       
 16909 	supports( charCode ) {
       
 16910 		if ( charCode.charCodeAt ) {
       
 16911 			charCode = -1;
       
 16912 			console.warn(
       
 16913 				`supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`
       
 16914 			);
       
 16915 		}
       
 16916 		if ( charCode < this.startCharCode ) return false;
       
 16917 		if ( charCode > this.startCharCode + this.numChars ) return false;
       
 16918 		return charCode - this.startCharCode;
       
 16919 	}
       
 16920 	reverse( glyphID ) {
       
 16921 		console.warn( `reverse not implemented for cmap subtable format 10` );
       
 16922 		return {};
       
 16923 	}
       
 16924 	getSupportedCharCodes( preservePropNames = false ) {
       
 16925 		if ( preservePropNames ) {
       
 16926 			return [
       
 16927 				{
       
 16928 					startCharCode: this.startCharCode,
       
 16929 					endCharCode: this.endCharCode,
       
 16930 				},
       
 16931 			];
       
 16932 		}
       
 16933 		return [ { start: this.startCharCode, end: this.endCharCode } ];
       
 16934 	}
       
 16935 }
       
 16936 class Format12 extends Subtable {
       
 16937 	constructor( p, platformID, encodingID ) {
       
 16938 		super( p, platformID, encodingID );
       
 16939 		this.format = 12;
       
 16940 		p.uint16;
       
 16941 		this.length = p.uint32;
       
 16942 		this.language = p.uint32;
       
 16943 		this.numGroups = p.uint32;
       
 16944 		const getter = () =>
       
 16945 			[ ...new Array( this.numGroups ) ].map(
       
 16946 				( _ ) => new SequentialMapGroup( p )
       
 16947 			);
       
 16948 		lazy$1( this, `groups`, getter );
       
 16949 	}
       
 16950 	supports( charCode ) {
       
 16951 		if ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );
       
 16952 		if ( 55296 <= charCode && charCode <= 57343 ) return 0;
       
 16953 		if ( ( charCode & 65534 ) === 65534 || ( charCode & 65535 ) === 65535 )
       
 16954 			return 0;
       
 16955 		return (
       
 16956 			this.groups.findIndex(
       
 16957 				( s ) =>
       
 16958 					s.startCharCode <= charCode && charCode <= s.endCharCode
       
 16959 			) !== -1
       
 16960 		);
       
 16961 	}
       
 16962 	reverse( glyphID ) {
       
 16963 		for ( let group of this.groups ) {
       
 16964 			let start = group.startGlyphID;
       
 16965 			if ( start > glyphID ) continue;
       
 16966 			if ( start === glyphID ) return group.startCharCode;
       
 16967 			let end = start + ( group.endCharCode - group.startCharCode );
       
 16968 			if ( end < glyphID ) continue;
       
 16969 			const code = group.startCharCode + ( glyphID - start );
       
 16970 			return { code: code, unicode: String.fromCodePoint( code ) };
       
 16971 		}
       
 16972 		return {};
       
 16973 	}
       
 16974 	getSupportedCharCodes( preservePropNames = false ) {
       
 16975 		if ( preservePropNames ) return this.groups;
       
 16976 		return this.groups.map( ( v ) => ( {
       
 16977 			start: v.startCharCode,
       
 16978 			end: v.endCharCode,
       
 16979 		} ) );
       
 16980 	}
       
 16981 }
       
 16982 class SequentialMapGroup {
       
 16983 	constructor( p ) {
       
 16984 		this.startCharCode = p.uint32;
       
 16985 		this.endCharCode = p.uint32;
       
 16986 		this.startGlyphID = p.uint32;
       
 16987 	}
       
 16988 }
       
 16989 class Format13 extends Subtable {
       
 16990 	constructor( p, platformID, encodingID ) {
       
 16991 		super( p, platformID, encodingID );
       
 16992 		this.format = 13;
       
 16993 		p.uint16;
       
 16994 		this.length = p.uint32;
       
 16995 		this.language = p.uint32;
       
 16996 		this.numGroups = p.uint32;
       
 16997 		const getter = [ ...new Array( this.numGroups ) ].map(
       
 16998 			( _ ) => new ConstantMapGroup( p )
       
 16999 		);
       
 17000 		lazy$1( this, `groups`, getter );
       
 17001 	}
       
 17002 	supports( charCode ) {
       
 17003 		if ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );
       
 17004 		return (
       
 17005 			this.groups.findIndex(
       
 17006 				( s ) =>
       
 17007 					s.startCharCode <= charCode && charCode <= s.endCharCode
       
 17008 			) !== -1
       
 17009 		);
       
 17010 	}
       
 17011 	reverse( glyphID ) {
       
 17012 		console.warn( `reverse not implemented for cmap subtable format 13` );
       
 17013 		return {};
       
 17014 	}
       
 17015 	getSupportedCharCodes( preservePropNames = false ) {
       
 17016 		if ( preservePropNames ) return this.groups;
       
 17017 		return this.groups.map( ( v ) => ( {
       
 17018 			start: v.startCharCode,
       
 17019 			end: v.endCharCode,
       
 17020 		} ) );
       
 17021 	}
       
 17022 }
       
 17023 class ConstantMapGroup {
       
 17024 	constructor( p ) {
       
 17025 		this.startCharCode = p.uint32;
       
 17026 		this.endCharCode = p.uint32;
       
 17027 		this.glyphID = p.uint32;
       
 17028 	}
       
 17029 }
       
 17030 class Format14 extends Subtable {
       
 17031 	constructor( p, platformID, encodingID ) {
       
 17032 		super( p, platformID, encodingID );
       
 17033 		this.subTableStart = p.currentPosition;
       
 17034 		this.format = 14;
       
 17035 		this.length = p.uint32;
       
 17036 		this.numVarSelectorRecords = p.uint32;
       
 17037 		lazy$1( this, `varSelectors`, () =>
       
 17038 			[ ...new Array( this.numVarSelectorRecords ) ].map(
       
 17039 				( _ ) => new VariationSelector( p )
       
 17040 			)
       
 17041 		);
       
 17042 	}
       
 17043 	supports() {
       
 17044 		console.warn( `supports not implemented for cmap subtable format 14` );
       
 17045 		return 0;
       
 17046 	}
       
 17047 	getSupportedCharCodes() {
       
 17048 		console.warn(
       
 17049 			`getSupportedCharCodes not implemented for cmap subtable format 14`
       
 17050 		);
       
 17051 		return [];
       
 17052 	}
       
 17053 	reverse( glyphID ) {
       
 17054 		console.warn( `reverse not implemented for cmap subtable format 14` );
       
 17055 		return {};
       
 17056 	}
       
 17057 	supportsVariation( variation ) {
       
 17058 		let v = this.varSelector.find(
       
 17059 			( uvs ) => uvs.varSelector === variation
       
 17060 		);
       
 17061 		return v ? v : false;
       
 17062 	}
       
 17063 	getSupportedVariations() {
       
 17064 		return this.varSelectors.map( ( v ) => v.varSelector );
       
 17065 	}
       
 17066 }
       
 17067 class VariationSelector {
       
 17068 	constructor( p ) {
       
 17069 		this.varSelector = p.uint24;
       
 17070 		this.defaultUVSOffset = p.Offset32;
       
 17071 		this.nonDefaultUVSOffset = p.Offset32;
       
 17072 	}
       
 17073 }
       
 17074 function createSubTable( parser, platformID, encodingID ) {
       
 17075 	const format = parser.uint16;
       
 17076 	if ( format === 0 ) return new Format0( parser, platformID, encodingID );
       
 17077 	if ( format === 2 ) return new Format2( parser, platformID, encodingID );
       
 17078 	if ( format === 4 ) return new Format4( parser, platformID, encodingID );
       
 17079 	if ( format === 6 ) return new Format6( parser, platformID, encodingID );
       
 17080 	if ( format === 8 ) return new Format8( parser, platformID, encodingID );
       
 17081 	if ( format === 10 ) return new Format10( parser, platformID, encodingID );
       
 17082 	if ( format === 12 ) return new Format12( parser, platformID, encodingID );
       
 17083 	if ( format === 13 ) return new Format13( parser, platformID, encodingID );
       
 17084 	if ( format === 14 ) return new Format14( parser, platformID, encodingID );
       
 17085 	return {};
       
 17086 }
       
 17087 class cmap extends SimpleTable {
       
 17088 	constructor( dict, dataview ) {
       
 17089 		const { p: p } = super( dict, dataview );
       
 17090 		this.version = p.uint16;
       
 17091 		this.numTables = p.uint16;
       
 17092 		this.encodingRecords = [ ...new Array( this.numTables ) ].map(
       
 17093 			( _ ) => new EncodingRecord( p, this.tableStart )
       
 17094 		);
       
 17095 	}
       
 17096 	getSubTable( tableID ) {
       
 17097 		return this.encodingRecords[ tableID ].table;
       
 17098 	}
       
 17099 	getSupportedEncodings() {
       
 17100 		return this.encodingRecords.map( ( r ) => ( {
       
 17101 			platformID: r.platformID,
       
 17102 			encodingId: r.encodingID,
       
 17103 		} ) );
       
 17104 	}
       
 17105 	getSupportedCharCodes( platformID, encodingID ) {
       
 17106 		const recordID = this.encodingRecords.findIndex(
       
 17107 			( r ) => r.platformID === platformID && r.encodingID === encodingID
       
 17108 		);
       
 17109 		if ( recordID === -1 ) return false;
       
 17110 		const subtable = this.getSubTable( recordID );
       
 17111 		return subtable.getSupportedCharCodes();
       
 17112 	}
       
 17113 	reverse( glyphid ) {
       
 17114 		for ( let i = 0; i < this.numTables; i++ ) {
       
 17115 			let code = this.getSubTable( i ).reverse( glyphid );
       
 17116 			if ( code ) return code;
       
 17117 		}
       
 17118 	}
       
 17119 	getGlyphId( char ) {
       
 17120 		let last = 0;
       
 17121 		this.encodingRecords.some( ( _, tableID ) => {
       
 17122 			let t = this.getSubTable( tableID );
       
 17123 			if ( ! t.getGlyphId ) return false;
       
 17124 			last = t.getGlyphId( char );
       
 17125 			return last !== 0;
       
 17126 		} );
       
 17127 		return last;
       
 17128 	}
       
 17129 	supports( char ) {
       
 17130 		return this.encodingRecords.some( ( _, tableID ) => {
       
 17131 			const t = this.getSubTable( tableID );
       
 17132 			return t.supports && t.supports( char ) !== false;
       
 17133 		} );
       
 17134 	}
       
 17135 	supportsVariation( variation ) {
       
 17136 		return this.encodingRecords.some( ( _, tableID ) => {
       
 17137 			const t = this.getSubTable( tableID );
       
 17138 			return (
       
 17139 				t.supportsVariation &&
       
 17140 				t.supportsVariation( variation ) !== false
       
 17141 			);
       
 17142 		} );
       
 17143 	}
       
 17144 }
       
 17145 class EncodingRecord {
       
 17146 	constructor( p, tableStart ) {
       
 17147 		const platformID = ( this.platformID = p.uint16 );
       
 17148 		const encodingID = ( this.encodingID = p.uint16 );
       
 17149 		const offset = ( this.offset = p.Offset32 );
       
 17150 		lazy$1( this, `table`, () => {
       
 17151 			p.currentPosition = tableStart + offset;
       
 17152 			return createSubTable( p, platformID, encodingID );
       
 17153 		} );
       
 17154 	}
       
 17155 }
       
 17156 var cmap$1 = Object.freeze( { __proto__: null, cmap: cmap } );
       
 17157 class head extends SimpleTable {
       
 17158 	constructor( dict, dataview ) {
       
 17159 		const { p: p } = super( dict, dataview );
       
 17160 		this.load( {
       
 17161 			majorVersion: p.uint16,
       
 17162 			minorVersion: p.uint16,
       
 17163 			fontRevision: p.fixed,
       
 17164 			checkSumAdjustment: p.uint32,
       
 17165 			magicNumber: p.uint32,
       
 17166 			flags: p.flags( 16 ),
       
 17167 			unitsPerEm: p.uint16,
       
 17168 			created: p.longdatetime,
       
 17169 			modified: p.longdatetime,
       
 17170 			xMin: p.int16,
       
 17171 			yMin: p.int16,
       
 17172 			xMax: p.int16,
       
 17173 			yMax: p.int16,
       
 17174 			macStyle: p.flags( 16 ),
       
 17175 			lowestRecPPEM: p.uint16,
       
 17176 			fontDirectionHint: p.uint16,
       
 17177 			indexToLocFormat: p.uint16,
       
 17178 			glyphDataFormat: p.uint16,
       
 17179 		} );
       
 17180 	}
       
 17181 }
       
 17182 var head$1 = Object.freeze( { __proto__: null, head: head } );
       
 17183 class hhea extends SimpleTable {
       
 17184 	constructor( dict, dataview ) {
       
 17185 		const { p: p } = super( dict, dataview );
       
 17186 		this.majorVersion = p.uint16;
       
 17187 		this.minorVersion = p.uint16;
       
 17188 		this.ascender = p.fword;
       
 17189 		this.descender = p.fword;
       
 17190 		this.lineGap = p.fword;
       
 17191 		this.advanceWidthMax = p.ufword;
       
 17192 		this.minLeftSideBearing = p.fword;
       
 17193 		this.minRightSideBearing = p.fword;
       
 17194 		this.xMaxExtent = p.fword;
       
 17195 		this.caretSlopeRise = p.int16;
       
 17196 		this.caretSlopeRun = p.int16;
       
 17197 		this.caretOffset = p.int16;
       
 17198 		p.int16;
       
 17199 		p.int16;
       
 17200 		p.int16;
       
 17201 		p.int16;
       
 17202 		this.metricDataFormat = p.int16;
       
 17203 		this.numberOfHMetrics = p.uint16;
       
 17204 		p.verifyLength();
       
 17205 	}
       
 17206 }
       
 17207 var hhea$1 = Object.freeze( { __proto__: null, hhea: hhea } );
       
 17208 class hmtx extends SimpleTable {
       
 17209 	constructor( dict, dataview, tables ) {
       
 17210 		const { p: p } = super( dict, dataview );
       
 17211 		const numberOfHMetrics = tables.hhea.numberOfHMetrics;
       
 17212 		const numGlyphs = tables.maxp.numGlyphs;
       
 17213 		const metricsStart = p.currentPosition;
       
 17214 		lazy$1( this, `hMetrics`, () => {
       
 17215 			p.currentPosition = metricsStart;
       
 17216 			return [ ...new Array( numberOfHMetrics ) ].map(
       
 17217 				( _ ) => new LongHorMetric( p.uint16, p.int16 )
       
 17218 			);
       
 17219 		} );
       
 17220 		if ( numberOfHMetrics < numGlyphs ) {
       
 17221 			const lsbStart = metricsStart + numberOfHMetrics * 4;
       
 17222 			lazy$1( this, `leftSideBearings`, () => {
       
 17223 				p.currentPosition = lsbStart;
       
 17224 				return [ ...new Array( numGlyphs - numberOfHMetrics ) ].map(
       
 17225 					( _ ) => p.int16
       
 17226 				);
       
 17227 			} );
       
 17228 		}
       
 17229 	}
       
 17230 }
       
 17231 class LongHorMetric {
       
 17232 	constructor( w, b ) {
       
 17233 		this.advanceWidth = w;
       
 17234 		this.lsb = b;
       
 17235 	}
       
 17236 }
       
 17237 var hmtx$1 = Object.freeze( { __proto__: null, hmtx: hmtx } );
       
 17238 class maxp extends SimpleTable {
       
 17239 	constructor( dict, dataview ) {
       
 17240 		const { p: p } = super( dict, dataview );
       
 17241 		this.version = p.legacyFixed;
       
 17242 		this.numGlyphs = p.uint16;
       
 17243 		if ( this.version === 1 ) {
       
 17244 			this.maxPoints = p.uint16;
       
 17245 			this.maxContours = p.uint16;
       
 17246 			this.maxCompositePoints = p.uint16;
       
 17247 			this.maxCompositeContours = p.uint16;
       
 17248 			this.maxZones = p.uint16;
       
 17249 			this.maxTwilightPoints = p.uint16;
       
 17250 			this.maxStorage = p.uint16;
       
 17251 			this.maxFunctionDefs = p.uint16;
       
 17252 			this.maxInstructionDefs = p.uint16;
       
 17253 			this.maxStackElements = p.uint16;
       
 17254 			this.maxSizeOfInstructions = p.uint16;
       
 17255 			this.maxComponentElements = p.uint16;
       
 17256 			this.maxComponentDepth = p.uint16;
       
 17257 		}
       
 17258 		p.verifyLength();
       
 17259 	}
       
 17260 }
       
 17261 var maxp$1 = Object.freeze( { __proto__: null, maxp: maxp } );
       
 17262 class lib_font_browser_name extends SimpleTable {
       
 17263 	constructor( dict, dataview ) {
       
 17264 		const { p: p } = super( dict, dataview );
       
 17265 		this.format = p.uint16;
       
 17266 		this.count = p.uint16;
       
 17267 		this.stringOffset = p.Offset16;
       
 17268 		this.nameRecords = [ ...new Array( this.count ) ].map(
       
 17269 			( _ ) => new NameRecord( p, this )
       
 17270 		);
       
 17271 		if ( this.format === 1 ) {
       
 17272 			this.langTagCount = p.uint16;
       
 17273 			this.langTagRecords = [ ...new Array( this.langTagCount ) ].map(
       
 17274 				( _ ) => new LangTagRecord( p.uint16, p.Offset16 )
       
 17275 			);
       
 17276 		}
       
 17277 		this.stringStart = this.tableStart + this.stringOffset;
       
 17278 	}
       
 17279 	get( nameID ) {
       
 17280 		let record = this.nameRecords.find(
       
 17281 			( record ) => record.nameID === nameID
       
 17282 		);
       
 17283 		if ( record ) return record.string;
       
 17284 	}
       
 17285 }
       
 17286 class LangTagRecord {
       
 17287 	constructor( length, offset ) {
       
 17288 		this.length = length;
       
 17289 		this.offset = offset;
       
 17290 	}
       
 17291 }
       
 17292 class NameRecord {
       
 17293 	constructor( p, nameTable ) {
       
 17294 		this.platformID = p.uint16;
       
 17295 		this.encodingID = p.uint16;
       
 17296 		this.languageID = p.uint16;
       
 17297 		this.nameID = p.uint16;
       
 17298 		this.length = p.uint16;
       
 17299 		this.offset = p.Offset16;
       
 17300 		lazy$1( this, `string`, () => {
       
 17301 			p.currentPosition = nameTable.stringStart + this.offset;
       
 17302 			return decodeString( p, this );
       
 17303 		} );
       
 17304 	}
       
 17305 }
       
 17306 function decodeString( p, record ) {
       
 17307 	const { platformID: platformID, length: length } = record;
       
 17308 	if ( length === 0 ) return ``;
       
 17309 	if ( platformID === 0 || platformID === 3 ) {
       
 17310 		const str = [];
       
 17311 		for ( let i = 0, e = length / 2; i < e; i++ )
       
 17312 			str[ i ] = String.fromCharCode( p.uint16 );
       
 17313 		return str.join( `` );
       
 17314 	}
       
 17315 	const bytes = p.readBytes( length );
       
 17316 	const str = [];
       
 17317 	bytes.forEach( function ( b, i ) {
       
 17318 		str[ i ] = String.fromCharCode( b );
       
 17319 	} );
       
 17320 	return str.join( `` );
       
 17321 }
       
 17322 var name$1 = Object.freeze( { __proto__: null, name: lib_font_browser_name } );
       
 17323 class OS2 extends SimpleTable {
       
 17324 	constructor( dict, dataview ) {
       
 17325 		const { p: p } = super( dict, dataview );
       
 17326 		this.version = p.uint16;
       
 17327 		this.xAvgCharWidth = p.int16;
       
 17328 		this.usWeightClass = p.uint16;
       
 17329 		this.usWidthClass = p.uint16;
       
 17330 		this.fsType = p.uint16;
       
 17331 		this.ySubscriptXSize = p.int16;
       
 17332 		this.ySubscriptYSize = p.int16;
       
 17333 		this.ySubscriptXOffset = p.int16;
       
 17334 		this.ySubscriptYOffset = p.int16;
       
 17335 		this.ySuperscriptXSize = p.int16;
       
 17336 		this.ySuperscriptYSize = p.int16;
       
 17337 		this.ySuperscriptXOffset = p.int16;
       
 17338 		this.ySuperscriptYOffset = p.int16;
       
 17339 		this.yStrikeoutSize = p.int16;
       
 17340 		this.yStrikeoutPosition = p.int16;
       
 17341 		this.sFamilyClass = p.int16;
       
 17342 		this.panose = [ ...new Array( 10 ) ].map( ( _ ) => p.uint8 );
       
 17343 		this.ulUnicodeRange1 = p.flags( 32 );
       
 17344 		this.ulUnicodeRange2 = p.flags( 32 );
       
 17345 		this.ulUnicodeRange3 = p.flags( 32 );
       
 17346 		this.ulUnicodeRange4 = p.flags( 32 );
       
 17347 		this.achVendID = p.tag;
       
 17348 		this.fsSelection = p.uint16;
       
 17349 		this.usFirstCharIndex = p.uint16;
       
 17350 		this.usLastCharIndex = p.uint16;
       
 17351 		this.sTypoAscender = p.int16;
       
 17352 		this.sTypoDescender = p.int16;
       
 17353 		this.sTypoLineGap = p.int16;
       
 17354 		this.usWinAscent = p.uint16;
       
 17355 		this.usWinDescent = p.uint16;
       
 17356 		if ( this.version === 0 ) return p.verifyLength();
       
 17357 		this.ulCodePageRange1 = p.flags( 32 );
       
 17358 		this.ulCodePageRange2 = p.flags( 32 );
       
 17359 		if ( this.version === 1 ) return p.verifyLength();
       
 17360 		this.sxHeight = p.int16;
       
 17361 		this.sCapHeight = p.int16;
       
 17362 		this.usDefaultChar = p.uint16;
       
 17363 		this.usBreakChar = p.uint16;
       
 17364 		this.usMaxContext = p.uint16;
       
 17365 		if ( this.version <= 4 ) return p.verifyLength();
       
 17366 		this.usLowerOpticalPointSize = p.uint16;
       
 17367 		this.usUpperOpticalPointSize = p.uint16;
       
 17368 		if ( this.version === 5 ) return p.verifyLength();
       
 17369 	}
       
 17370 }
       
 17371 var OS2$1 = Object.freeze( { __proto__: null, OS2: OS2 } );
       
 17372 class post extends SimpleTable {
       
 17373 	constructor( dict, dataview ) {
       
 17374 		const { p: p } = super( dict, dataview );
       
 17375 		this.version = p.legacyFixed;
       
 17376 		this.italicAngle = p.fixed;
       
 17377 		this.underlinePosition = p.fword;
       
 17378 		this.underlineThickness = p.fword;
       
 17379 		this.isFixedPitch = p.uint32;
       
 17380 		this.minMemType42 = p.uint32;
       
 17381 		this.maxMemType42 = p.uint32;
       
 17382 		this.minMemType1 = p.uint32;
       
 17383 		this.maxMemType1 = p.uint32;
       
 17384 		if ( this.version === 1 || this.version === 3 ) return p.verifyLength();
       
 17385 		this.numGlyphs = p.uint16;
       
 17386 		if ( this.version === 2 ) {
       
 17387 			this.glyphNameIndex = [ ...new Array( this.numGlyphs ) ].map(
       
 17388 				( _ ) => p.uint16
       
 17389 			);
       
 17390 			this.namesOffset = p.currentPosition;
       
 17391 			this.glyphNameOffsets = [ 1 ];
       
 17392 			for ( let i = 0; i < this.numGlyphs; i++ ) {
       
 17393 				let index = this.glyphNameIndex[ i ];
       
 17394 				if ( index < macStrings.length ) {
       
 17395 					this.glyphNameOffsets.push( this.glyphNameOffsets[ i ] );
       
 17396 					continue;
       
 17397 				}
       
 17398 				let bytelength = p.int8;
       
 17399 				p.skip( bytelength );
       
 17400 				this.glyphNameOffsets.push(
       
 17401 					this.glyphNameOffsets[ i ] + bytelength + 1
       
 17402 				);
       
 17403 			}
       
 17404 		}
       
 17405 		if ( this.version === 2.5 ) {
       
 17406 			this.offset = [ ...new Array( this.numGlyphs ) ].map(
       
 17407 				( _ ) => p.int8
       
 17408 			);
       
 17409 		}
       
 17410 	}
       
 17411 	getGlyphName( glyphid ) {
       
 17412 		if ( this.version !== 2 ) {
       
 17413 			console.warn(
       
 17414 				`post table version ${ this.version } does not support glyph name lookups`
       
 17415 			);
       
 17416 			return ``;
       
 17417 		}
       
 17418 		let index = this.glyphNameIndex[ glyphid ];
       
 17419 		if ( index < 258 ) return macStrings[ index ];
       
 17420 		let offset = this.glyphNameOffsets[ glyphid ];
       
 17421 		let next = this.glyphNameOffsets[ glyphid + 1 ];
       
 17422 		let len = next - offset - 1;
       
 17423 		if ( len === 0 ) return `.notdef.`;
       
 17424 		this.parser.currentPosition = this.namesOffset + offset;
       
 17425 		const data = this.parser.readBytes(
       
 17426 			len,
       
 17427 			this.namesOffset + offset,
       
 17428 			8,
       
 17429 			true
       
 17430 		);
       
 17431 		return data.map( ( b ) => String.fromCharCode( b ) ).join( `` );
       
 17432 	}
       
 17433 }
       
 17434 const macStrings = [
       
 17435 	`.notdef`,
       
 17436 	`.null`,
       
 17437 	`nonmarkingreturn`,
       
 17438 	`space`,
       
 17439 	`exclam`,
       
 17440 	`quotedbl`,
       
 17441 	`numbersign`,
       
 17442 	`dollar`,
       
 17443 	`percent`,
       
 17444 	`ampersand`,
       
 17445 	`quotesingle`,
       
 17446 	`parenleft`,
       
 17447 	`parenright`,
       
 17448 	`asterisk`,
       
 17449 	`plus`,
       
 17450 	`comma`,
       
 17451 	`hyphen`,
       
 17452 	`period`,
       
 17453 	`slash`,
       
 17454 	`zero`,
       
 17455 	`one`,
       
 17456 	`two`,
       
 17457 	`three`,
       
 17458 	`four`,
       
 17459 	`five`,
       
 17460 	`six`,
       
 17461 	`seven`,
       
 17462 	`eight`,
       
 17463 	`nine`,
       
 17464 	`colon`,
       
 17465 	`semicolon`,
       
 17466 	`less`,
       
 17467 	`equal`,
       
 17468 	`greater`,
       
 17469 	`question`,
       
 17470 	`at`,
       
 17471 	`A`,
       
 17472 	`B`,
       
 17473 	`C`,
       
 17474 	`D`,
       
 17475 	`E`,
       
 17476 	`F`,
       
 17477 	`G`,
       
 17478 	`H`,
       
 17479 	`I`,
       
 17480 	`J`,
       
 17481 	`K`,
       
 17482 	`L`,
       
 17483 	`M`,
       
 17484 	`N`,
       
 17485 	`O`,
       
 17486 	`P`,
       
 17487 	`Q`,
       
 17488 	`R`,
       
 17489 	`S`,
       
 17490 	`T`,
       
 17491 	`U`,
       
 17492 	`V`,
       
 17493 	`W`,
       
 17494 	`X`,
       
 17495 	`Y`,
       
 17496 	`Z`,
       
 17497 	`bracketleft`,
       
 17498 	`backslash`,
       
 17499 	`bracketright`,
       
 17500 	`asciicircum`,
       
 17501 	`underscore`,
       
 17502 	`grave`,
       
 17503 	`a`,
       
 17504 	`b`,
       
 17505 	`c`,
       
 17506 	`d`,
       
 17507 	`e`,
       
 17508 	`f`,
       
 17509 	`g`,
       
 17510 	`h`,
       
 17511 	`i`,
       
 17512 	`j`,
       
 17513 	`k`,
       
 17514 	`l`,
       
 17515 	`m`,
       
 17516 	`n`,
       
 17517 	`o`,
       
 17518 	`p`,
       
 17519 	`q`,
       
 17520 	`r`,
       
 17521 	`s`,
       
 17522 	`t`,
       
 17523 	`u`,
       
 17524 	`v`,
       
 17525 	`w`,
       
 17526 	`x`,
       
 17527 	`y`,
       
 17528 	`z`,
       
 17529 	`braceleft`,
       
 17530 	`bar`,
       
 17531 	`braceright`,
       
 17532 	`asciitilde`,
       
 17533 	`Adieresis`,
       
 17534 	`Aring`,
       
 17535 	`Ccedilla`,
       
 17536 	`Eacute`,
       
 17537 	`Ntilde`,
       
 17538 	`Odieresis`,
       
 17539 	`Udieresis`,
       
 17540 	`aacute`,
       
 17541 	`agrave`,
       
 17542 	`acircumflex`,
       
 17543 	`adieresis`,
       
 17544 	`atilde`,
       
 17545 	`aring`,
       
 17546 	`ccedilla`,
       
 17547 	`eacute`,
       
 17548 	`egrave`,
       
 17549 	`ecircumflex`,
       
 17550 	`edieresis`,
       
 17551 	`iacute`,
       
 17552 	`igrave`,
       
 17553 	`icircumflex`,
       
 17554 	`idieresis`,
       
 17555 	`ntilde`,
       
 17556 	`oacute`,
       
 17557 	`ograve`,
       
 17558 	`ocircumflex`,
       
 17559 	`odieresis`,
       
 17560 	`otilde`,
       
 17561 	`uacute`,
       
 17562 	`ugrave`,
       
 17563 	`ucircumflex`,
       
 17564 	`udieresis`,
       
 17565 	`dagger`,
       
 17566 	`degree`,
       
 17567 	`cent`,
       
 17568 	`sterling`,
       
 17569 	`section`,
       
 17570 	`bullet`,
       
 17571 	`paragraph`,
       
 17572 	`germandbls`,
       
 17573 	`registered`,
       
 17574 	`copyright`,
       
 17575 	`trademark`,
       
 17576 	`acute`,
       
 17577 	`dieresis`,
       
 17578 	`notequal`,
       
 17579 	`AE`,
       
 17580 	`Oslash`,
       
 17581 	`infinity`,
       
 17582 	`plusminus`,
       
 17583 	`lessequal`,
       
 17584 	`greaterequal`,
       
 17585 	`yen`,
       
 17586 	`mu`,
       
 17587 	`partialdiff`,
       
 17588 	`summation`,
       
 17589 	`product`,
       
 17590 	`pi`,
       
 17591 	`integral`,
       
 17592 	`ordfeminine`,
       
 17593 	`ordmasculine`,
       
 17594 	`Omega`,
       
 17595 	`ae`,
       
 17596 	`oslash`,
       
 17597 	`questiondown`,
       
 17598 	`exclamdown`,
       
 17599 	`logicalnot`,
       
 17600 	`radical`,
       
 17601 	`florin`,
       
 17602 	`approxequal`,
       
 17603 	`Delta`,
       
 17604 	`guillemotleft`,
       
 17605 	`guillemotright`,
       
 17606 	`ellipsis`,
       
 17607 	`nonbreakingspace`,
       
 17608 	`Agrave`,
       
 17609 	`Atilde`,
       
 17610 	`Otilde`,
       
 17611 	`OE`,
       
 17612 	`oe`,
       
 17613 	`endash`,
       
 17614 	`emdash`,
       
 17615 	`quotedblleft`,
       
 17616 	`quotedblright`,
       
 17617 	`quoteleft`,
       
 17618 	`quoteright`,
       
 17619 	`divide`,
       
 17620 	`lozenge`,
       
 17621 	`ydieresis`,
       
 17622 	`Ydieresis`,
       
 17623 	`fraction`,
       
 17624 	`currency`,
       
 17625 	`guilsinglleft`,
       
 17626 	`guilsinglright`,
       
 17627 	`fi`,
       
 17628 	`fl`,
       
 17629 	`daggerdbl`,
       
 17630 	`periodcentered`,
       
 17631 	`quotesinglbase`,
       
 17632 	`quotedblbase`,
       
 17633 	`perthousand`,
       
 17634 	`Acircumflex`,
       
 17635 	`Ecircumflex`,
       
 17636 	`Aacute`,
       
 17637 	`Edieresis`,
       
 17638 	`Egrave`,
       
 17639 	`Iacute`,
       
 17640 	`Icircumflex`,
       
 17641 	`Idieresis`,
       
 17642 	`Igrave`,
       
 17643 	`Oacute`,
       
 17644 	`Ocircumflex`,
       
 17645 	`apple`,
       
 17646 	`Ograve`,
       
 17647 	`Uacute`,
       
 17648 	`Ucircumflex`,
       
 17649 	`Ugrave`,
       
 17650 	`dotlessi`,
       
 17651 	`circumflex`,
       
 17652 	`tilde`,
       
 17653 	`macron`,
       
 17654 	`breve`,
       
 17655 	`dotaccent`,
       
 17656 	`ring`,
       
 17657 	`cedilla`,
       
 17658 	`hungarumlaut`,
       
 17659 	`ogonek`,
       
 17660 	`caron`,
       
 17661 	`Lslash`,
       
 17662 	`lslash`,
       
 17663 	`Scaron`,
       
 17664 	`scaron`,
       
 17665 	`Zcaron`,
       
 17666 	`zcaron`,
       
 17667 	`brokenbar`,
       
 17668 	`Eth`,
       
 17669 	`eth`,
       
 17670 	`Yacute`,
       
 17671 	`yacute`,
       
 17672 	`Thorn`,
       
 17673 	`thorn`,
       
 17674 	`minus`,
       
 17675 	`multiply`,
       
 17676 	`onesuperior`,
       
 17677 	`twosuperior`,
       
 17678 	`threesuperior`,
       
 17679 	`onehalf`,
       
 17680 	`onequarter`,
       
 17681 	`threequarters`,
       
 17682 	`franc`,
       
 17683 	`Gbreve`,
       
 17684 	`gbreve`,
       
 17685 	`Idotaccent`,
       
 17686 	`Scedilla`,
       
 17687 	`scedilla`,
       
 17688 	`Cacute`,
       
 17689 	`cacute`,
       
 17690 	`Ccaron`,
       
 17691 	`ccaron`,
       
 17692 	`dcroat`,
       
 17693 ];
       
 17694 var post$1 = Object.freeze( { __proto__: null, post: post } );
       
 17695 class BASE extends SimpleTable {
       
 17696 	constructor( dict, dataview ) {
       
 17697 		const { p: p } = super( dict, dataview );
       
 17698 		this.majorVersion = p.uint16;
       
 17699 		this.minorVersion = p.uint16;
       
 17700 		this.horizAxisOffset = p.Offset16;
       
 17701 		this.vertAxisOffset = p.Offset16;
       
 17702 		lazy$1(
       
 17703 			this,
       
 17704 			`horizAxis`,
       
 17705 			() =>
       
 17706 				new AxisTable(
       
 17707 					{ offset: dict.offset + this.horizAxisOffset },
       
 17708 					dataview
       
 17709 				)
       
 17710 		);
       
 17711 		lazy$1(
       
 17712 			this,
       
 17713 			`vertAxis`,
       
 17714 			() =>
       
 17715 				new AxisTable(
       
 17716 					{ offset: dict.offset + this.vertAxisOffset },
       
 17717 					dataview
       
 17718 				)
       
 17719 		);
       
 17720 		if ( this.majorVersion === 1 && this.minorVersion === 1 ) {
       
 17721 			this.itemVarStoreOffset = p.Offset32;
       
 17722 			lazy$1(
       
 17723 				this,
       
 17724 				`itemVarStore`,
       
 17725 				() =>
       
 17726 					new AxisTable(
       
 17727 						{ offset: dict.offset + this.itemVarStoreOffset },
       
 17728 						dataview
       
 17729 					)
       
 17730 			);
       
 17731 		}
       
 17732 	}
       
 17733 }
       
 17734 class AxisTable extends SimpleTable {
       
 17735 	constructor( dict, dataview ) {
       
 17736 		const { p: p } = super( dict, dataview, `AxisTable` );
       
 17737 		this.baseTagListOffset = p.Offset16;
       
 17738 		this.baseScriptListOffset = p.Offset16;
       
 17739 		lazy$1(
       
 17740 			this,
       
 17741 			`baseTagList`,
       
 17742 			() =>
       
 17743 				new BaseTagListTable(
       
 17744 					{ offset: dict.offset + this.baseTagListOffset },
       
 17745 					dataview
       
 17746 				)
       
 17747 		);
       
 17748 		lazy$1(
       
 17749 			this,
       
 17750 			`baseScriptList`,
       
 17751 			() =>
       
 17752 				new BaseScriptListTable(
       
 17753 					{ offset: dict.offset + this.baseScriptListOffset },
       
 17754 					dataview
       
 17755 				)
       
 17756 		);
       
 17757 	}
       
 17758 }
       
 17759 class BaseTagListTable extends SimpleTable {
       
 17760 	constructor( dict, dataview ) {
       
 17761 		const { p: p } = super( dict, dataview, `BaseTagListTable` );
       
 17762 		this.baseTagCount = p.uint16;
       
 17763 		this.baselineTags = [ ...new Array( this.baseTagCount ) ].map(
       
 17764 			( _ ) => p.tag
       
 17765 		);
       
 17766 	}
       
 17767 }
       
 17768 class BaseScriptListTable extends SimpleTable {
       
 17769 	constructor( dict, dataview ) {
       
 17770 		const { p: p } = super( dict, dataview, `BaseScriptListTable` );
       
 17771 		this.baseScriptCount = p.uint16;
       
 17772 		const recordStart = p.currentPosition;
       
 17773 		lazy$1( this, `baseScriptRecords`, () => {
       
 17774 			p.currentPosition = recordStart;
       
 17775 			return [ ...new Array( this.baseScriptCount ) ].map(
       
 17776 				( _ ) => new BaseScriptRecord( this.start, p )
       
 17777 			);
       
 17778 		} );
       
 17779 	}
       
 17780 }
       
 17781 class BaseScriptRecord {
       
 17782 	constructor( baseScriptListTableStart, p ) {
       
 17783 		this.baseScriptTag = p.tag;
       
 17784 		this.baseScriptOffset = p.Offset16;
       
 17785 		lazy$1( this, `baseScriptTable`, () => {
       
 17786 			p.currentPosition =
       
 17787 				baseScriptListTableStart + this.baseScriptOffset;
       
 17788 			return new BaseScriptTable( p );
       
 17789 		} );
       
 17790 	}
       
 17791 }
       
 17792 class BaseScriptTable {
       
 17793 	constructor( p ) {
       
 17794 		this.start = p.currentPosition;
       
 17795 		this.baseValuesOffset = p.Offset16;
       
 17796 		this.defaultMinMaxOffset = p.Offset16;
       
 17797 		this.baseLangSysCount = p.uint16;
       
 17798 		this.baseLangSysRecords = [ ...new Array( this.baseLangSysCount ) ].map(
       
 17799 			( _ ) => new BaseLangSysRecord( this.start, p )
       
 17800 		);
       
 17801 		lazy$1( this, `baseValues`, () => {
       
 17802 			p.currentPosition = this.start + this.baseValuesOffset;
       
 17803 			return new BaseValuesTable( p );
       
 17804 		} );
       
 17805 		lazy$1( this, `defaultMinMax`, () => {
       
 17806 			p.currentPosition = this.start + this.defaultMinMaxOffset;
       
 17807 			return new MinMaxTable( p );
       
 17808 		} );
       
 17809 	}
       
 17810 }
       
 17811 class BaseLangSysRecord {
       
 17812 	constructor( baseScriptTableStart, p ) {
       
 17813 		this.baseLangSysTag = p.tag;
       
 17814 		this.minMaxOffset = p.Offset16;
       
 17815 		lazy$1( this, `minMax`, () => {
       
 17816 			p.currentPosition = baseScriptTableStart + this.minMaxOffset;
       
 17817 			return new MinMaxTable( p );
       
 17818 		} );
       
 17819 	}
       
 17820 }
       
 17821 class BaseValuesTable {
       
 17822 	constructor( p ) {
       
 17823 		this.parser = p;
       
 17824 		this.start = p.currentPosition;
       
 17825 		this.defaultBaselineIndex = p.uint16;
       
 17826 		this.baseCoordCount = p.uint16;
       
 17827 		this.baseCoords = [ ...new Array( this.baseCoordCount ) ].map(
       
 17828 			( _ ) => p.Offset16
       
 17829 		);
       
 17830 	}
       
 17831 	getTable( id ) {
       
 17832 		this.parser.currentPosition = this.start + this.baseCoords[ id ];
       
 17833 		return new BaseCoordTable( this.parser );
       
 17834 	}
       
 17835 }
       
 17836 class MinMaxTable {
       
 17837 	constructor( p ) {
       
 17838 		this.minCoord = p.Offset16;
       
 17839 		this.maxCoord = p.Offset16;
       
 17840 		this.featMinMaxCount = p.uint16;
       
 17841 		const recordStart = p.currentPosition;
       
 17842 		lazy$1( this, `featMinMaxRecords`, () => {
       
 17843 			p.currentPosition = recordStart;
       
 17844 			return [ ...new Array( this.featMinMaxCount ) ].map(
       
 17845 				( _ ) => new FeatMinMaxRecord( p )
       
 17846 			);
       
 17847 		} );
       
 17848 	}
       
 17849 }
       
 17850 class FeatMinMaxRecord {
       
 17851 	constructor( p ) {
       
 17852 		this.featureTableTag = p.tag;
       
 17853 		this.minCoord = p.Offset16;
       
 17854 		this.maxCoord = p.Offset16;
       
 17855 	}
       
 17856 }
       
 17857 class BaseCoordTable {
       
 17858 	constructor( p ) {
       
 17859 		this.baseCoordFormat = p.uint16;
       
 17860 		this.coordinate = p.int16;
       
 17861 		if ( this.baseCoordFormat === 2 ) {
       
 17862 			this.referenceGlyph = p.uint16;
       
 17863 			this.baseCoordPoint = p.uint16;
       
 17864 		}
       
 17865 		if ( this.baseCoordFormat === 3 ) {
       
 17866 			this.deviceTable = p.Offset16;
       
 17867 		}
       
 17868 	}
       
 17869 }
       
 17870 var BASE$1 = Object.freeze( { __proto__: null, BASE: BASE } );
       
 17871 class ClassDefinition {
       
 17872 	constructor( p ) {
       
 17873 		this.classFormat = p.uint16;
       
 17874 		if ( this.classFormat === 1 ) {
       
 17875 			this.startGlyphID = p.uint16;
       
 17876 			this.glyphCount = p.uint16;
       
 17877 			this.classValueArray = [ ...new Array( this.glyphCount ) ].map(
       
 17878 				( _ ) => p.uint16
       
 17879 			);
       
 17880 		}
       
 17881 		if ( this.classFormat === 2 ) {
       
 17882 			this.classRangeCount = p.uint16;
       
 17883 			this.classRangeRecords = [
       
 17884 				...new Array( this.classRangeCount ),
       
 17885 			].map( ( _ ) => new ClassRangeRecord( p ) );
       
 17886 		}
       
 17887 	}
       
 17888 }
       
 17889 class ClassRangeRecord {
       
 17890 	constructor( p ) {
       
 17891 		this.startGlyphID = p.uint16;
       
 17892 		this.endGlyphID = p.uint16;
       
 17893 		this.class = p.uint16;
       
 17894 	}
       
 17895 }
       
 17896 class CoverageTable extends ParsedData {
       
 17897 	constructor( p ) {
       
 17898 		super( p );
       
 17899 		this.coverageFormat = p.uint16;
       
 17900 		if ( this.coverageFormat === 1 ) {
       
 17901 			this.glyphCount = p.uint16;
       
 17902 			this.glyphArray = [ ...new Array( this.glyphCount ) ].map(
       
 17903 				( _ ) => p.uint16
       
 17904 			);
       
 17905 		}
       
 17906 		if ( this.coverageFormat === 2 ) {
       
 17907 			this.rangeCount = p.uint16;
       
 17908 			this.rangeRecords = [ ...new Array( this.rangeCount ) ].map(
       
 17909 				( _ ) => new CoverageRangeRecord( p )
       
 17910 			);
       
 17911 		}
       
 17912 	}
       
 17913 }
       
 17914 class CoverageRangeRecord {
       
 17915 	constructor( p ) {
       
 17916 		this.startGlyphID = p.uint16;
       
 17917 		this.endGlyphID = p.uint16;
       
 17918 		this.startCoverageIndex = p.uint16;
       
 17919 	}
       
 17920 }
       
 17921 class ItemVariationStoreTable {
       
 17922 	constructor( table, p ) {
       
 17923 		this.table = table;
       
 17924 		this.parser = p;
       
 17925 		this.start = p.currentPosition;
       
 17926 		this.format = p.uint16;
       
 17927 		this.variationRegionListOffset = p.Offset32;
       
 17928 		this.itemVariationDataCount = p.uint16;
       
 17929 		this.itemVariationDataOffsets = [
       
 17930 			...new Array( this.itemVariationDataCount ),
       
 17931 		].map( ( _ ) => p.Offset32 );
       
 17932 	}
       
 17933 }
       
 17934 class GDEF extends SimpleTable {
       
 17935 	constructor( dict, dataview ) {
       
 17936 		const { p: p } = super( dict, dataview );
       
 17937 		this.majorVersion = p.uint16;
       
 17938 		this.minorVersion = p.uint16;
       
 17939 		this.glyphClassDefOffset = p.Offset16;
       
 17940 		lazy$1( this, `glyphClassDefs`, () => {
       
 17941 			if ( this.glyphClassDefOffset === 0 ) return undefined;
       
 17942 			p.currentPosition = this.tableStart + this.glyphClassDefOffset;
       
 17943 			return new ClassDefinition( p );
       
 17944 		} );
       
 17945 		this.attachListOffset = p.Offset16;
       
 17946 		lazy$1( this, `attachList`, () => {
       
 17947 			if ( this.attachListOffset === 0 ) return undefined;
       
 17948 			p.currentPosition = this.tableStart + this.attachListOffset;
       
 17949 			return new AttachList( p );
       
 17950 		} );
       
 17951 		this.ligCaretListOffset = p.Offset16;
       
 17952 		lazy$1( this, `ligCaretList`, () => {
       
 17953 			if ( this.ligCaretListOffset === 0 ) return undefined;
       
 17954 			p.currentPosition = this.tableStart + this.ligCaretListOffset;
       
 17955 			return new LigCaretList( p );
       
 17956 		} );
       
 17957 		this.markAttachClassDefOffset = p.Offset16;
       
 17958 		lazy$1( this, `markAttachClassDef`, () => {
       
 17959 			if ( this.markAttachClassDefOffset === 0 ) return undefined;
       
 17960 			p.currentPosition = this.tableStart + this.markAttachClassDefOffset;
       
 17961 			return new ClassDefinition( p );
       
 17962 		} );
       
 17963 		if ( this.minorVersion >= 2 ) {
       
 17964 			this.markGlyphSetsDefOffset = p.Offset16;
       
 17965 			lazy$1( this, `markGlyphSetsDef`, () => {
       
 17966 				if ( this.markGlyphSetsDefOffset === 0 ) return undefined;
       
 17967 				p.currentPosition =
       
 17968 					this.tableStart + this.markGlyphSetsDefOffset;
       
 17969 				return new MarkGlyphSetsTable( p );
       
 17970 			} );
       
 17971 		}
       
 17972 		if ( this.minorVersion === 3 ) {
       
 17973 			this.itemVarStoreOffset = p.Offset32;
       
 17974 			lazy$1( this, `itemVarStore`, () => {
       
 17975 				if ( this.itemVarStoreOffset === 0 ) return undefined;
       
 17976 				p.currentPosition = this.tableStart + this.itemVarStoreOffset;
       
 17977 				return new ItemVariationStoreTable( p );
       
 17978 			} );
       
 17979 		}
       
 17980 	}
       
 17981 }
       
 17982 class AttachList extends ParsedData {
       
 17983 	constructor( p ) {
       
 17984 		super( p );
       
 17985 		this.coverageOffset = p.Offset16;
       
 17986 		this.glyphCount = p.uint16;
       
 17987 		this.attachPointOffsets = [ ...new Array( this.glyphCount ) ].map(
       
 17988 			( _ ) => p.Offset16
       
 17989 		);
       
 17990 	}
       
 17991 	getPoint( pointID ) {
       
 17992 		this.parser.currentPosition =
       
 17993 			this.start + this.attachPointOffsets[ pointID ];
       
 17994 		return new AttachPoint( this.parser );
       
 17995 	}
       
 17996 }
       
 17997 class AttachPoint {
       
 17998 	constructor( p ) {
       
 17999 		this.pointCount = p.uint16;
       
 18000 		this.pointIndices = [ ...new Array( this.pointCount ) ].map(
       
 18001 			( _ ) => p.uint16
       
 18002 		);
       
 18003 	}
       
 18004 }
       
 18005 class LigCaretList extends ParsedData {
       
 18006 	constructor( p ) {
       
 18007 		super( p );
       
 18008 		this.coverageOffset = p.Offset16;
       
 18009 		lazy$1( this, `coverage`, () => {
       
 18010 			p.currentPosition = this.start + this.coverageOffset;
       
 18011 			return new CoverageTable( p );
       
 18012 		} );
       
 18013 		this.ligGlyphCount = p.uint16;
       
 18014 		this.ligGlyphOffsets = [ ...new Array( this.ligGlyphCount ) ].map(
       
 18015 			( _ ) => p.Offset16
       
 18016 		);
       
 18017 	}
       
 18018 	getLigGlyph( ligGlyphID ) {
       
 18019 		this.parser.currentPosition =
       
 18020 			this.start + this.ligGlyphOffsets[ ligGlyphID ];
       
 18021 		return new LigGlyph( this.parser );
       
 18022 	}
       
 18023 }
       
 18024 class LigGlyph extends ParsedData {
       
 18025 	constructor( p ) {
       
 18026 		super( p );
       
 18027 		this.caretCount = p.uint16;
       
 18028 		this.caretValueOffsets = [ ...new Array( this.caretCount ) ].map(
       
 18029 			( _ ) => p.Offset16
       
 18030 		);
       
 18031 	}
       
 18032 	getCaretValue( caretID ) {
       
 18033 		this.parser.currentPosition =
       
 18034 			this.start + this.caretValueOffsets[ caretID ];
       
 18035 		return new CaretValue( this.parser );
       
 18036 	}
       
 18037 }
       
 18038 class CaretValue {
       
 18039 	constructor( p ) {
       
 18040 		this.caretValueFormat = p.uint16;
       
 18041 		if ( this.caretValueFormat === 1 ) {
       
 18042 			this.coordinate = p.int16;
       
 18043 		}
       
 18044 		if ( this.caretValueFormat === 2 ) {
       
 18045 			this.caretValuePointIndex = p.uint16;
       
 18046 		}
       
 18047 		if ( this.caretValueFormat === 3 ) {
       
 18048 			this.coordinate = p.int16;
       
 18049 			this.deviceOffset = p.Offset16;
       
 18050 		}
       
 18051 	}
       
 18052 }
       
 18053 class MarkGlyphSetsTable extends ParsedData {
       
 18054 	constructor( p ) {
       
 18055 		super( p );
       
 18056 		this.markGlyphSetTableFormat = p.uint16;
       
 18057 		this.markGlyphSetCount = p.uint16;
       
 18058 		this.coverageOffsets = [ ...new Array( this.markGlyphSetCount ) ].map(
       
 18059 			( _ ) => p.Offset32
       
 18060 		);
       
 18061 	}
       
 18062 	getMarkGlyphSet( markGlyphSetID ) {
       
 18063 		this.parser.currentPosition =
       
 18064 			this.start + this.coverageOffsets[ markGlyphSetID ];
       
 18065 		return new CoverageTable( this.parser );
       
 18066 	}
       
 18067 }
       
 18068 var GDEF$1 = Object.freeze( { __proto__: null, GDEF: GDEF } );
       
 18069 class ScriptList extends ParsedData {
       
 18070 	static EMPTY = { scriptCount: 0, scriptRecords: [] };
       
 18071 	constructor( p ) {
       
 18072 		super( p );
       
 18073 		this.scriptCount = p.uint16;
       
 18074 		this.scriptRecords = [ ...new Array( this.scriptCount ) ].map(
       
 18075 			( _ ) => new ScriptRecord( p )
       
 18076 		);
       
 18077 	}
       
 18078 }
       
 18079 class ScriptRecord {
       
 18080 	constructor( p ) {
       
 18081 		this.scriptTag = p.tag;
       
 18082 		this.scriptOffset = p.Offset16;
       
 18083 	}
       
 18084 }
       
 18085 class ScriptTable extends ParsedData {
       
 18086 	constructor( p ) {
       
 18087 		super( p );
       
 18088 		this.defaultLangSys = p.Offset16;
       
 18089 		this.langSysCount = p.uint16;
       
 18090 		this.langSysRecords = [ ...new Array( this.langSysCount ) ].map(
       
 18091 			( _ ) => new LangSysRecord( p )
       
 18092 		);
       
 18093 	}
       
 18094 }
       
 18095 class LangSysRecord {
       
 18096 	constructor( p ) {
       
 18097 		this.langSysTag = p.tag;
       
 18098 		this.langSysOffset = p.Offset16;
       
 18099 	}
       
 18100 }
       
 18101 class LangSysTable {
       
 18102 	constructor( p ) {
       
 18103 		this.lookupOrder = p.Offset16;
       
 18104 		this.requiredFeatureIndex = p.uint16;
       
 18105 		this.featureIndexCount = p.uint16;
       
 18106 		this.featureIndices = [ ...new Array( this.featureIndexCount ) ].map(
       
 18107 			( _ ) => p.uint16
       
 18108 		);
       
 18109 	}
       
 18110 }
       
 18111 class FeatureList extends ParsedData {
       
 18112 	static EMPTY = { featureCount: 0, featureRecords: [] };
       
 18113 	constructor( p ) {
       
 18114 		super( p );
       
 18115 		this.featureCount = p.uint16;
       
 18116 		this.featureRecords = [ ...new Array( this.featureCount ) ].map(
       
 18117 			( _ ) => new FeatureRecord( p )
       
 18118 		);
       
 18119 	}
       
 18120 }
       
 18121 class FeatureRecord {
       
 18122 	constructor( p ) {
       
 18123 		this.featureTag = p.tag;
       
 18124 		this.featureOffset = p.Offset16;
       
 18125 	}
       
 18126 }
       
 18127 class FeatureTable extends ParsedData {
       
 18128 	constructor( p ) {
       
 18129 		super( p );
       
 18130 		this.featureParams = p.Offset16;
       
 18131 		this.lookupIndexCount = p.uint16;
       
 18132 		this.lookupListIndices = [ ...new Array( this.lookupIndexCount ) ].map(
       
 18133 			( _ ) => p.uint16
       
 18134 		);
       
 18135 	}
       
 18136 	getFeatureParams() {
       
 18137 		if ( this.featureParams > 0 ) {
       
 18138 			const p = this.parser;
       
 18139 			p.currentPosition = this.start + this.featureParams;
       
 18140 			const tag = this.featureTag;
       
 18141 			if ( tag === `size` ) return new Size( p );
       
 18142 			if ( tag.startsWith( `cc` ) ) return new CharacterVariant( p );
       
 18143 			if ( tag.startsWith( `ss` ) ) return new StylisticSet( p );
       
 18144 		}
       
 18145 	}
       
 18146 }
       
 18147 class CharacterVariant {
       
 18148 	constructor( p ) {
       
 18149 		this.format = p.uint16;
       
 18150 		this.featUiLabelNameId = p.uint16;
       
 18151 		this.featUiTooltipTextNameId = p.uint16;
       
 18152 		this.sampleTextNameId = p.uint16;
       
 18153 		this.numNamedParameters = p.uint16;
       
 18154 		this.firstParamUiLabelNameId = p.uint16;
       
 18155 		this.charCount = p.uint16;
       
 18156 		this.character = [ ...new Array( this.charCount ) ].map(
       
 18157 			( _ ) => p.uint24
       
 18158 		);
       
 18159 	}
       
 18160 }
       
 18161 class Size {
       
 18162 	constructor( p ) {
       
 18163 		this.designSize = p.uint16;
       
 18164 		this.subfamilyIdentifier = p.uint16;
       
 18165 		this.subfamilyNameID = p.uint16;
       
 18166 		this.smallEnd = p.uint16;
       
 18167 		this.largeEnd = p.uint16;
       
 18168 	}
       
 18169 }
       
 18170 class StylisticSet {
       
 18171 	constructor( p ) {
       
 18172 		this.version = p.uint16;
       
 18173 		this.UINameID = p.uint16;
       
 18174 	}
       
 18175 }
       
 18176 function undoCoverageOffsetParsing( instance ) {
       
 18177 	instance.parser.currentPosition -= 2;
       
 18178 	delete instance.coverageOffset;
       
 18179 	delete instance.getCoverageTable;
       
 18180 }
       
 18181 class LookupType$1 extends ParsedData {
       
 18182 	constructor( p ) {
       
 18183 		super( p );
       
 18184 		this.substFormat = p.uint16;
       
 18185 		this.coverageOffset = p.Offset16;
       
 18186 	}
       
 18187 	getCoverageTable() {
       
 18188 		let p = this.parser;
       
 18189 		p.currentPosition = this.start + this.coverageOffset;
       
 18190 		return new CoverageTable( p );
       
 18191 	}
       
 18192 }
       
 18193 class SubstLookupRecord {
       
 18194 	constructor( p ) {
       
 18195 		this.glyphSequenceIndex = p.uint16;
       
 18196 		this.lookupListIndex = p.uint16;
       
 18197 	}
       
 18198 }
       
 18199 class LookupType1$1 extends LookupType$1 {
       
 18200 	constructor( p ) {
       
 18201 		super( p );
       
 18202 		this.deltaGlyphID = p.int16;
       
 18203 	}
       
 18204 }
       
 18205 class LookupType2$1 extends LookupType$1 {
       
 18206 	constructor( p ) {
       
 18207 		super( p );
       
 18208 		this.sequenceCount = p.uint16;
       
 18209 		this.sequenceOffsets = [ ...new Array( this.sequenceCount ) ].map(
       
 18210 			( _ ) => p.Offset16
       
 18211 		);
       
 18212 	}
       
 18213 	getSequence( index ) {
       
 18214 		let p = this.parser;
       
 18215 		p.currentPosition = this.start + this.sequenceOffsets[ index ];
       
 18216 		return new SequenceTable( p );
       
 18217 	}
       
 18218 }
       
 18219 class SequenceTable {
       
 18220 	constructor( p ) {
       
 18221 		this.glyphCount = p.uint16;
       
 18222 		this.substituteGlyphIDs = [ ...new Array( this.glyphCount ) ].map(
       
 18223 			( _ ) => p.uint16
       
 18224 		);
       
 18225 	}
       
 18226 }
       
 18227 class LookupType3$1 extends LookupType$1 {
       
 18228 	constructor( p ) {
       
 18229 		super( p );
       
 18230 		this.alternateSetCount = p.uint16;
       
 18231 		this.alternateSetOffsets = [
       
 18232 			...new Array( this.alternateSetCount ),
       
 18233 		].map( ( _ ) => p.Offset16 );
       
 18234 	}
       
 18235 	getAlternateSet( index ) {
       
 18236 		let p = this.parser;
       
 18237 		p.currentPosition = this.start + this.alternateSetOffsets[ index ];
       
 18238 		return new AlternateSetTable( p );
       
 18239 	}
       
 18240 }
       
 18241 class AlternateSetTable {
       
 18242 	constructor( p ) {
       
 18243 		this.glyphCount = p.uint16;
       
 18244 		this.alternateGlyphIDs = [ ...new Array( this.glyphCount ) ].map(
       
 18245 			( _ ) => p.uint16
       
 18246 		);
       
 18247 	}
       
 18248 }
       
 18249 class LookupType4$1 extends LookupType$1 {
       
 18250 	constructor( p ) {
       
 18251 		super( p );
       
 18252 		this.ligatureSetCount = p.uint16;
       
 18253 		this.ligatureSetOffsets = [ ...new Array( this.ligatureSetCount ) ].map(
       
 18254 			( _ ) => p.Offset16
       
 18255 		);
       
 18256 	}
       
 18257 	getLigatureSet( index ) {
       
 18258 		let p = this.parser;
       
 18259 		p.currentPosition = this.start + this.ligatureSetOffsets[ index ];
       
 18260 		return new LigatureSetTable( p );
       
 18261 	}
       
 18262 }
       
 18263 class LigatureSetTable extends ParsedData {
       
 18264 	constructor( p ) {
       
 18265 		super( p );
       
 18266 		this.ligatureCount = p.uint16;
       
 18267 		this.ligatureOffsets = [ ...new Array( this.ligatureCount ) ].map(
       
 18268 			( _ ) => p.Offset16
       
 18269 		);
       
 18270 	}
       
 18271 	getLigature( index ) {
       
 18272 		let p = this.parser;
       
 18273 		p.currentPosition = this.start + this.ligatureOffsets[ index ];
       
 18274 		return new LigatureTable( p );
       
 18275 	}
       
 18276 }
       
 18277 class LigatureTable {
       
 18278 	constructor( p ) {
       
 18279 		this.ligatureGlyph = p.uint16;
       
 18280 		this.componentCount = p.uint16;
       
 18281 		this.componentGlyphIDs = [
       
 18282 			...new Array( this.componentCount - 1 ),
       
 18283 		].map( ( _ ) => p.uint16 );
       
 18284 	}
       
 18285 }
       
 18286 class LookupType5$1 extends LookupType$1 {
       
 18287 	constructor( p ) {
       
 18288 		super( p );
       
 18289 		if ( this.substFormat === 1 ) {
       
 18290 			this.subRuleSetCount = p.uint16;
       
 18291 			this.subRuleSetOffsets = [
       
 18292 				...new Array( this.subRuleSetCount ),
       
 18293 			].map( ( _ ) => p.Offset16 );
       
 18294 		}
       
 18295 		if ( this.substFormat === 2 ) {
       
 18296 			this.classDefOffset = p.Offset16;
       
 18297 			this.subClassSetCount = p.uint16;
       
 18298 			this.subClassSetOffsets = [
       
 18299 				...new Array( this.subClassSetCount ),
       
 18300 			].map( ( _ ) => p.Offset16 );
       
 18301 		}
       
 18302 		if ( this.substFormat === 3 ) {
       
 18303 			undoCoverageOffsetParsing( this );
       
 18304 			this.glyphCount = p.uint16;
       
 18305 			this.substitutionCount = p.uint16;
       
 18306 			this.coverageOffsets = [ ...new Array( this.glyphCount ) ].map(
       
 18307 				( _ ) => p.Offset16
       
 18308 			);
       
 18309 			this.substLookupRecords = [
       
 18310 				...new Array( this.substitutionCount ),
       
 18311 			].map( ( _ ) => new SubstLookupRecord( p ) );
       
 18312 		}
       
 18313 	}
       
 18314 	getSubRuleSet( index ) {
       
 18315 		if ( this.substFormat !== 1 )
       
 18316 			throw new Error(
       
 18317 				`lookup type 5.${ this.substFormat } has no subrule sets.`
       
 18318 			);
       
 18319 		let p = this.parser;
       
 18320 		p.currentPosition = this.start + this.subRuleSetOffsets[ index ];
       
 18321 		return new SubRuleSetTable( p );
       
 18322 	}
       
 18323 	getSubClassSet( index ) {
       
 18324 		if ( this.substFormat !== 2 )
       
 18325 			throw new Error(
       
 18326 				`lookup type 5.${ this.substFormat } has no subclass sets.`
       
 18327 			);
       
 18328 		let p = this.parser;
       
 18329 		p.currentPosition = this.start + this.subClassSetOffsets[ index ];
       
 18330 		return new SubClassSetTable( p );
       
 18331 	}
       
 18332 	getCoverageTable( index ) {
       
 18333 		if ( this.substFormat !== 3 && ! index )
       
 18334 			return super.getCoverageTable();
       
 18335 		if ( ! index )
       
 18336 			throw new Error(
       
 18337 				`lookup type 5.${ this.substFormat } requires an coverage table index.`
       
 18338 			);
       
 18339 		let p = this.parser;
       
 18340 		p.currentPosition = this.start + this.coverageOffsets[ index ];
       
 18341 		return new CoverageTable( p );
       
 18342 	}
       
 18343 }
       
 18344 class SubRuleSetTable extends ParsedData {
       
 18345 	constructor( p ) {
       
 18346 		super( p );
       
 18347 		this.subRuleCount = p.uint16;
       
 18348 		this.subRuleOffsets = [ ...new Array( this.subRuleCount ) ].map(
       
 18349 			( _ ) => p.Offset16
       
 18350 		);
       
 18351 	}
       
 18352 	getSubRule( index ) {
       
 18353 		let p = this.parser;
       
 18354 		p.currentPosition = this.start + this.subRuleOffsets[ index ];
       
 18355 		return new SubRuleTable( p );
       
 18356 	}
       
 18357 }
       
 18358 class SubRuleTable {
       
 18359 	constructor( p ) {
       
 18360 		this.glyphCount = p.uint16;
       
 18361 		this.substitutionCount = p.uint16;
       
 18362 		this.inputSequence = [ ...new Array( this.glyphCount - 1 ) ].map(
       
 18363 			( _ ) => p.uint16
       
 18364 		);
       
 18365 		this.substLookupRecords = [
       
 18366 			...new Array( this.substitutionCount ),
       
 18367 		].map( ( _ ) => new SubstLookupRecord( p ) );
       
 18368 	}
       
 18369 }
       
 18370 class SubClassSetTable extends ParsedData {
       
 18371 	constructor( p ) {
       
 18372 		super( p );
       
 18373 		this.subClassRuleCount = p.uint16;
       
 18374 		this.subClassRuleOffsets = [
       
 18375 			...new Array( this.subClassRuleCount ),
       
 18376 		].map( ( _ ) => p.Offset16 );
       
 18377 	}
       
 18378 	getSubClass( index ) {
       
 18379 		let p = this.parser;
       
 18380 		p.currentPosition = this.start + this.subClassRuleOffsets[ index ];
       
 18381 		return new SubClassRuleTable( p );
       
 18382 	}
       
 18383 }
       
 18384 class SubClassRuleTable extends SubRuleTable {
       
 18385 	constructor( p ) {
       
 18386 		super( p );
       
 18387 	}
       
 18388 }
       
 18389 class LookupType6$1 extends LookupType$1 {
       
 18390 	constructor( p ) {
       
 18391 		super( p );
       
 18392 		if ( this.substFormat === 1 ) {
       
 18393 			this.chainSubRuleSetCount = p.uint16;
       
 18394 			this.chainSubRuleSetOffsets = [
       
 18395 				...new Array( this.chainSubRuleSetCount ),
       
 18396 			].map( ( _ ) => p.Offset16 );
       
 18397 		}
       
 18398 		if ( this.substFormat === 2 ) {
       
 18399 			this.backtrackClassDefOffset = p.Offset16;
       
 18400 			this.inputClassDefOffset = p.Offset16;
       
 18401 			this.lookaheadClassDefOffset = p.Offset16;
       
 18402 			this.chainSubClassSetCount = p.uint16;
       
 18403 			this.chainSubClassSetOffsets = [
       
 18404 				...new Array( this.chainSubClassSetCount ),
       
 18405 			].map( ( _ ) => p.Offset16 );
       
 18406 		}
       
 18407 		if ( this.substFormat === 3 ) {
       
 18408 			undoCoverageOffsetParsing( this );
       
 18409 			this.backtrackGlyphCount = p.uint16;
       
 18410 			this.backtrackCoverageOffsets = [
       
 18411 				...new Array( this.backtrackGlyphCount ),
       
 18412 			].map( ( _ ) => p.Offset16 );
       
 18413 			this.inputGlyphCount = p.uint16;
       
 18414 			this.inputCoverageOffsets = [
       
 18415 				...new Array( this.inputGlyphCount ),
       
 18416 			].map( ( _ ) => p.Offset16 );
       
 18417 			this.lookaheadGlyphCount = p.uint16;
       
 18418 			this.lookaheadCoverageOffsets = [
       
 18419 				...new Array( this.lookaheadGlyphCount ),
       
 18420 			].map( ( _ ) => p.Offset16 );
       
 18421 			this.seqLookupCount = p.uint16;
       
 18422 			this.seqLookupRecords = [
       
 18423 				...new Array( this.substitutionCount ),
       
 18424 			].map( ( _ ) => new SequenceLookupRecord( p ) );
       
 18425 		}
       
 18426 	}
       
 18427 	getChainSubRuleSet( index ) {
       
 18428 		if ( this.substFormat !== 1 )
       
 18429 			throw new Error(
       
 18430 				`lookup type 6.${ this.substFormat } has no chainsubrule sets.`
       
 18431 			);
       
 18432 		let p = this.parser;
       
 18433 		p.currentPosition = this.start + this.chainSubRuleSetOffsets[ index ];
       
 18434 		return new ChainSubRuleSetTable( p );
       
 18435 	}
       
 18436 	getChainSubClassSet( index ) {
       
 18437 		if ( this.substFormat !== 2 )
       
 18438 			throw new Error(
       
 18439 				`lookup type 6.${ this.substFormat } has no chainsubclass sets.`
       
 18440 			);
       
 18441 		let p = this.parser;
       
 18442 		p.currentPosition = this.start + this.chainSubClassSetOffsets[ index ];
       
 18443 		return new ChainSubClassSetTable( p );
       
 18444 	}
       
 18445 	getCoverageFromOffset( offset ) {
       
 18446 		if ( this.substFormat !== 3 )
       
 18447 			throw new Error(
       
 18448 				`lookup type 6.${ this.substFormat } does not use contextual coverage offsets.`
       
 18449 			);
       
 18450 		let p = this.parser;
       
 18451 		p.currentPosition = this.start + offset;
       
 18452 		return new CoverageTable( p );
       
 18453 	}
       
 18454 }
       
 18455 class ChainSubRuleSetTable extends ParsedData {
       
 18456 	constructor( p ) {
       
 18457 		super( p );
       
 18458 		this.chainSubRuleCount = p.uint16;
       
 18459 		this.chainSubRuleOffsets = [
       
 18460 			...new Array( this.chainSubRuleCount ),
       
 18461 		].map( ( _ ) => p.Offset16 );
       
 18462 	}
       
 18463 	getSubRule( index ) {
       
 18464 		let p = this.parser;
       
 18465 		p.currentPosition = this.start + this.chainSubRuleOffsets[ index ];
       
 18466 		return new ChainSubRuleTable( p );
       
 18467 	}
       
 18468 }
       
 18469 class ChainSubRuleTable {
       
 18470 	constructor( p ) {
       
 18471 		this.backtrackGlyphCount = p.uint16;
       
 18472 		this.backtrackSequence = [
       
 18473 			...new Array( this.backtrackGlyphCount ),
       
 18474 		].map( ( _ ) => p.uint16 );
       
 18475 		this.inputGlyphCount = p.uint16;
       
 18476 		this.inputSequence = [ ...new Array( this.inputGlyphCount - 1 ) ].map(
       
 18477 			( _ ) => p.uint16
       
 18478 		);
       
 18479 		this.lookaheadGlyphCount = p.uint16;
       
 18480 		this.lookAheadSequence = [
       
 18481 			...new Array( this.lookAheadGlyphCount ),
       
 18482 		].map( ( _ ) => p.uint16 );
       
 18483 		this.substitutionCount = p.uint16;
       
 18484 		this.substLookupRecords = [ ...new Array( this.SubstCount ) ].map(
       
 18485 			( _ ) => new SubstLookupRecord( p )
       
 18486 		);
       
 18487 	}
       
 18488 }
       
 18489 class ChainSubClassSetTable extends ParsedData {
       
 18490 	constructor( p ) {
       
 18491 		super( p );
       
 18492 		this.chainSubClassRuleCount = p.uint16;
       
 18493 		this.chainSubClassRuleOffsets = [
       
 18494 			...new Array( this.chainSubClassRuleCount ),
       
 18495 		].map( ( _ ) => p.Offset16 );
       
 18496 	}
       
 18497 	getSubClass( index ) {
       
 18498 		let p = this.parser;
       
 18499 		p.currentPosition = this.start + this.chainSubRuleOffsets[ index ];
       
 18500 		return new ChainSubClassRuleTable( p );
       
 18501 	}
       
 18502 }
       
 18503 class ChainSubClassRuleTable {
       
 18504 	constructor( p ) {
       
 18505 		this.backtrackGlyphCount = p.uint16;
       
 18506 		this.backtrackSequence = [
       
 18507 			...new Array( this.backtrackGlyphCount ),
       
 18508 		].map( ( _ ) => p.uint16 );
       
 18509 		this.inputGlyphCount = p.uint16;
       
 18510 		this.inputSequence = [ ...new Array( this.inputGlyphCount - 1 ) ].map(
       
 18511 			( _ ) => p.uint16
       
 18512 		);
       
 18513 		this.lookaheadGlyphCount = p.uint16;
       
 18514 		this.lookAheadSequence = [
       
 18515 			...new Array( this.lookAheadGlyphCount ),
       
 18516 		].map( ( _ ) => p.uint16 );
       
 18517 		this.substitutionCount = p.uint16;
       
 18518 		this.substLookupRecords = [
       
 18519 			...new Array( this.substitutionCount ),
       
 18520 		].map( ( _ ) => new SequenceLookupRecord( p ) );
       
 18521 	}
       
 18522 }
       
 18523 class SequenceLookupRecord extends ParsedData {
       
 18524 	constructor( p ) {
       
 18525 		super( p );
       
 18526 		this.sequenceIndex = p.uint16;
       
 18527 		this.lookupListIndex = p.uint16;
       
 18528 	}
       
 18529 }
       
 18530 class LookupType7$1 extends ParsedData {
       
 18531 	constructor( p ) {
       
 18532 		super( p );
       
 18533 		this.substFormat = p.uint16;
       
 18534 		this.extensionLookupType = p.uint16;
       
 18535 		this.extensionOffset = p.Offset32;
       
 18536 	}
       
 18537 }
       
 18538 class LookupType8$1 extends LookupType$1 {
       
 18539 	constructor( p ) {
       
 18540 		super( p );
       
 18541 		this.backtrackGlyphCount = p.uint16;
       
 18542 		this.backtrackCoverageOffsets = [
       
 18543 			...new Array( this.backtrackGlyphCount ),
       
 18544 		].map( ( _ ) => p.Offset16 );
       
 18545 		this.lookaheadGlyphCount = p.uint16;
       
 18546 		this.lookaheadCoverageOffsets = [
       
 18547 			new Array( this.lookaheadGlyphCount ),
       
 18548 		].map( ( _ ) => p.Offset16 );
       
 18549 		this.glyphCount = p.uint16;
       
 18550 		this.substituteGlyphIDs = [ ...new Array( this.glyphCount ) ].map(
       
 18551 			( _ ) => p.uint16
       
 18552 		);
       
 18553 	}
       
 18554 }
       
 18555 var GSUBtables = {
       
 18556 	buildSubtable: function ( type, p ) {
       
 18557 		const subtable = new [
       
 18558 			undefined,
       
 18559 			LookupType1$1,
       
 18560 			LookupType2$1,
       
 18561 			LookupType3$1,
       
 18562 			LookupType4$1,
       
 18563 			LookupType5$1,
       
 18564 			LookupType6$1,
       
 18565 			LookupType7$1,
       
 18566 			LookupType8$1,
       
 18567 		][ type ]( p );
       
 18568 		subtable.type = type;
       
 18569 		return subtable;
       
 18570 	},
       
 18571 };
       
 18572 class LookupType extends ParsedData {
       
 18573 	constructor( p ) {
       
 18574 		super( p );
       
 18575 	}
       
 18576 }
       
 18577 class LookupType1 extends LookupType {
       
 18578 	constructor( p ) {
       
 18579 		super( p );
       
 18580 		console.log( `lookup type 1` );
       
 18581 	}
       
 18582 }
       
 18583 class LookupType2 extends LookupType {
       
 18584 	constructor( p ) {
       
 18585 		super( p );
       
 18586 		console.log( `lookup type 2` );
       
 18587 	}
       
 18588 }
       
 18589 class LookupType3 extends LookupType {
       
 18590 	constructor( p ) {
       
 18591 		super( p );
       
 18592 		console.log( `lookup type 3` );
       
 18593 	}
       
 18594 }
       
 18595 class LookupType4 extends LookupType {
       
 18596 	constructor( p ) {
       
 18597 		super( p );
       
 18598 		console.log( `lookup type 4` );
       
 18599 	}
       
 18600 }
       
 18601 class LookupType5 extends LookupType {
       
 18602 	constructor( p ) {
       
 18603 		super( p );
       
 18604 		console.log( `lookup type 5` );
       
 18605 	}
       
 18606 }
       
 18607 class LookupType6 extends LookupType {
       
 18608 	constructor( p ) {
       
 18609 		super( p );
       
 18610 		console.log( `lookup type 6` );
       
 18611 	}
       
 18612 }
       
 18613 class LookupType7 extends LookupType {
       
 18614 	constructor( p ) {
       
 18615 		super( p );
       
 18616 		console.log( `lookup type 7` );
       
 18617 	}
       
 18618 }
       
 18619 class LookupType8 extends LookupType {
       
 18620 	constructor( p ) {
       
 18621 		super( p );
       
 18622 		console.log( `lookup type 8` );
       
 18623 	}
       
 18624 }
       
 18625 class LookupType9 extends LookupType {
       
 18626 	constructor( p ) {
       
 18627 		super( p );
       
 18628 		console.log( `lookup type 9` );
       
 18629 	}
       
 18630 }
       
 18631 var GPOStables = {
       
 18632 	buildSubtable: function ( type, p ) {
       
 18633 		const subtable = new [
       
 18634 			undefined,
       
 18635 			LookupType1,
       
 18636 			LookupType2,
       
 18637 			LookupType3,
       
 18638 			LookupType4,
       
 18639 			LookupType5,
       
 18640 			LookupType6,
       
 18641 			LookupType7,
       
 18642 			LookupType8,
       
 18643 			LookupType9,
       
 18644 		][ type ]( p );
       
 18645 		subtable.type = type;
       
 18646 		return subtable;
       
 18647 	},
       
 18648 };
       
 18649 class LookupList extends ParsedData {
       
 18650 	static EMPTY = { lookupCount: 0, lookups: [] };
       
 18651 	constructor( p ) {
       
 18652 		super( p );
       
 18653 		this.lookupCount = p.uint16;
       
 18654 		this.lookups = [ ...new Array( this.lookupCount ) ].map(
       
 18655 			( _ ) => p.Offset16
       
 18656 		);
       
 18657 	}
       
 18658 }
       
 18659 class LookupTable extends ParsedData {
       
 18660 	constructor( p, type ) {
       
 18661 		super( p );
       
 18662 		this.ctType = type;
       
 18663 		this.lookupType = p.uint16;
       
 18664 		this.lookupFlag = p.uint16;
       
 18665 		this.subTableCount = p.uint16;
       
 18666 		this.subtableOffsets = [ ...new Array( this.subTableCount ) ].map(
       
 18667 			( _ ) => p.Offset16
       
 18668 		);
       
 18669 		this.markFilteringSet = p.uint16;
       
 18670 	}
       
 18671 	get rightToLeft() {
       
 18672 		return this.lookupFlag & ( 1 === 1 );
       
 18673 	}
       
 18674 	get ignoreBaseGlyphs() {
       
 18675 		return this.lookupFlag & ( 2 === 2 );
       
 18676 	}
       
 18677 	get ignoreLigatures() {
       
 18678 		return this.lookupFlag & ( 4 === 4 );
       
 18679 	}
       
 18680 	get ignoreMarks() {
       
 18681 		return this.lookupFlag & ( 8 === 8 );
       
 18682 	}
       
 18683 	get useMarkFilteringSet() {
       
 18684 		return this.lookupFlag & ( 16 === 16 );
       
 18685 	}
       
 18686 	get markAttachmentType() {
       
 18687 		return this.lookupFlag & ( 65280 === 65280 );
       
 18688 	}
       
 18689 	getSubTable( index ) {
       
 18690 		const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;
       
 18691 		this.parser.currentPosition =
       
 18692 			this.start + this.subtableOffsets[ index ];
       
 18693 		return builder.buildSubtable( this.lookupType, this.parser );
       
 18694 	}
       
 18695 }
       
 18696 class CommonLayoutTable extends SimpleTable {
       
 18697 	constructor( dict, dataview, name ) {
       
 18698 		const { p: p, tableStart: tableStart } = super( dict, dataview, name );
       
 18699 		this.majorVersion = p.uint16;
       
 18700 		this.minorVersion = p.uint16;
       
 18701 		this.scriptListOffset = p.Offset16;
       
 18702 		this.featureListOffset = p.Offset16;
       
 18703 		this.lookupListOffset = p.Offset16;
       
 18704 		if ( this.majorVersion === 1 && this.minorVersion === 1 ) {
       
 18705 			this.featureVariationsOffset = p.Offset32;
       
 18706 		}
       
 18707 		const no_content = ! (
       
 18708 			this.scriptListOffset ||
       
 18709 			this.featureListOffset ||
       
 18710 			this.lookupListOffset
       
 18711 		);
       
 18712 		lazy$1( this, `scriptList`, () => {
       
 18713 			if ( no_content ) return ScriptList.EMPTY;
       
 18714 			p.currentPosition = tableStart + this.scriptListOffset;
       
 18715 			return new ScriptList( p );
       
 18716 		} );
       
 18717 		lazy$1( this, `featureList`, () => {
       
 18718 			if ( no_content ) return FeatureList.EMPTY;
       
 18719 			p.currentPosition = tableStart + this.featureListOffset;
       
 18720 			return new FeatureList( p );
       
 18721 		} );
       
 18722 		lazy$1( this, `lookupList`, () => {
       
 18723 			if ( no_content ) return LookupList.EMPTY;
       
 18724 			p.currentPosition = tableStart + this.lookupListOffset;
       
 18725 			return new LookupList( p );
       
 18726 		} );
       
 18727 		if ( this.featureVariationsOffset ) {
       
 18728 			lazy$1( this, `featureVariations`, () => {
       
 18729 				if ( no_content ) return FeatureVariations.EMPTY;
       
 18730 				p.currentPosition = tableStart + this.featureVariationsOffset;
       
 18731 				return new FeatureVariations( p );
       
 18732 			} );
       
 18733 		}
       
 18734 	}
       
 18735 	getSupportedScripts() {
       
 18736 		return this.scriptList.scriptRecords.map( ( r ) => r.scriptTag );
       
 18737 	}
       
 18738 	getScriptTable( scriptTag ) {
       
 18739 		let record = this.scriptList.scriptRecords.find(
       
 18740 			( r ) => r.scriptTag === scriptTag
       
 18741 		);
       
 18742 		this.parser.currentPosition =
       
 18743 			this.scriptList.start + record.scriptOffset;
       
 18744 		let table = new ScriptTable( this.parser );
       
 18745 		table.scriptTag = scriptTag;
       
 18746 		return table;
       
 18747 	}
       
 18748 	ensureScriptTable( arg ) {
       
 18749 		if ( typeof arg === 'string' ) {
       
 18750 			return this.getScriptTable( arg );
       
 18751 		}
       
 18752 		return arg;
       
 18753 	}
       
 18754 	getSupportedLangSys( scriptTable ) {
       
 18755 		scriptTable = this.ensureScriptTable( scriptTable );
       
 18756 		const hasDefault = scriptTable.defaultLangSys !== 0;
       
 18757 		const supported = scriptTable.langSysRecords.map(
       
 18758 			( l ) => l.langSysTag
       
 18759 		);
       
 18760 		if ( hasDefault ) supported.unshift( `dflt` );
       
 18761 		return supported;
       
 18762 	}
       
 18763 	getDefaultLangSysTable( scriptTable ) {
       
 18764 		scriptTable = this.ensureScriptTable( scriptTable );
       
 18765 		let offset = scriptTable.defaultLangSys;
       
 18766 		if ( offset !== 0 ) {
       
 18767 			this.parser.currentPosition = scriptTable.start + offset;
       
 18768 			let table = new LangSysTable( this.parser );
       
 18769 			table.langSysTag = ``;
       
 18770 			table.defaultForScript = scriptTable.scriptTag;
       
 18771 			return table;
       
 18772 		}
       
 18773 	}
       
 18774 	getLangSysTable( scriptTable, langSysTag = `dflt` ) {
       
 18775 		if ( langSysTag === `dflt` )
       
 18776 			return this.getDefaultLangSysTable( scriptTable );
       
 18777 		scriptTable = this.ensureScriptTable( scriptTable );
       
 18778 		let record = scriptTable.langSysRecords.find(
       
 18779 			( l ) => l.langSysTag === langSysTag
       
 18780 		);
       
 18781 		this.parser.currentPosition = scriptTable.start + record.langSysOffset;
       
 18782 		let table = new LangSysTable( this.parser );
       
 18783 		table.langSysTag = langSysTag;
       
 18784 		return table;
       
 18785 	}
       
 18786 	getFeatures( langSysTable ) {
       
 18787 		return langSysTable.featureIndices.map( ( index ) =>
       
 18788 			this.getFeature( index )
       
 18789 		);
       
 18790 	}
       
 18791 	getFeature( indexOrTag ) {
       
 18792 		let record;
       
 18793 		if ( parseInt( indexOrTag ) == indexOrTag ) {
       
 18794 			record = this.featureList.featureRecords[ indexOrTag ];
       
 18795 		} else {
       
 18796 			record = this.featureList.featureRecords.find(
       
 18797 				( f ) => f.featureTag === indexOrTag
       
 18798 			);
       
 18799 		}
       
 18800 		if ( ! record ) return;
       
 18801 		this.parser.currentPosition =
       
 18802 			this.featureList.start + record.featureOffset;
       
 18803 		let table = new FeatureTable( this.parser );
       
 18804 		table.featureTag = record.featureTag;
       
 18805 		return table;
       
 18806 	}
       
 18807 	getLookups( featureTable ) {
       
 18808 		return featureTable.lookupListIndices.map( ( index ) =>
       
 18809 			this.getLookup( index )
       
 18810 		);
       
 18811 	}
       
 18812 	getLookup( lookupIndex, type ) {
       
 18813 		let lookupOffset = this.lookupList.lookups[ lookupIndex ];
       
 18814 		this.parser.currentPosition = this.lookupList.start + lookupOffset;
       
 18815 		return new LookupTable( this.parser, type );
       
 18816 	}
       
 18817 }
       
 18818 class GSUB extends CommonLayoutTable {
       
 18819 	constructor( dict, dataview ) {
       
 18820 		super( dict, dataview, `GSUB` );
       
 18821 	}
       
 18822 	getLookup( lookupIndex ) {
       
 18823 		return super.getLookup( lookupIndex, `GSUB` );
       
 18824 	}
       
 18825 }
       
 18826 var GSUB$1 = Object.freeze( { __proto__: null, GSUB: GSUB } );
       
 18827 class GPOS extends CommonLayoutTable {
       
 18828 	constructor( dict, dataview ) {
       
 18829 		super( dict, dataview, `GPOS` );
       
 18830 	}
       
 18831 	getLookup( lookupIndex ) {
       
 18832 		return super.getLookup( lookupIndex, `GPOS` );
       
 18833 	}
       
 18834 }
       
 18835 var GPOS$1 = Object.freeze( { __proto__: null, GPOS: GPOS } );
       
 18836 class SVG extends SimpleTable {
       
 18837 	constructor( dict, dataview ) {
       
 18838 		const { p: p } = super( dict, dataview );
       
 18839 		this.version = p.uint16;
       
 18840 		this.offsetToSVGDocumentList = p.Offset32;
       
 18841 		p.currentPosition = this.tableStart + this.offsetToSVGDocumentList;
       
 18842 		this.documentList = new SVGDocumentList( p );
       
 18843 	}
       
 18844 }
       
 18845 class SVGDocumentList extends ParsedData {
       
 18846 	constructor( p ) {
       
 18847 		super( p );
       
 18848 		this.numEntries = p.uint16;
       
 18849 		this.documentRecords = [ ...new Array( this.numEntries ) ].map(
       
 18850 			( _ ) => new SVGDocumentRecord( p )
       
 18851 		);
       
 18852 	}
       
 18853 	getDocument( documentID ) {
       
 18854 		let record = this.documentRecords[ documentID ];
       
 18855 		if ( ! record ) return '';
       
 18856 		let offset = this.start + record.svgDocOffset;
       
 18857 		this.parser.currentPosition = offset;
       
 18858 		return this.parser.readBytes( record.svgDocLength );
       
 18859 	}
       
 18860 	getDocumentForGlyph( glyphID ) {
       
 18861 		let id = this.documentRecords.findIndex(
       
 18862 			( d ) => d.startGlyphID <= glyphID && glyphID <= d.endGlyphID
       
 18863 		);
       
 18864 		if ( id === -1 ) return '';
       
 18865 		return this.getDocument( id );
       
 18866 	}
       
 18867 }
       
 18868 class SVGDocumentRecord {
       
 18869 	constructor( p ) {
       
 18870 		this.startGlyphID = p.uint16;
       
 18871 		this.endGlyphID = p.uint16;
       
 18872 		this.svgDocOffset = p.Offset32;
       
 18873 		this.svgDocLength = p.uint32;
       
 18874 	}
       
 18875 }
       
 18876 var SVG$1 = Object.freeze( { __proto__: null, SVG: SVG } );
       
 18877 class fvar extends SimpleTable {
       
 18878 	constructor( dict, dataview ) {
       
 18879 		const { p: p } = super( dict, dataview );
       
 18880 		this.majorVersion = p.uint16;
       
 18881 		this.minorVersion = p.uint16;
       
 18882 		this.axesArrayOffset = p.Offset16;
       
 18883 		p.uint16;
       
 18884 		this.axisCount = p.uint16;
       
 18885 		this.axisSize = p.uint16;
       
 18886 		this.instanceCount = p.uint16;
       
 18887 		this.instanceSize = p.uint16;
       
 18888 		const axisStart = this.tableStart + this.axesArrayOffset;
       
 18889 		lazy$1( this, `axes`, () => {
       
 18890 			p.currentPosition = axisStart;
       
 18891 			return [ ...new Array( this.axisCount ) ].map(
       
 18892 				( _ ) => new VariationAxisRecord( p )
       
 18893 			);
       
 18894 		} );
       
 18895 		const instanceStart = axisStart + this.axisCount * this.axisSize;
       
 18896 		lazy$1( this, `instances`, () => {
       
 18897 			let instances = [];
       
 18898 			for ( let i = 0; i < this.instanceCount; i++ ) {
       
 18899 				p.currentPosition = instanceStart + i * this.instanceSize;
       
 18900 				instances.push(
       
 18901 					new InstanceRecord( p, this.axisCount, this.instanceSize )
       
 18902 				);
       
 18903 			}
       
 18904 			return instances;
       
 18905 		} );
       
 18906 	}
       
 18907 	getSupportedAxes() {
       
 18908 		return this.axes.map( ( a ) => a.tag );
       
 18909 	}
       
 18910 	getAxis( name ) {
       
 18911 		return this.axes.find( ( a ) => a.tag === name );
       
 18912 	}
       
 18913 }
       
 18914 class VariationAxisRecord {
       
 18915 	constructor( p ) {
       
 18916 		this.tag = p.tag;
       
 18917 		this.minValue = p.fixed;
       
 18918 		this.defaultValue = p.fixed;
       
 18919 		this.maxValue = p.fixed;
       
 18920 		this.flags = p.flags( 16 );
       
 18921 		this.axisNameID = p.uint16;
       
 18922 	}
       
 18923 }
       
 18924 class InstanceRecord {
       
 18925 	constructor( p, axisCount, size ) {
       
 18926 		let start = p.currentPosition;
       
 18927 		this.subfamilyNameID = p.uint16;
       
 18928 		p.uint16;
       
 18929 		this.coordinates = [ ...new Array( axisCount ) ].map(
       
 18930 			( _ ) => p.fixed
       
 18931 		);
       
 18932 		if ( p.currentPosition - start < size ) {
       
 18933 			this.postScriptNameID = p.uint16;
       
 18934 		}
       
 18935 	}
       
 18936 }
       
 18937 var fvar$1 = Object.freeze( { __proto__: null, fvar: fvar } );
       
 18938 class cvt extends SimpleTable {
       
 18939 	constructor( dict, dataview ) {
       
 18940 		const { p: p } = super( dict, dataview );
       
 18941 		const n = dict.length / 2;
       
 18942 		lazy$1( this, `items`, () =>
       
 18943 			[ ...new Array( n ) ].map( ( _ ) => p.fword )
       
 18944 		);
       
 18945 	}
       
 18946 }
       
 18947 var cvt$1 = Object.freeze( { __proto__: null, cvt: cvt } );
       
 18948 class fpgm extends SimpleTable {
       
 18949 	constructor( dict, dataview ) {
       
 18950 		const { p: p } = super( dict, dataview );
       
 18951 		lazy$1( this, `instructions`, () =>
       
 18952 			[ ...new Array( dict.length ) ].map( ( _ ) => p.uint8 )
       
 18953 		);
       
 18954 	}
       
 18955 }
       
 18956 var fpgm$1 = Object.freeze( { __proto__: null, fpgm: fpgm } );
       
 18957 class gasp extends SimpleTable {
       
 18958 	constructor( dict, dataview ) {
       
 18959 		const { p: p } = super( dict, dataview );
       
 18960 		this.version = p.uint16;
       
 18961 		this.numRanges = p.uint16;
       
 18962 		const getter = () =>
       
 18963 			[ ...new Array( this.numRanges ) ].map(
       
 18964 				( _ ) => new GASPRange( p )
       
 18965 			);
       
 18966 		lazy$1( this, `gaspRanges`, getter );
       
 18967 	}
       
 18968 }
       
 18969 class GASPRange {
       
 18970 	constructor( p ) {
       
 18971 		this.rangeMaxPPEM = p.uint16;
       
 18972 		this.rangeGaspBehavior = p.uint16;
       
 18973 	}
       
 18974 }
       
 18975 var gasp$1 = Object.freeze( { __proto__: null, gasp: gasp } );
       
 18976 class glyf extends SimpleTable {
       
 18977 	constructor( dict, dataview ) {
       
 18978 		super( dict, dataview );
       
 18979 	}
       
 18980 	getGlyphData( offset, length ) {
       
 18981 		this.parser.currentPosition = this.tableStart + offset;
       
 18982 		return this.parser.readBytes( length );
       
 18983 	}
       
 18984 }
       
 18985 var glyf$1 = Object.freeze( { __proto__: null, glyf: glyf } );
       
 18986 class loca extends SimpleTable {
       
 18987 	constructor( dict, dataview, tables ) {
       
 18988 		const { p: p } = super( dict, dataview );
       
 18989 		const n = tables.maxp.numGlyphs + 1;
       
 18990 		if ( tables.head.indexToLocFormat === 0 ) {
       
 18991 			this.x2 = true;
       
 18992 			lazy$1( this, `offsets`, () =>
       
 18993 				[ ...new Array( n ) ].map( ( _ ) => p.Offset16 )
       
 18994 			);
       
 18995 		} else {
       
 18996 			lazy$1( this, `offsets`, () =>
       
 18997 				[ ...new Array( n ) ].map( ( _ ) => p.Offset32 )
       
 18998 			);
       
 18999 		}
       
 19000 	}
       
 19001 	getGlyphDataOffsetAndLength( glyphID ) {
       
 19002 		let offset = this.offsets[ glyphID ] * this.x2 ? 2 : 1;
       
 19003 		let nextOffset = this.offsets[ glyphID + 1 ] * this.x2 ? 2 : 1;
       
 19004 		return { offset: offset, length: nextOffset - offset };
       
 19005 	}
       
 19006 }
       
 19007 var loca$1 = Object.freeze( { __proto__: null, loca: loca } );
       
 19008 class prep extends SimpleTable {
       
 19009 	constructor( dict, dataview ) {
       
 19010 		const { p: p } = super( dict, dataview );
       
 19011 		lazy$1( this, `instructions`, () =>
       
 19012 			[ ...new Array( dict.length ) ].map( ( _ ) => p.uint8 )
       
 19013 		);
       
 19014 	}
       
 19015 }
       
 19016 var prep$1 = Object.freeze( { __proto__: null, prep: prep } );
       
 19017 class CFF extends SimpleTable {
       
 19018 	constructor( dict, dataview ) {
       
 19019 		const { p: p } = super( dict, dataview );
       
 19020 		lazy$1( this, `data`, () => p.readBytes() );
       
 19021 	}
       
 19022 }
       
 19023 var CFF$1 = Object.freeze( { __proto__: null, CFF: CFF } );
       
 19024 class CFF2 extends SimpleTable {
       
 19025 	constructor( dict, dataview ) {
       
 19026 		const { p: p } = super( dict, dataview );
       
 19027 		lazy$1( this, `data`, () => p.readBytes() );
       
 19028 	}
       
 19029 }
       
 19030 var CFF2$1 = Object.freeze( { __proto__: null, CFF2: CFF2 } );
       
 19031 class VORG extends SimpleTable {
       
 19032 	constructor( dict, dataview ) {
       
 19033 		const { p: p } = super( dict, dataview );
       
 19034 		this.majorVersion = p.uint16;
       
 19035 		this.minorVersion = p.uint16;
       
 19036 		this.defaultVertOriginY = p.int16;
       
 19037 		this.numVertOriginYMetrics = p.uint16;
       
 19038 		lazy$1( this, `vertORiginYMetrics`, () =>
       
 19039 			[ ...new Array( this.numVertOriginYMetrics ) ].map(
       
 19040 				( _ ) => new VertOriginYMetric( p )
       
 19041 			)
       
 19042 		);
       
 19043 	}
       
 19044 }
       
 19045 class VertOriginYMetric {
       
 19046 	constructor( p ) {
       
 19047 		this.glyphIndex = p.uint16;
       
 19048 		this.vertOriginY = p.int16;
       
 19049 	}
       
 19050 }
       
 19051 var VORG$1 = Object.freeze( { __proto__: null, VORG: VORG } );
       
 19052 class BitmapSize {
       
 19053 	constructor( p ) {
       
 19054 		this.indexSubTableArrayOffset = p.Offset32;
       
 19055 		this.indexTablesSize = p.uint32;
       
 19056 		this.numberofIndexSubTables = p.uint32;
       
 19057 		this.colorRef = p.uint32;
       
 19058 		this.hori = new SbitLineMetrics( p );
       
 19059 		this.vert = new SbitLineMetrics( p );
       
 19060 		this.startGlyphIndex = p.uint16;
       
 19061 		this.endGlyphIndex = p.uint16;
       
 19062 		this.ppemX = p.uint8;
       
 19063 		this.ppemY = p.uint8;
       
 19064 		this.bitDepth = p.uint8;
       
 19065 		this.flags = p.int8;
       
 19066 	}
       
 19067 }
       
 19068 class BitmapScale {
       
 19069 	constructor( p ) {
       
 19070 		this.hori = new SbitLineMetrics( p );
       
 19071 		this.vert = new SbitLineMetrics( p );
       
 19072 		this.ppemX = p.uint8;
       
 19073 		this.ppemY = p.uint8;
       
 19074 		this.substitutePpemX = p.uint8;
       
 19075 		this.substitutePpemY = p.uint8;
       
 19076 	}
       
 19077 }
       
 19078 class SbitLineMetrics {
       
 19079 	constructor( p ) {
       
 19080 		this.ascender = p.int8;
       
 19081 		this.descender = p.int8;
       
 19082 		this.widthMax = p.uint8;
       
 19083 		this.caretSlopeNumerator = p.int8;
       
 19084 		this.caretSlopeDenominator = p.int8;
       
 19085 		this.caretOffset = p.int8;
       
 19086 		this.minOriginSB = p.int8;
       
 19087 		this.minAdvanceSB = p.int8;
       
 19088 		this.maxBeforeBL = p.int8;
       
 19089 		this.minAfterBL = p.int8;
       
 19090 		this.pad1 = p.int8;
       
 19091 		this.pad2 = p.int8;
       
 19092 	}
       
 19093 }
       
 19094 class EBLC extends SimpleTable {
       
 19095 	constructor( dict, dataview, name ) {
       
 19096 		const { p: p } = super( dict, dataview, name );
       
 19097 		this.majorVersion = p.uint16;
       
 19098 		this.minorVersion = p.uint16;
       
 19099 		this.numSizes = p.uint32;
       
 19100 		lazy$1( this, `bitMapSizes`, () =>
       
 19101 			[ ...new Array( this.numSizes ) ].map(
       
 19102 				( _ ) => new BitmapSize( p )
       
 19103 			)
       
 19104 		);
       
 19105 	}
       
 19106 }
       
 19107 var EBLC$1 = Object.freeze( { __proto__: null, EBLC: EBLC } );
       
 19108 class EBDT extends SimpleTable {
       
 19109 	constructor( dict, dataview, name ) {
       
 19110 		const { p: p } = super( dict, dataview, name );
       
 19111 		this.majorVersion = p.uint16;
       
 19112 		this.minorVersion = p.uint16;
       
 19113 	}
       
 19114 }
       
 19115 var EBDT$1 = Object.freeze( { __proto__: null, EBDT: EBDT } );
       
 19116 class EBSC extends SimpleTable {
       
 19117 	constructor( dict, dataview ) {
       
 19118 		const { p: p } = super( dict, dataview );
       
 19119 		this.majorVersion = p.uint16;
       
 19120 		this.minorVersion = p.uint16;
       
 19121 		this.numSizes = p.uint32;
       
 19122 		lazy$1( this, `bitmapScales`, () =>
       
 19123 			[ ...new Array( this.numSizes ) ].map(
       
 19124 				( _ ) => new BitmapScale( p )
       
 19125 			)
       
 19126 		);
       
 19127 	}
       
 19128 }
       
 19129 var EBSC$1 = Object.freeze( { __proto__: null, EBSC: EBSC } );
       
 19130 class CBLC extends EBLC {
       
 19131 	constructor( dict, dataview ) {
       
 19132 		super( dict, dataview, `CBLC` );
       
 19133 	}
       
 19134 }
       
 19135 var CBLC$1 = Object.freeze( { __proto__: null, CBLC: CBLC } );
       
 19136 class CBDT extends EBDT {
       
 19137 	constructor( dict, dataview ) {
       
 19138 		super( dict, dataview, `CBDT` );
       
 19139 	}
       
 19140 }
       
 19141 var CBDT$1 = Object.freeze( { __proto__: null, CBDT: CBDT } );
       
 19142 class sbix extends SimpleTable {
       
 19143 	constructor( dict, dataview ) {
       
 19144 		const { p: p } = super( dict, dataview );
       
 19145 		this.version = p.uint16;
       
 19146 		this.flags = p.flags( 16 );
       
 19147 		this.numStrikes = p.uint32;
       
 19148 		lazy$1( this, `strikeOffsets`, () =>
       
 19149 			[ ...new Array( this.numStrikes ) ].map( ( _ ) => p.Offset32 )
       
 19150 		);
       
 19151 	}
       
 19152 }
       
 19153 var sbix$1 = Object.freeze( { __proto__: null, sbix: sbix } );
       
 19154 class COLR extends SimpleTable {
       
 19155 	constructor( dict, dataview ) {
       
 19156 		const { p: p } = super( dict, dataview );
       
 19157 		this.version = p.uint16;
       
 19158 		this.numBaseGlyphRecords = p.uint16;
       
 19159 		this.baseGlyphRecordsOffset = p.Offset32;
       
 19160 		this.layerRecordsOffset = p.Offset32;
       
 19161 		this.numLayerRecords = p.uint16;
       
 19162 	}
       
 19163 	getBaseGlyphRecord( glyphID ) {
       
 19164 		let start = this.tableStart + this.baseGlyphRecordsOffset;
       
 19165 		this.parser.currentPosition = start;
       
 19166 		let first = new BaseGlyphRecord( this.parser );
       
 19167 		let firstID = first.gID;
       
 19168 		let end = this.tableStart + this.layerRecordsOffset - 6;
       
 19169 		this.parser.currentPosition = end;
       
 19170 		let last = new BaseGlyphRecord( this.parser );
       
 19171 		let lastID = last.gID;
       
 19172 		if ( firstID === glyphID ) return first;
       
 19173 		if ( lastID === glyphID ) return last;
       
 19174 		while ( true ) {
       
 19175 			if ( start === end ) break;
       
 19176 			let mid = start + ( end - start ) / 12;
       
 19177 			this.parser.currentPosition = mid;
       
 19178 			let middle = new BaseGlyphRecord( this.parser );
       
 19179 			let midID = middle.gID;
       
 19180 			if ( midID === glyphID ) return middle;
       
 19181 			else if ( midID > glyphID ) {
       
 19182 				end = mid;
       
 19183 			} else if ( midID < glyphID ) {
       
 19184 				start = mid;
       
 19185 			}
       
 19186 		}
       
 19187 		return false;
       
 19188 	}
       
 19189 	getLayers( glyphID ) {
       
 19190 		let record = this.getBaseGlyphRecord( glyphID );
       
 19191 		this.parser.currentPosition =
       
 19192 			this.tableStart +
       
 19193 			this.layerRecordsOffset +
       
 19194 			4 * record.firstLayerIndex;
       
 19195 		return [ ...new Array( record.numLayers ) ].map(
       
 19196 			( _ ) => new LayerRecord( p )
       
 19197 		);
       
 19198 	}
       
 19199 }
       
 19200 class BaseGlyphRecord {
       
 19201 	constructor( p ) {
       
 19202 		this.gID = p.uint16;
       
 19203 		this.firstLayerIndex = p.uint16;
       
 19204 		this.numLayers = p.uint16;
       
 19205 	}
       
 19206 }
       
 19207 class LayerRecord {
       
 19208 	constructor( p ) {
       
 19209 		this.gID = p.uint16;
       
 19210 		this.paletteIndex = p.uint16;
       
 19211 	}
       
 19212 }
       
 19213 var COLR$1 = Object.freeze( { __proto__: null, COLR: COLR } );
       
 19214 class CPAL extends SimpleTable {
       
 19215 	constructor( dict, dataview ) {
       
 19216 		const { p: p } = super( dict, dataview );
       
 19217 		this.version = p.uint16;
       
 19218 		this.numPaletteEntries = p.uint16;
       
 19219 		const numPalettes = ( this.numPalettes = p.uint16 );
       
 19220 		this.numColorRecords = p.uint16;
       
 19221 		this.offsetFirstColorRecord = p.Offset32;
       
 19222 		this.colorRecordIndices = [ ...new Array( this.numPalettes ) ].map(
       
 19223 			( _ ) => p.uint16
       
 19224 		);
       
 19225 		lazy$1( this, `colorRecords`, () => {
       
 19226 			p.currentPosition = this.tableStart + this.offsetFirstColorRecord;
       
 19227 			return [ ...new Array( this.numColorRecords ) ].map(
       
 19228 				( _ ) => new ColorRecord( p )
       
 19229 			);
       
 19230 		} );
       
 19231 		if ( this.version === 1 ) {
       
 19232 			this.offsetPaletteTypeArray = p.Offset32;
       
 19233 			this.offsetPaletteLabelArray = p.Offset32;
       
 19234 			this.offsetPaletteEntryLabelArray = p.Offset32;
       
 19235 			lazy$1( this, `paletteTypeArray`, () => {
       
 19236 				p.currentPosition =
       
 19237 					this.tableStart + this.offsetPaletteTypeArray;
       
 19238 				return new PaletteTypeArray( p, numPalettes );
       
 19239 			} );
       
 19240 			lazy$1( this, `paletteLabelArray`, () => {
       
 19241 				p.currentPosition =
       
 19242 					this.tableStart + this.offsetPaletteLabelArray;
       
 19243 				return new PaletteLabelsArray( p, numPalettes );
       
 19244 			} );
       
 19245 			lazy$1( this, `paletteEntryLabelArray`, () => {
       
 19246 				p.currentPosition =
       
 19247 					this.tableStart + this.offsetPaletteEntryLabelArray;
       
 19248 				return new PaletteEntryLabelArray( p, numPalettes );
       
 19249 			} );
       
 19250 		}
       
 19251 	}
       
 19252 }
       
 19253 class ColorRecord {
       
 19254 	constructor( p ) {
       
 19255 		this.blue = p.uint8;
       
 19256 		this.green = p.uint8;
       
 19257 		this.red = p.uint8;
       
 19258 		this.alpha = p.uint8;
       
 19259 	}
       
 19260 }
       
 19261 class PaletteTypeArray {
       
 19262 	constructor( p, numPalettes ) {
       
 19263 		this.paletteTypes = [ ...new Array( numPalettes ) ].map(
       
 19264 			( _ ) => p.uint32
       
 19265 		);
       
 19266 	}
       
 19267 }
       
 19268 class PaletteLabelsArray {
       
 19269 	constructor( p, numPalettes ) {
       
 19270 		this.paletteLabels = [ ...new Array( numPalettes ) ].map(
       
 19271 			( _ ) => p.uint16
       
 19272 		);
       
 19273 	}
       
 19274 }
       
 19275 class PaletteEntryLabelArray {
       
 19276 	constructor( p, numPalettes ) {
       
 19277 		this.paletteEntryLabels = [ ...new Array( numPalettes ) ].map(
       
 19278 			( _ ) => p.uint16
       
 19279 		);
       
 19280 	}
       
 19281 }
       
 19282 var CPAL$1 = Object.freeze( { __proto__: null, CPAL: CPAL } );
       
 19283 class DSIG extends SimpleTable {
       
 19284 	constructor( dict, dataview ) {
       
 19285 		const { p: p } = super( dict, dataview );
       
 19286 		this.version = p.uint32;
       
 19287 		this.numSignatures = p.uint16;
       
 19288 		this.flags = p.uint16;
       
 19289 		this.signatureRecords = [ ...new Array( this.numSignatures ) ].map(
       
 19290 			( _ ) => new SignatureRecord( p )
       
 19291 		);
       
 19292 	}
       
 19293 	getData( signatureID ) {
       
 19294 		const record = this.signatureRecords[ signatureID ];
       
 19295 		this.parser.currentPosition = this.tableStart + record.offset;
       
 19296 		return new SignatureBlockFormat1( this.parser );
       
 19297 	}
       
 19298 }
       
 19299 class SignatureRecord {
       
 19300 	constructor( p ) {
       
 19301 		this.format = p.uint32;
       
 19302 		this.length = p.uint32;
       
 19303 		this.offset = p.Offset32;
       
 19304 	}
       
 19305 }
       
 19306 class SignatureBlockFormat1 {
       
 19307 	constructor( p ) {
       
 19308 		p.uint16;
       
 19309 		p.uint16;
       
 19310 		this.signatureLength = p.uint32;
       
 19311 		this.signature = p.readBytes( this.signatureLength );
       
 19312 	}
       
 19313 }
       
 19314 var DSIG$1 = Object.freeze( { __proto__: null, DSIG: DSIG } );
       
 19315 class hdmx extends SimpleTable {
       
 19316 	constructor( dict, dataview, tables ) {
       
 19317 		const { p: p } = super( dict, dataview );
       
 19318 		const numGlyphs = tables.hmtx.numGlyphs;
       
 19319 		this.version = p.uint16;
       
 19320 		this.numRecords = p.int16;
       
 19321 		this.sizeDeviceRecord = p.int32;
       
 19322 		this.records = [ ...new Array( numRecords ) ].map(
       
 19323 			( _ ) => new DeviceRecord( p, numGlyphs )
       
 19324 		);
       
 19325 	}
       
 19326 }
       
 19327 class DeviceRecord {
       
 19328 	constructor( p, numGlyphs ) {
       
 19329 		this.pixelSize = p.uint8;
       
 19330 		this.maxWidth = p.uint8;
       
 19331 		this.widths = p.readBytes( numGlyphs );
       
 19332 	}
       
 19333 }
       
 19334 var hdmx$1 = Object.freeze( { __proto__: null, hdmx: hdmx } );
       
 19335 class kern extends SimpleTable {
       
 19336 	constructor( dict, dataview ) {
       
 19337 		const { p: p } = super( dict, dataview );
       
 19338 		this.version = p.uint16;
       
 19339 		this.nTables = p.uint16;
       
 19340 		lazy$1( this, `tables`, () => {
       
 19341 			let offset = this.tableStart + 4;
       
 19342 			const tables = [];
       
 19343 			for ( let i = 0; i < this.nTables; i++ ) {
       
 19344 				p.currentPosition = offset;
       
 19345 				let subtable = new KernSubTable( p );
       
 19346 				tables.push( subtable );
       
 19347 				offset += subtable;
       
 19348 			}
       
 19349 			return tables;
       
 19350 		} );
       
 19351 	}
       
 19352 }
       
 19353 class KernSubTable {
       
 19354 	constructor( p ) {
       
 19355 		this.version = p.uint16;
       
 19356 		this.length = p.uint16;
       
 19357 		this.coverage = p.flags( 8 );
       
 19358 		this.format = p.uint8;
       
 19359 		if ( this.format === 0 ) {
       
 19360 			this.nPairs = p.uint16;
       
 19361 			this.searchRange = p.uint16;
       
 19362 			this.entrySelector = p.uint16;
       
 19363 			this.rangeShift = p.uint16;
       
 19364 			lazy$1( this, `pairs`, () =>
       
 19365 				[ ...new Array( this.nPairs ) ].map( ( _ ) => new Pair( p ) )
       
 19366 			);
       
 19367 		}
       
 19368 		if ( this.format === 2 ) {
       
 19369 			console.warn(
       
 19370 				`Kern subtable format 2 is not supported: this parser currently only parses universal table data.`
       
 19371 			);
       
 19372 		}
       
 19373 	}
       
 19374 	get horizontal() {
       
 19375 		return this.coverage[ 0 ];
       
 19376 	}
       
 19377 	get minimum() {
       
 19378 		return this.coverage[ 1 ];
       
 19379 	}
       
 19380 	get crossstream() {
       
 19381 		return this.coverage[ 2 ];
       
 19382 	}
       
 19383 	get override() {
       
 19384 		return this.coverage[ 3 ];
       
 19385 	}
       
 19386 }
       
 19387 class Pair {
       
 19388 	constructor( p ) {
       
 19389 		this.left = p.uint16;
       
 19390 		this.right = p.uint16;
       
 19391 		this.value = p.fword;
       
 19392 	}
       
 19393 }
       
 19394 var kern$1 = Object.freeze( { __proto__: null, kern: kern } );
       
 19395 class LTSH extends SimpleTable {
       
 19396 	constructor( dict, dataview ) {
       
 19397 		const { p: p } = super( dict, dataview );
       
 19398 		this.version = p.uint16;
       
 19399 		this.numGlyphs = p.uint16;
       
 19400 		this.yPels = p.readBytes( this.numGlyphs );
       
 19401 	}
       
 19402 }
       
 19403 var LTSH$1 = Object.freeze( { __proto__: null, LTSH: LTSH } );
       
 19404 class MERG extends SimpleTable {
       
 19405 	constructor( dict, dataview ) {
       
 19406 		const { p: p } = super( dict, dataview );
       
 19407 		this.version = p.uint16;
       
 19408 		this.mergeClassCount = p.uint16;
       
 19409 		this.mergeDataOffset = p.Offset16;
       
 19410 		this.classDefCount = p.uint16;
       
 19411 		this.offsetToClassDefOffsets = p.Offset16;
       
 19412 		lazy$1( this, `mergeEntryMatrix`, () =>
       
 19413 			[ ...new Array( this.mergeClassCount ) ].map( ( _ ) =>
       
 19414 				p.readBytes( this.mergeClassCount )
       
 19415 			)
       
 19416 		);
       
 19417 		console.warn( `Full MERG parsing is currently not supported.` );
       
 19418 		console.warn(
       
 19419 			`If you need this table parsed, please file an issue, or better yet, a PR.`
       
 19420 		);
       
 19421 	}
       
 19422 }
       
 19423 var MERG$1 = Object.freeze( { __proto__: null, MERG: MERG } );
       
 19424 class meta extends SimpleTable {
       
 19425 	constructor( dict, dataview ) {
       
 19426 		const { p: p } = super( dict, dataview );
       
 19427 		this.version = p.uint32;
       
 19428 		this.flags = p.uint32;
       
 19429 		p.uint32;
       
 19430 		this.dataMapsCount = p.uint32;
       
 19431 		this.dataMaps = [ ...new Array( this.dataMapsCount ) ].map(
       
 19432 			( _ ) => new DataMap( this.tableStart, p )
       
 19433 		);
       
 19434 	}
       
 19435 }
       
 19436 class DataMap {
       
 19437 	constructor( tableStart, p ) {
       
 19438 		this.tableStart = tableStart;
       
 19439 		this.parser = p;
       
 19440 		this.tag = p.tag;
       
 19441 		this.dataOffset = p.Offset32;
       
 19442 		this.dataLength = p.uint32;
       
 19443 	}
       
 19444 	getData() {
       
 19445 		this.parser.currentField = this.tableStart + this.dataOffset;
       
 19446 		return this.parser.readBytes( this.dataLength );
       
 19447 	}
       
 19448 }
       
 19449 var meta$1 = Object.freeze( { __proto__: null, meta: meta } );
       
 19450 class PCLT extends SimpleTable {
       
 19451 	constructor( dict, dataview ) {
       
 19452 		super( dict, dataview );
       
 19453 		console.warn(
       
 19454 			`This font uses a PCLT table, which is currently not supported by this parser.`
       
 19455 		);
       
 19456 		console.warn(
       
 19457 			`If you need this table parsed, please file an issue, or better yet, a PR.`
       
 19458 		);
       
 19459 	}
       
 19460 }
       
 19461 var PCLT$1 = Object.freeze( { __proto__: null, PCLT: PCLT } );
       
 19462 class VDMX extends SimpleTable {
       
 19463 	constructor( dict, dataview ) {
       
 19464 		const { p: p } = super( dict, dataview );
       
 19465 		this.version = p.uint16;
       
 19466 		this.numRecs = p.uint16;
       
 19467 		this.numRatios = p.uint16;
       
 19468 		this.ratRanges = [ ...new Array( this.numRatios ) ].map(
       
 19469 			( _ ) => new RatioRange( p )
       
 19470 		);
       
 19471 		this.offsets = [ ...new Array( this.numRatios ) ].map(
       
 19472 			( _ ) => p.Offset16
       
 19473 		);
       
 19474 		this.VDMXGroups = [ ...new Array( this.numRecs ) ].map(
       
 19475 			( _ ) => new VDMXGroup( p )
       
 19476 		);
       
 19477 	}
       
 19478 }
       
 19479 class RatioRange {
       
 19480 	constructor( p ) {
       
 19481 		this.bCharSet = p.uint8;
       
 19482 		this.xRatio = p.uint8;
       
 19483 		this.yStartRatio = p.uint8;
       
 19484 		this.yEndRatio = p.uint8;
       
 19485 	}
       
 19486 }
       
 19487 class VDMXGroup {
       
 19488 	constructor( p ) {
       
 19489 		this.recs = p.uint16;
       
 19490 		this.startsz = p.uint8;
       
 19491 		this.endsz = p.uint8;
       
 19492 		this.records = [ ...new Array( this.recs ) ].map(
       
 19493 			( _ ) => new vTable( p )
       
 19494 		);
       
 19495 	}
       
 19496 }
       
 19497 class vTable {
       
 19498 	constructor( p ) {
       
 19499 		this.yPelHeight = p.uint16;
       
 19500 		this.yMax = p.int16;
       
 19501 		this.yMin = p.int16;
       
 19502 	}
       
 19503 }
       
 19504 var VDMX$1 = Object.freeze( { __proto__: null, VDMX: VDMX } );
       
 19505 class vhea extends SimpleTable {
       
 19506 	constructor( dict, dataview ) {
       
 19507 		const { p: p } = super( dict, dataview );
       
 19508 		this.version = p.fixed;
       
 19509 		this.ascent = this.vertTypoAscender = p.int16;
       
 19510 		this.descent = this.vertTypoDescender = p.int16;
       
 19511 		this.lineGap = this.vertTypoLineGap = p.int16;
       
 19512 		this.advanceHeightMax = p.int16;
       
 19513 		this.minTopSideBearing = p.int16;
       
 19514 		this.minBottomSideBearing = p.int16;
       
 19515 		this.yMaxExtent = p.int16;
       
 19516 		this.caretSlopeRise = p.int16;
       
 19517 		this.caretSlopeRun = p.int16;
       
 19518 		this.caretOffset = p.int16;
       
 19519 		this.reserved = p.int16;
       
 19520 		this.reserved = p.int16;
       
 19521 		this.reserved = p.int16;
       
 19522 		this.reserved = p.int16;
       
 19523 		this.metricDataFormat = p.int16;
       
 19524 		this.numOfLongVerMetrics = p.uint16;
       
 19525 		p.verifyLength();
       
 19526 	}
       
 19527 }
       
 19528 var vhea$1 = Object.freeze( { __proto__: null, vhea: vhea } );
       
 19529 class vmtx extends SimpleTable {
       
 19530 	constructor( dict, dataview, tables ) {
       
 19531 		super( dict, dataview );
       
 19532 		const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;
       
 19533 		const numGlyphs = tables.maxp.numGlyphs;
       
 19534 		const metricsStart = p.currentPosition;
       
 19535 		lazy( this, `vMetrics`, () => {
       
 19536 			p.currentPosition = metricsStart;
       
 19537 			return [ ...new Array( numOfLongVerMetrics ) ].map(
       
 19538 				( _ ) => new LongVertMetric( p.uint16, p.int16 )
       
 19539 			);
       
 19540 		} );
       
 19541 		if ( numOfLongVerMetrics < numGlyphs ) {
       
 19542 			const tsbStart = metricsStart + numOfLongVerMetrics * 4;
       
 19543 			lazy( this, `topSideBearings`, () => {
       
 19544 				p.currentPosition = tsbStart;
       
 19545 				return [ ...new Array( numGlyphs - numOfLongVerMetrics ) ].map(
       
 19546 					( _ ) => p.int16
       
 19547 				);
       
 19548 			} );
       
 19549 		}
       
 19550 	}
       
 19551 }
       
 19552 class LongVertMetric {
       
 19553 	constructor( h, b ) {
       
 19554 		this.advanceHeight = h;
       
 19555 		this.topSideBearing = b;
       
 19556 	}
       
 19557 }
       
 19558 var vmtx$1 = Object.freeze( { __proto__: null, vmtx: vmtx } );
       
 19559 
       
 19560 /* eslint-enable */
       
 19561 
       
 19562 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js
       
 19563 /**
       
 19564  * WordPress dependencies
       
 19565  */
       
 19566 
       
 19567 
       
 19568 /**
       
 19569  * Internal dependencies
       
 19570  */
       
 19571 
       
 19572 const {
       
 19573   kebabCase: make_families_from_faces_kebabCase
       
 19574 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 19575 function makeFamiliesFromFaces(fontFaces) {
       
 19576   const fontFamiliesObject = fontFaces.reduce((acc, item) => {
       
 19577     if (!acc[item.fontFamily]) {
       
 19578       acc[item.fontFamily] = {
       
 19579         name: item.fontFamily,
       
 19580         fontFamily: item.fontFamily,
       
 19581         slug: make_families_from_faces_kebabCase(item.fontFamily.toLowerCase()),
       
 19582         fontFace: []
       
 19583       };
       
 19584     }
       
 19585     acc[item.fontFamily].fontFace.push(item);
       
 19586     return acc;
       
 19587   }, {});
       
 19588   return Object.values(fontFamiliesObject);
       
 19589 }
       
 19590 
       
 19591 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/upload-fonts.js
       
 19592 /**
       
 19593  * WordPress dependencies
       
 19594  */
       
 19595 
       
 19596 
       
 19597 
       
 19598 
       
 19599 /**
       
 19600  * Internal dependencies
       
 19601  */
       
 19602 
       
 19603 
       
 19604 
       
 19605 
       
 19606 
       
 19607 
       
 19608 
       
 19609 function UploadFonts() {
       
 19610   const {
       
 19611     installFonts,
       
 19612     notice,
       
 19613     setNotice
       
 19614   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 19615   const [isUploading, setIsUploading] = (0,external_wp_element_namespaceObject.useState)(false);
       
 19616   const handleDropZone = files => {
       
 19617     handleFilesUpload(files);
       
 19618   };
       
 19619   const onFilesUpload = event => {
       
 19620     handleFilesUpload(event.target.files);
       
 19621   };
       
 19622 
       
 19623   /**
       
 19624    * Filters the selected files to only allow the ones with the allowed extensions
       
 19625    *
       
 19626    * @param {Array} files The files to be filtered
       
 19627    * @return {void}
       
 19628    */
       
 19629   const handleFilesUpload = async files => {
       
 19630     setNotice(null);
       
 19631     setIsUploading(true);
       
 19632     const uniqueFilenames = new Set();
       
 19633     const selectedFiles = [...files];
       
 19634     let hasInvalidFiles = false;
       
 19635 
       
 19636     // Use map to create a promise for each file check, then filter with Promise.all.
       
 19637     const checkFilesPromises = selectedFiles.map(async file => {
       
 19638       const isFont = await isFontFile(file);
       
 19639       if (!isFont) {
       
 19640         hasInvalidFiles = true;
       
 19641         return null; // Return null for invalid files.
       
 19642       }
       
 19643       // Check for duplicates
       
 19644       if (uniqueFilenames.has(file.name)) {
       
 19645         return null; // Return null for duplicates.
       
 19646       }
       
 19647       // Check if the file extension is allowed.
       
 19648       const fileExtension = file.name.split('.').pop().toLowerCase();
       
 19649       if (ALLOWED_FILE_EXTENSIONS.includes(fileExtension)) {
       
 19650         uniqueFilenames.add(file.name);
       
 19651         return file; // Return the file if it passes all checks.
       
 19652       }
       
 19653       return null; // Return null for disallowed file extensions.
       
 19654     });
       
 19655 
       
 19656     // Filter out the nulls after all promises have resolved.
       
 19657     const allowedFiles = (await Promise.all(checkFilesPromises)).filter(file => null !== file);
       
 19658     if (allowedFiles.length > 0) {
       
 19659       loadFiles(allowedFiles);
       
 19660     } else {
       
 19661       const message = hasInvalidFiles ? (0,external_wp_i18n_namespaceObject.__)('Sorry, you are not allowed to upload this file type.') : (0,external_wp_i18n_namespaceObject.__)('No fonts found to install.');
       
 19662       setNotice({
       
 19663         type: 'error',
       
 19664         message
       
 19665       });
       
 19666       setIsUploading(false);
       
 19667     }
       
 19668   };
       
 19669 
       
 19670   /**
       
 19671    * Loads the selected files and reads the font metadata
       
 19672    *
       
 19673    * @param {Array} files The files to be loaded
       
 19674    * @return {void}
       
 19675    */
       
 19676   const loadFiles = async files => {
       
 19677     const fontFacesLoaded = await Promise.all(files.map(async fontFile => {
       
 19678       const fontFaceData = await getFontFaceMetadata(fontFile);
       
 19679       await loadFontFaceInBrowser(fontFaceData, fontFaceData.file, 'all');
       
 19680       return fontFaceData;
       
 19681     }));
       
 19682     handleInstall(fontFacesLoaded);
       
 19683   };
       
 19684 
       
 19685   /**
       
 19686    * Checks if a file is a valid Font file.
       
 19687    *
       
 19688    * @param {File} file The file to be checked.
       
 19689    * @return {boolean} Whether the file is a valid font file.
       
 19690    */
       
 19691   async function isFontFile(file) {
       
 19692     const font = new Font('Uploaded Font');
       
 19693     try {
       
 19694       const buffer = await readFileAsArrayBuffer(file);
       
 19695       await font.fromDataBuffer(buffer, 'font');
       
 19696       return true;
       
 19697     } catch (error) {
       
 19698       return false;
       
 19699     }
       
 19700   }
       
 19701 
       
 19702   // Create a function to read the file as array buffer
       
 19703   async function readFileAsArrayBuffer(file) {
       
 19704     return new Promise((resolve, reject) => {
       
 19705       const reader = new window.FileReader();
       
 19706       reader.readAsArrayBuffer(file);
       
 19707       reader.onload = () => resolve(reader.result);
       
 19708       reader.onerror = reject;
       
 19709     });
       
 19710   }
       
 19711   const getFontFaceMetadata = async fontFile => {
       
 19712     const buffer = await readFileAsArrayBuffer(fontFile);
       
 19713     const fontObj = new Font('Uploaded Font');
       
 19714     fontObj.fromDataBuffer(buffer, fontFile.name);
       
 19715     // Assuming that fromDataBuffer triggers onload event and returning a Promise
       
 19716     const onloadEvent = await new Promise(resolve => fontObj.onload = resolve);
       
 19717     const font = onloadEvent.detail.font;
       
 19718     const {
       
 19719       name
       
 19720     } = font.opentype.tables;
       
 19721     const fontName = name.get(16) || name.get(1);
       
 19722     const isItalic = name.get(2).toLowerCase().includes('italic');
       
 19723     const fontWeight = font.opentype.tables['OS/2'].usWeightClass || 'normal';
       
 19724     const isVariable = !!font.opentype.tables.fvar;
       
 19725     const weightAxis = isVariable && font.opentype.tables.fvar.axes.find(({
       
 19726       tag
       
 19727     }) => tag === 'wght');
       
 19728     const weightRange = weightAxis ? `${weightAxis.minValue} ${weightAxis.maxValue}` : null;
       
 19729     return {
       
 19730       file: fontFile,
       
 19731       fontFamily: fontName,
       
 19732       fontStyle: isItalic ? 'italic' : 'normal',
       
 19733       fontWeight: weightRange || fontWeight
       
 19734     };
       
 19735   };
       
 19736 
       
 19737   /**
       
 19738    * Creates the font family definition and sends it to the server
       
 19739    *
       
 19740    * @param {Array} fontFaces The font faces to be installed
       
 19741    * @return {void}
       
 19742    */
       
 19743   const handleInstall = async fontFaces => {
       
 19744     const fontFamilies = makeFamiliesFromFaces(fontFaces);
       
 19745     try {
       
 19746       await installFonts(fontFamilies);
       
 19747       setNotice({
       
 19748         type: 'success',
       
 19749         message: (0,external_wp_i18n_namespaceObject.__)('Fonts were installed successfully.')
       
 19750       });
       
 19751     } catch (error) {
       
 19752       setNotice({
       
 19753         type: 'error',
       
 19754         message: error.message,
       
 19755         errors: error?.installationErrors
       
 19756       });
       
 19757     }
       
 19758     setIsUploading(false);
       
 19759   };
       
 19760   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 19761     className: "font-library-modal__tabpanel-layout",
       
 19762     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, {
       
 19763       onFilesDrop: handleDropZone
       
 19764     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 19765       className: "font-library-modal__local-fonts",
       
 19766       children: [notice && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Notice, {
       
 19767         status: notice.type,
       
 19768         __unstableHTML: true,
       
 19769         onRemove: () => setNotice(null),
       
 19770         children: [notice.message, notice.errors && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
       
 19771           children: notice.errors.map((error, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
       
 19772             children: error
       
 19773           }, index))
       
 19774         })]
       
 19775       }), isUploading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 19776         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 19777           className: "font-library-modal__upload-area",
       
 19778           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ProgressBar, {})
       
 19779         })
       
 19780       }), !isUploading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormFileUpload, {
       
 19781         accept: ALLOWED_FILE_EXTENSIONS.map(ext => `.${ext}`).join(','),
       
 19782         multiple: true,
       
 19783         onChange: onFilesUpload,
       
 19784         render: ({
       
 19785           openFileDialog
       
 19786         }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 19787           className: "font-library-modal__upload-area",
       
 19788           onClick: openFileDialog,
       
 19789           children: (0,external_wp_i18n_namespaceObject.__)('Upload font')
       
 19790         })
       
 19791       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 19792         margin: 2
       
 19793       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 19794         className: "font-library-modal__upload-area__text",
       
 19795         children: (0,external_wp_i18n_namespaceObject.__)('Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.')
       
 19796       })]
       
 19797     })]
       
 19798   });
       
 19799 }
       
 19800 /* harmony default export */ const upload_fonts = (UploadFonts);
       
 19801 
       
 19802 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/index.js
       
 19803 /**
       
 19804  * WordPress dependencies
       
 19805  */
       
 19806 
       
 19807 
       
 19808 
       
 19809 
       
 19810 
       
 19811 
       
 19812 /**
       
 19813  * Internal dependencies
       
 19814  */
       
 19815 
       
 19816 
       
 19817 
       
 19818 
       
 19819 
       
 19820 
       
 19821 
       
 19822 const {
       
 19823   Tabs
       
 19824 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 19825 const DEFAULT_TAB = {
       
 19826   id: 'installed-fonts',
       
 19827   title: (0,external_wp_i18n_namespaceObject._x)('Library', 'Font library')
       
 19828 };
       
 19829 const UPLOAD_TAB = {
       
 19830   id: 'upload-fonts',
       
 19831   title: (0,external_wp_i18n_namespaceObject.__)('Upload')
       
 19832 };
       
 19833 const tabsFromCollections = collections => collections.map(({
       
 19834   slug,
       
 19835   name
       
 19836 }) => ({
       
 19837   id: slug,
       
 19838   title: collections.length === 1 && slug === 'google-fonts' ? (0,external_wp_i18n_namespaceObject.__)('Install Fonts') : name
       
 19839 }));
       
 19840 function FontLibraryModal({
       
 19841   onRequestClose,
       
 19842   defaultTabId = 'installed-fonts'
       
 19843 }) {
       
 19844   const {
       
 19845     collections,
       
 19846     setNotice
       
 19847   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 19848   const canUserCreate = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 19849     const {
       
 19850       canUser
       
 19851     } = select(external_wp_coreData_namespaceObject.store);
       
 19852     return canUser('create', 'font-families');
       
 19853   }, []);
       
 19854   const tabs = [DEFAULT_TAB];
       
 19855   if (canUserCreate) {
       
 19856     tabs.push(UPLOAD_TAB);
       
 19857     tabs.push(...tabsFromCollections(collections || []));
       
 19858   }
       
 19859 
       
 19860   // Reset notice when new tab is selected.
       
 19861   const onSelect = () => {
       
 19862     setNotice(null);
       
 19863   };
       
 19864   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 19865     title: (0,external_wp_i18n_namespaceObject.__)('Fonts'),
       
 19866     onRequestClose: onRequestClose,
       
 19867     isFullScreen: true,
       
 19868     className: "font-library-modal",
       
 19869     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 19870       className: "font-library-modal__tabs",
       
 19871       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tabs, {
       
 19872         defaultTabId: defaultTabId,
       
 19873         onSelect: onSelect,
       
 19874         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabList, {
       
 19875           children: tabs.map(({
       
 19876             id,
       
 19877             title
       
 19878           }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Tab, {
       
 19879             tabId: id,
       
 19880             children: title
       
 19881           }, id))
       
 19882         }), tabs.map(({
       
 19883           id
       
 19884         }) => {
       
 19885           let contents;
       
 19886           switch (id) {
       
 19887             case 'upload-fonts':
       
 19888               contents = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(upload_fonts, {});
       
 19889               break;
       
 19890             case 'installed-fonts':
       
 19891               contents = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(installed_fonts, {});
       
 19892               break;
       
 19893             default:
       
 19894               contents = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_collection, {
       
 19895                 slug: id
       
 19896               });
       
 19897           }
       
 19898           return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabPanel, {
       
 19899             tabId: id,
       
 19900             focusable: false,
       
 19901             children: contents
       
 19902           }, id);
       
 19903         })]
       
 19904       })
       
 19905     })
       
 19906   });
       
 19907 }
       
 19908 /* harmony default export */ const font_library_modal = (FontLibraryModal);
       
 19909 
       
 19910 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-family-item.js
       
 19911 /**
       
 19912  * WordPress dependencies
       
 19913  */
       
 19914 
       
 19915 
       
 19916 
       
 19917 
       
 19918 /**
       
 19919  * Internal dependencies
       
 19920  */
       
 19921 
       
 19922 
       
 19923 
       
 19924 
       
 19925 function FontFamilyItem({
       
 19926   font
       
 19927 }) {
       
 19928   const {
       
 19929     handleSetLibraryFontSelected,
       
 19930     setModalTabOpen
       
 19931   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 19932   const variantsCount = font?.fontFace?.length || 1;
       
 19933   const handleClick = () => {
       
 19934     handleSetLibraryFontSelected(font);
       
 19935     setModalTabOpen('installed-fonts');
       
 19936   };
       
 19937   const previewStyle = getFamilyPreviewStyle(font);
       
 19938   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItem, {
       
 19939     onClick: handleClick,
       
 19940     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 19941       justify: "space-between",
       
 19942       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 19943         style: previewStyle,
       
 19944         children: font.name
       
 19945       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 19946         className: "edit-site-global-styles-screen-typography__font-variants-count",
       
 19947         children: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: Number of font variants. */
       
 19948         (0,external_wp_i18n_namespaceObject._n)('%d variant', '%d variants', variantsCount), variantsCount)
       
 19949       })]
       
 19950     })
       
 19951   });
       
 19952 }
       
 19953 /* harmony default export */ const font_family_item = (FontFamilyItem);
       
 19954 
       
 19955 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-families.js
       
 19956 /**
       
 19957  * WordPress dependencies
       
 19958  */
       
 19959 
       
 19960 
       
 19961 
       
 19962 
       
 19963 
       
 19964 
       
 19965 /**
       
 19966  * Internal dependencies
       
 19967  */
       
 19968 
       
 19969 
       
 19970 
       
 19971 
       
 19972 
       
 19973 
       
 19974 
       
 19975 
       
 19976 
       
 19977 const {
       
 19978   useGlobalSetting: font_families_useGlobalSetting
       
 19979 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 19980 function FontFamilies() {
       
 19981   const {
       
 19982     modalTabOpen,
       
 19983     setModalTabOpen
       
 19984   } = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
       
 19985   const [fontFamilies] = font_families_useGlobalSetting('typography.fontFamilies');
       
 19986   const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map(f => setUIValuesNeeded(f, {
       
 19987     source: 'theme'
       
 19988   })).sort((a, b) => a.name.localeCompare(b.name)) : [];
       
 19989   const customFonts = fontFamilies?.custom ? fontFamilies.custom.map(f => setUIValuesNeeded(f, {
       
 19990     source: 'custom'
       
 19991   })).sort((a, b) => a.name.localeCompare(b.name)) : [];
       
 19992   const hasFonts = 0 < customFonts.length || 0 < themeFonts.length;
       
 19993   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 19994     children: [!!modalTabOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_library_modal, {
       
 19995       onRequestClose: () => setModalTabOpen(null),
       
 19996       defaultTabId: modalTabOpen
       
 19997     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 19998       spacing: 2,
       
 19999       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 20000         justify: "space-between",
       
 20001         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 20002           level: 3,
       
 20003           children: (0,external_wp_i18n_namespaceObject.__)('Fonts')
       
 20004         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 20005           onClick: () => setModalTabOpen('installed-fonts'),
       
 20006           label: (0,external_wp_i18n_namespaceObject.__)('Manage fonts'),
       
 20007           icon: library_settings,
       
 20008           size: "small"
       
 20009         })]
       
 20010       }), hasFonts ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 20011         isBordered: true,
       
 20012         isSeparated: true,
       
 20013         children: [customFonts.map(font => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_family_item, {
       
 20014           font: font
       
 20015         }, font.slug)), themeFonts.map(font => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_family_item, {
       
 20016           font: font
       
 20017         }, font.slug))]
       
 20018       }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 20019         children: [(0,external_wp_i18n_namespaceObject.__)('No fonts installed.'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 20020           className: "edit-site-global-styles-font-families__add-fonts",
       
 20021           variant: "secondary",
       
 20022           onClick: () => setModalTabOpen('upload-fonts'),
       
 20023           children: (0,external_wp_i18n_namespaceObject.__)('Add fonts')
       
 20024         })]
       
 20025       })]
       
 20026     })]
       
 20027   });
       
 20028 }
       
 20029 /* harmony default export */ const font_families = (({
       
 20030   ...props
       
 20031 }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(context, {
       
 20032   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FontFamilies, {
       
 20033     ...props
       
 20034   })
       
 20035 }));
       
 20036 
       
 20037 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-typography.js
       
 20038 /**
       
 20039  * WordPress dependencies
       
 20040  */
       
 20041 
       
 20042 
       
 20043 
       
 20044 
       
 20045 
       
 20046 /**
       
 20047  * Internal dependencies
       
 20048  */
       
 20049 
       
 20050 
       
 20051 
       
 20052 
       
 20053 
       
 20054 
       
 20055 
       
 20056 function ScreenTypography() {
       
 20057   const fontLibraryEnabled = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).getEditorSettings().fontLibraryEnabled, []);
       
 20058   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 20059     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 20060       title: (0,external_wp_i18n_namespaceObject.__)('Typography'),
       
 20061       description: (0,external_wp_i18n_namespaceObject.__)('Typography styles and the application of those styles on site elements.')
       
 20062     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 20063       className: "edit-site-global-styles-screen",
       
 20064       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20065         spacing: 7,
       
 20066         children: [!window.__experimentalDisableFontLibrary && fontLibraryEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_families, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(typography_elements, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TypographyVariations, {
       
 20067           title: (0,external_wp_i18n_namespaceObject.__)('Presets')
       
 20068         })]
       
 20069       })
       
 20070     })]
       
 20071   });
       
 20072 }
       
 20073 /* harmony default export */ const screen_typography = (ScreenTypography);
       
 20074 
       
 20075 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typography-panel.js
       
 20076 /**
       
 20077  * WordPress dependencies
       
 20078  */
       
 20079 
       
 20080 
       
 20081 /**
       
 20082  * Internal dependencies
       
 20083  */
       
 20084 
       
 20085 
       
 20086 const {
       
 20087   useGlobalStyle: typography_panel_useGlobalStyle,
       
 20088   useGlobalSetting: typography_panel_useGlobalSetting,
       
 20089   useSettingsForBlockElement: typography_panel_useSettingsForBlockElement,
       
 20090   TypographyPanel: typography_panel_StylesTypographyPanel
       
 20091 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 20092 function TypographyPanel({
       
 20093   element,
       
 20094   headingLevel
       
 20095 }) {
       
 20096   let prefixParts = [];
       
 20097   if (element === 'heading') {
       
 20098     prefixParts = prefixParts.concat(['elements', headingLevel]);
       
 20099   } else if (element && element !== 'text') {
       
 20100     prefixParts = prefixParts.concat(['elements', element]);
       
 20101   }
       
 20102   const prefix = prefixParts.join('.');
       
 20103   const [style] = typography_panel_useGlobalStyle(prefix, undefined, 'user', {
       
 20104     shouldDecodeEncode: false
       
 20105   });
       
 20106   const [inheritedStyle, setStyle] = typography_panel_useGlobalStyle(prefix, undefined, 'all', {
       
 20107     shouldDecodeEncode: false
       
 20108   });
       
 20109   const [rawSettings] = typography_panel_useGlobalSetting('');
       
 20110   const usedElement = element === 'heading' ? headingLevel : element;
       
 20111   const settings = typography_panel_useSettingsForBlockElement(rawSettings, undefined, usedElement);
       
 20112   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(typography_panel_StylesTypographyPanel, {
       
 20113     inheritedValue: inheritedStyle,
       
 20114     value: style,
       
 20115     onChange: setStyle,
       
 20116     settings: settings
       
 20117   });
       
 20118 }
       
 20119 
       
 20120 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typography-preview.js
       
 20121 /**
       
 20122  * WordPress dependencies
       
 20123  */
       
 20124 
       
 20125 
       
 20126 /**
       
 20127  * Internal dependencies
       
 20128  */
       
 20129 
       
 20130 
       
 20131 const {
       
 20132   useGlobalStyle: typography_preview_useGlobalStyle
       
 20133 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 20134 function TypographyPreview({
       
 20135   name,
       
 20136   element,
       
 20137   headingLevel
       
 20138 }) {
       
 20139   var _ref;
       
 20140   let prefix = '';
       
 20141   if (element === 'heading') {
       
 20142     prefix = `elements.${headingLevel}.`;
       
 20143   } else if (element && element !== 'text') {
       
 20144     prefix = `elements.${element}.`;
       
 20145   }
       
 20146   const [fontFamily] = typography_preview_useGlobalStyle(prefix + 'typography.fontFamily', name);
       
 20147   const [gradientValue] = typography_preview_useGlobalStyle(prefix + 'color.gradient', name);
       
 20148   const [backgroundColor] = typography_preview_useGlobalStyle(prefix + 'color.background', name);
       
 20149   const [fallbackBackgroundColor] = typography_preview_useGlobalStyle('color.background');
       
 20150   const [color] = typography_preview_useGlobalStyle(prefix + 'color.text', name);
       
 20151   const [fontSize] = typography_preview_useGlobalStyle(prefix + 'typography.fontSize', name);
       
 20152   const [fontStyle] = typography_preview_useGlobalStyle(prefix + 'typography.fontStyle', name);
       
 20153   const [fontWeight] = typography_preview_useGlobalStyle(prefix + 'typography.fontWeight', name);
       
 20154   const [letterSpacing] = typography_preview_useGlobalStyle(prefix + 'typography.letterSpacing', name);
       
 20155   const extraStyles = element === 'link' ? {
       
 20156     textDecoration: 'underline'
       
 20157   } : {};
       
 20158   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 20159     className: "edit-site-typography-preview",
       
 20160     style: {
       
 20161       fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
       
 20162       background: (_ref = gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor) !== null && _ref !== void 0 ? _ref : fallbackBackgroundColor,
       
 20163       color,
       
 20164       fontSize,
       
 20165       fontStyle,
       
 20166       fontWeight,
       
 20167       letterSpacing,
       
 20168       ...extraStyles
       
 20169     },
       
 20170     children: "Aa"
       
 20171   });
       
 20172 }
       
 20173 
       
 20174 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-typography-element.js
       
 20175 /**
       
 20176  * WordPress dependencies
       
 20177  */
       
 20178 
       
 20179 
       
 20180 
       
 20181 
       
 20182 /**
       
 20183  * Internal dependencies
       
 20184  */
       
 20185 
       
 20186 
       
 20187 
       
 20188 
       
 20189 
       
 20190 
       
 20191 const screen_typography_element_elements = {
       
 20192   text: {
       
 20193     description: (0,external_wp_i18n_namespaceObject.__)('Manage the fonts used on the site.'),
       
 20194     title: (0,external_wp_i18n_namespaceObject.__)('Text')
       
 20195   },
       
 20196   link: {
       
 20197     description: (0,external_wp_i18n_namespaceObject.__)('Manage the fonts and typography used on the links.'),
       
 20198     title: (0,external_wp_i18n_namespaceObject.__)('Links')
       
 20199   },
       
 20200   heading: {
       
 20201     description: (0,external_wp_i18n_namespaceObject.__)('Manage the fonts and typography used on headings.'),
       
 20202     title: (0,external_wp_i18n_namespaceObject.__)('Headings')
       
 20203   },
       
 20204   caption: {
       
 20205     description: (0,external_wp_i18n_namespaceObject.__)('Manage the fonts and typography used on captions.'),
       
 20206     title: (0,external_wp_i18n_namespaceObject.__)('Captions')
       
 20207   },
       
 20208   button: {
       
 20209     description: (0,external_wp_i18n_namespaceObject.__)('Manage the fonts and typography used on buttons.'),
       
 20210     title: (0,external_wp_i18n_namespaceObject.__)('Buttons')
       
 20211   }
       
 20212 };
       
 20213 function ScreenTypographyElement({
       
 20214   element
       
 20215 }) {
       
 20216   const [headingLevel, setHeadingLevel] = (0,external_wp_element_namespaceObject.useState)('heading');
       
 20217   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 20218     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 20219       title: screen_typography_element_elements[element].title,
       
 20220       description: screen_typography_element_elements[element].description
       
 20221     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 20222       marginX: 4,
       
 20223       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TypographyPreview, {
       
 20224         element: element,
       
 20225         headingLevel: headingLevel
       
 20226       })
       
 20227     }), element === 'heading' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 20228       marginX: 4,
       
 20229       marginBottom: "1em",
       
 20230       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
       
 20231         label: (0,external_wp_i18n_namespaceObject.__)('Select heading level'),
       
 20232         hideLabelFromVision: true,
       
 20233         value: headingLevel,
       
 20234         onChange: setHeadingLevel,
       
 20235         isBlock: true,
       
 20236         size: "__unstable-large",
       
 20237         __nextHasNoMarginBottom: true,
       
 20238         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 20239           value: "heading",
       
 20240           label: (0,external_wp_i18n_namespaceObject._x)('All', 'heading levels')
       
 20241         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 20242           value: "h1",
       
 20243           label: (0,external_wp_i18n_namespaceObject.__)('H1')
       
 20244         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 20245           value: "h2",
       
 20246           label: (0,external_wp_i18n_namespaceObject.__)('H2')
       
 20247         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 20248           value: "h3",
       
 20249           label: (0,external_wp_i18n_namespaceObject.__)('H3')
       
 20250         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 20251           value: "h4",
       
 20252           label: (0,external_wp_i18n_namespaceObject.__)('H4')
       
 20253         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 20254           value: "h5",
       
 20255           label: (0,external_wp_i18n_namespaceObject.__)('H5')
       
 20256         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 20257           value: "h6",
       
 20258           label: (0,external_wp_i18n_namespaceObject.__)('H6')
       
 20259         })]
       
 20260       })
       
 20261     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TypographyPanel, {
       
 20262       element: element,
       
 20263       headingLevel: headingLevel
       
 20264     })]
       
 20265   });
       
 20266 }
       
 20267 /* harmony default export */ const screen_typography_element = (ScreenTypographyElement);
       
 20268 
       
 20269 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
       
 20270 /**
       
 20271  * WordPress dependencies
       
 20272  */
       
 20273 
       
 20274 
       
 20275 /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
       
 20276 
       
 20277 /**
       
 20278  * Return an SVG icon.
       
 20279  *
       
 20280  * @param {IconProps}                                 props icon is the SVG component to render
       
 20281  *                                                          size is a number specifiying the icon size in pixels
       
 20282  *                                                          Other props will be passed to wrapped SVG component
       
 20283  * @param {import('react').ForwardedRef<HTMLElement>} ref   The forwarded ref to the SVG element.
       
 20284  *
       
 20285  * @return {JSX.Element}  Icon component
       
 20286  */
       
 20287 function Icon({
       
 20288   icon,
       
 20289   size = 24,
       
 20290   ...props
       
 20291 }, ref) {
       
 20292   return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
       
 20293     width: size,
       
 20294     height: size,
       
 20295     ...props,
       
 20296     ref
       
 20297   });
       
 20298 }
       
 20299 /* harmony default export */ const build_module_icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon));
       
 20300 
       
 20301 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/shuffle.js
       
 20302 /**
       
 20303  * WordPress dependencies
       
 20304  */
       
 20305 
       
 20306 
       
 20307 const shuffle = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 20308   viewBox: "0 0 24 24",
       
 20309   xmlns: "http://www.w3.org/2000/SVG",
       
 20310   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 20311     d: "M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"
       
 20312   })
       
 20313 });
       
 20314 /* harmony default export */ const library_shuffle = (shuffle);
       
 20315 
       
 20316 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/color-indicator-wrapper.js
       
 20317 /**
       
 20318  * External dependencies
       
 20319  */
       
 20320 
       
 20321 
       
 20322 /**
       
 20323  * WordPress dependencies
       
 20324  */
       
 20325 
       
 20326 
       
 20327 function ColorIndicatorWrapper({
       
 20328   className,
       
 20329   ...props
       
 20330 }) {
       
 20331   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
       
 20332     className: dist_clsx('edit-site-global-styles__color-indicator-wrapper', className),
       
 20333     ...props
       
 20334   });
       
 20335 }
       
 20336 /* harmony default export */ const color_indicator_wrapper = (ColorIndicatorWrapper);
       
 20337 
       
 20338 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/palette.js
       
 20339 /**
       
 20340  * WordPress dependencies
       
 20341  */
       
 20342 
       
 20343 
       
 20344 
       
 20345 
       
 20346 
       
 20347 
       
 20348 /**
       
 20349  * Internal dependencies
       
 20350  */
       
 20351 
       
 20352 
       
 20353 
       
 20354 
       
 20355 
       
 20356 
       
 20357 
       
 20358 const {
       
 20359   useGlobalSetting: palette_useGlobalSetting
       
 20360 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 20361 const EMPTY_COLORS = [];
       
 20362 function Palette({
       
 20363   name
       
 20364 }) {
       
 20365   const [customColors] = palette_useGlobalSetting('color.palette.custom');
       
 20366   const [themeColors] = palette_useGlobalSetting('color.palette.theme');
       
 20367   const [defaultColors] = palette_useGlobalSetting('color.palette.default');
       
 20368   const [defaultPaletteEnabled] = palette_useGlobalSetting('color.defaultPalette', name);
       
 20369   const [randomizeThemeColors] = useColorRandomizer();
       
 20370   const colors = (0,external_wp_element_namespaceObject.useMemo)(() => [...(customColors || EMPTY_COLORS), ...(themeColors || EMPTY_COLORS), ...(defaultColors && defaultPaletteEnabled ? defaultColors : EMPTY_COLORS)], [customColors, themeColors, defaultColors, defaultPaletteEnabled]);
       
 20371   const screenPath = !name ? '/colors/palette' : '/blocks/' + encodeURIComponent(name) + '/colors/palette';
       
 20372   const paletteButtonText = colors.length > 0 ? (0,external_wp_i18n_namespaceObject.__)('Edit palette') : (0,external_wp_i18n_namespaceObject.__)('Add colors');
       
 20373   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20374     spacing: 3,
       
 20375     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 20376       level: 3,
       
 20377       children: (0,external_wp_i18n_namespaceObject.__)('Palette')
       
 20378     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 20379       isBordered: true,
       
 20380       isSeparated: true,
       
 20381       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 20382         path: screenPath,
       
 20383         "aria-label": paletteButtonText,
       
 20384         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 20385           direction: "row",
       
 20386           children: [colors.length <= 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 20387             children: (0,external_wp_i18n_namespaceObject.__)('Add colors')
       
 20388           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalZStack, {
       
 20389             isLayered: false,
       
 20390             offset: -8,
       
 20391             children: colors.slice(0, 5).map(({
       
 20392               color
       
 20393             }, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(color_indicator_wrapper, {
       
 20394               children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ColorIndicator, {
       
 20395                 colorValue: color
       
 20396               })
       
 20397             }, `${color}-${index}`))
       
 20398           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
       
 20399             icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
       
 20400           })]
       
 20401         })
       
 20402       })
       
 20403     }), window.__experimentalEnableColorRandomizer && themeColors?.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 20404       variant: "secondary",
       
 20405       icon: library_shuffle,
       
 20406       onClick: randomizeThemeColors,
       
 20407       children: (0,external_wp_i18n_namespaceObject.__)('Randomize colors')
       
 20408     })]
       
 20409   });
       
 20410 }
       
 20411 /* harmony default export */ const palette = (Palette);
       
 20412 
       
 20413 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-colors.js
       
 20414 /**
       
 20415  * WordPress dependencies
       
 20416  */
       
 20417 
       
 20418 
       
 20419 
       
 20420 
       
 20421 /**
       
 20422  * Internal dependencies
       
 20423  */
       
 20424 
       
 20425 
       
 20426 
       
 20427 
       
 20428 
       
 20429 
       
 20430 const {
       
 20431   useGlobalStyle: screen_colors_useGlobalStyle,
       
 20432   useGlobalSetting: screen_colors_useGlobalSetting,
       
 20433   useSettingsForBlockElement: screen_colors_useSettingsForBlockElement,
       
 20434   ColorPanel: screen_colors_StylesColorPanel
       
 20435 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 20436 function ScreenColors() {
       
 20437   const [style] = screen_colors_useGlobalStyle('', undefined, 'user', {
       
 20438     shouldDecodeEncode: false
       
 20439   });
       
 20440   const [inheritedStyle, setStyle] = screen_colors_useGlobalStyle('', undefined, 'all', {
       
 20441     shouldDecodeEncode: false
       
 20442   });
       
 20443   const [rawSettings] = screen_colors_useGlobalSetting('');
       
 20444   const settings = screen_colors_useSettingsForBlockElement(rawSettings);
       
 20445   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 20446     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 20447       title: (0,external_wp_i18n_namespaceObject.__)('Colors'),
       
 20448       description: (0,external_wp_i18n_namespaceObject.__)('Palette colors and the application of those colors on site elements.')
       
 20449     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 20450       className: "edit-site-global-styles-screen",
       
 20451       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20452         spacing: 7,
       
 20453         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(palette, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_colors_StylesColorPanel, {
       
 20454           inheritedValue: inheritedStyle,
       
 20455           value: style,
       
 20456           onChange: setStyle,
       
 20457           settings: settings
       
 20458         })]
       
 20459       })
       
 20460     })]
       
 20461   });
       
 20462 }
       
 20463 /* harmony default export */ const screen_colors = (ScreenColors);
       
 20464 
       
 20465 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preset-colors.js
       
 20466 /**
       
 20467  * Internal dependencies
       
 20468  */
       
 20469 
       
 20470 
       
 20471 function PresetColors() {
       
 20472   const {
       
 20473     paletteColors
       
 20474   } = useStylesPreviewColors();
       
 20475   return paletteColors.slice(0, 5).map(({
       
 20476     slug,
       
 20477     color
       
 20478   }, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 20479     style: {
       
 20480       flexGrow: 1,
       
 20481       height: '100%',
       
 20482       background: color
       
 20483     }
       
 20484   }, `${slug}-${index}`));
       
 20485 }
       
 20486 
       
 20487 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preview-colors.js
       
 20488 /**
       
 20489  * WordPress dependencies
       
 20490  */
       
 20491 
       
 20492 
       
 20493 /**
       
 20494  * Internal dependencies
       
 20495  */
       
 20496 
       
 20497 
       
 20498 
       
 20499 const preview_colors_firstFrameVariants = {
       
 20500   start: {
       
 20501     scale: 1,
       
 20502     opacity: 1
       
 20503   },
       
 20504   hover: {
       
 20505     scale: 0,
       
 20506     opacity: 0
       
 20507   }
       
 20508 };
       
 20509 const StylesPreviewColors = ({
       
 20510   label,
       
 20511   isFocused,
       
 20512   withHoverView
       
 20513 }) => {
       
 20514   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewIframe, {
       
 20515     label: label,
       
 20516     isFocused: isFocused,
       
 20517     withHoverView: withHoverView,
       
 20518     children: ({
       
 20519       key
       
 20520     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 20521       variants: preview_colors_firstFrameVariants,
       
 20522       style: {
       
 20523         height: '100%',
       
 20524         overflow: 'hidden'
       
 20525       },
       
 20526       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 20527         spacing: 0,
       
 20528         justify: "center",
       
 20529         style: {
       
 20530           height: '100%',
       
 20531           overflow: 'hidden'
       
 20532         },
       
 20533         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PresetColors, {})
       
 20534       })
       
 20535     }, key)
       
 20536   });
       
 20537 };
       
 20538 /* harmony default export */ const preview_colors = (StylesPreviewColors);
       
 20539 
       
 20540 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variations-color.js
       
 20541 /**
       
 20542  * WordPress dependencies
       
 20543  */
       
 20544 
       
 20545 
       
 20546 /**
       
 20547  * Internal dependencies
       
 20548  */
       
 20549 
       
 20550 
       
 20551 
       
 20552 
       
 20553 
       
 20554 
       
 20555 function ColorVariations({
       
 20556   title,
       
 20557   gap = 2
       
 20558 }) {
       
 20559   const colorVariations = useColorVariations();
       
 20560 
       
 20561   // Return null if there is only one variation (the default).
       
 20562   if (colorVariations?.length <= 1) {
       
 20563     return null;
       
 20564   }
       
 20565   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20566     spacing: 3,
       
 20567     children: [title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 20568       level: 3,
       
 20569       children: title
       
 20570     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalGrid, {
       
 20571       spacing: gap,
       
 20572       children: colorVariations.map((variation, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Variation, {
       
 20573         variation: variation,
       
 20574         isPill: true,
       
 20575         property: "color",
       
 20576         children: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(preview_colors, {})
       
 20577       }, index))
       
 20578     })]
       
 20579   });
       
 20580 }
       
 20581 
       
 20582 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/color-palette-panel.js
       
 20583 /**
       
 20584  * WordPress dependencies
       
 20585  */
       
 20586 
       
 20587 
       
 20588 
       
 20589 
       
 20590 
       
 20591 /**
       
 20592  * Internal dependencies
       
 20593  */
       
 20594 
       
 20595 
       
 20596 
       
 20597 
       
 20598 const {
       
 20599   useGlobalSetting: color_palette_panel_useGlobalSetting
       
 20600 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 20601 const mobilePopoverProps = {
       
 20602   placement: 'bottom-start',
       
 20603   offset: 8
       
 20604 };
       
 20605 function ColorPalettePanel({
       
 20606   name
       
 20607 }) {
       
 20608   const [themeColors, setThemeColors] = color_palette_panel_useGlobalSetting('color.palette.theme', name);
       
 20609   const [baseThemeColors] = color_palette_panel_useGlobalSetting('color.palette.theme', name, 'base');
       
 20610   const [defaultColors, setDefaultColors] = color_palette_panel_useGlobalSetting('color.palette.default', name);
       
 20611   const [baseDefaultColors] = color_palette_panel_useGlobalSetting('color.palette.default', name, 'base');
       
 20612   const [customColors, setCustomColors] = color_palette_panel_useGlobalSetting('color.palette.custom', name);
       
 20613   const [defaultPaletteEnabled] = color_palette_panel_useGlobalSetting('color.defaultPalette', name);
       
 20614   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small', '<');
       
 20615   const popoverProps = isMobileViewport ? mobilePopoverProps : undefined;
       
 20616   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20617     className: "edit-site-global-styles-color-palette-panel",
       
 20618     spacing: 8,
       
 20619     children: [!!themeColors && !!themeColors.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
 20620       canReset: themeColors !== baseThemeColors,
       
 20621       canOnlyChangeValues: true,
       
 20622       colors: themeColors,
       
 20623       onChange: setThemeColors,
       
 20624       paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Theme'),
       
 20625       paletteLabelHeadingLevel: 3,
       
 20626       popoverProps: popoverProps
       
 20627     }), !!defaultColors && !!defaultColors.length && !!defaultPaletteEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
 20628       canReset: defaultColors !== baseDefaultColors,
       
 20629       canOnlyChangeValues: true,
       
 20630       colors: defaultColors,
       
 20631       onChange: setDefaultColors,
       
 20632       paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Default'),
       
 20633       paletteLabelHeadingLevel: 3,
       
 20634       popoverProps: popoverProps
       
 20635     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
 20636       colors: customColors,
       
 20637       onChange: setCustomColors,
       
 20638       paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Custom'),
       
 20639       paletteLabelHeadingLevel: 3,
       
 20640       slugPrefix: "custom-",
       
 20641       popoverProps: popoverProps
       
 20642     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorVariations, {
       
 20643       title: (0,external_wp_i18n_namespaceObject.__)('Palettes')
       
 20644     })]
       
 20645   });
       
 20646 }
       
 20647 
       
 20648 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/gradients-palette-panel.js
       
 20649 /**
       
 20650  * WordPress dependencies
       
 20651  */
       
 20652 
       
 20653 
       
 20654 
       
 20655 
       
 20656 
       
 20657 /**
       
 20658  * Internal dependencies
       
 20659  */
       
 20660 
       
 20661 
       
 20662 
       
 20663 
       
 20664 const {
       
 20665   useGlobalSetting: gradients_palette_panel_useGlobalSetting
       
 20666 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 20667 const gradients_palette_panel_mobilePopoverProps = {
       
 20668   placement: 'bottom-start',
       
 20669   offset: 8
       
 20670 };
       
 20671 const noop = () => {};
       
 20672 function GradientPalettePanel({
       
 20673   name
       
 20674 }) {
       
 20675   const [themeGradients, setThemeGradients] = gradients_palette_panel_useGlobalSetting('color.gradients.theme', name);
       
 20676   const [baseThemeGradients] = gradients_palette_panel_useGlobalSetting('color.gradients.theme', name, 'base');
       
 20677   const [defaultGradients, setDefaultGradients] = gradients_palette_panel_useGlobalSetting('color.gradients.default', name);
       
 20678   const [baseDefaultGradients] = gradients_palette_panel_useGlobalSetting('color.gradients.default', name, 'base');
       
 20679   const [customGradients, setCustomGradients] = gradients_palette_panel_useGlobalSetting('color.gradients.custom', name);
       
 20680   const [defaultPaletteEnabled] = gradients_palette_panel_useGlobalSetting('color.defaultGradients', name);
       
 20681   const [customDuotone] = gradients_palette_panel_useGlobalSetting('color.duotone.custom') || [];
       
 20682   const [defaultDuotone] = gradients_palette_panel_useGlobalSetting('color.duotone.default') || [];
       
 20683   const [themeDuotone] = gradients_palette_panel_useGlobalSetting('color.duotone.theme') || [];
       
 20684   const [defaultDuotoneEnabled] = gradients_palette_panel_useGlobalSetting('color.defaultDuotone');
       
 20685   const duotonePalette = [...(customDuotone || []), ...(themeDuotone || []), ...(defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : [])];
       
 20686   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small', '<');
       
 20687   const popoverProps = isMobileViewport ? gradients_palette_panel_mobilePopoverProps : undefined;
       
 20688   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20689     className: "edit-site-global-styles-gradient-palette-panel",
       
 20690     spacing: 8,
       
 20691     children: [!!themeGradients && !!themeGradients.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
 20692       canReset: themeGradients !== baseThemeGradients,
       
 20693       canOnlyChangeValues: true,
       
 20694       gradients: themeGradients,
       
 20695       onChange: setThemeGradients,
       
 20696       paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Theme'),
       
 20697       paletteLabelHeadingLevel: 3,
       
 20698       popoverProps: popoverProps
       
 20699     }), !!defaultGradients && !!defaultGradients.length && !!defaultPaletteEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
 20700       canReset: defaultGradients !== baseDefaultGradients,
       
 20701       canOnlyChangeValues: true,
       
 20702       gradients: defaultGradients,
       
 20703       onChange: setDefaultGradients,
       
 20704       paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Default'),
       
 20705       paletteLabelLevel: 3,
       
 20706       popoverProps: popoverProps
       
 20707     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalPaletteEdit, {
       
 20708       gradients: customGradients,
       
 20709       onChange: setCustomGradients,
       
 20710       paletteLabel: (0,external_wp_i18n_namespaceObject.__)('Custom'),
       
 20711       paletteLabelLevel: 3,
       
 20712       slugPrefix: "custom-",
       
 20713       popoverProps: popoverProps
       
 20714     }), !!duotonePalette && !!duotonePalette.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 20715       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 20716         level: 3,
       
 20717         children: (0,external_wp_i18n_namespaceObject.__)('Duotone')
       
 20718       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 20719         margin: 3
       
 20720       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DuotonePicker, {
       
 20721         duotonePalette: duotonePalette,
       
 20722         disableCustomDuotone: true,
       
 20723         disableCustomColors: true,
       
 20724         clearable: false,
       
 20725         onChange: noop
       
 20726       })]
       
 20727     })]
       
 20728   });
       
 20729 }
       
 20730 
       
 20731 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-color-palette.js
       
 20732 /**
       
 20733  * WordPress dependencies
       
 20734  */
       
 20735 
       
 20736 
       
 20737 
       
 20738 /**
       
 20739  * Internal dependencies
       
 20740  */
       
 20741 
       
 20742 
       
 20743 
       
 20744 
       
 20745 
       
 20746 
       
 20747 
       
 20748 const {
       
 20749   Tabs: screen_color_palette_Tabs
       
 20750 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 20751 function ScreenColorPalette({
       
 20752   name
       
 20753 }) {
       
 20754   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 20755     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 20756       title: (0,external_wp_i18n_namespaceObject.__)('Edit palette'),
       
 20757       description: (0,external_wp_i18n_namespaceObject.__)('The combination of colors used across the site and in color pickers.')
       
 20758     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(screen_color_palette_Tabs, {
       
 20759       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(screen_color_palette_Tabs.TabList, {
       
 20760         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_color_palette_Tabs.Tab, {
       
 20761           tabId: "color",
       
 20762           children: (0,external_wp_i18n_namespaceObject.__)('Color')
       
 20763         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_color_palette_Tabs.Tab, {
       
 20764           tabId: "gradient",
       
 20765           children: (0,external_wp_i18n_namespaceObject.__)('Gradient')
       
 20766         })]
       
 20767       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_color_palette_Tabs.TabPanel, {
       
 20768         tabId: "color",
       
 20769         focusable: false,
       
 20770         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorPalettePanel, {
       
 20771           name: name
       
 20772         })
       
 20773       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_color_palette_Tabs.TabPanel, {
       
 20774         tabId: "gradient",
       
 20775         focusable: false,
       
 20776         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GradientPalettePanel, {
       
 20777           name: name
       
 20778         })
       
 20779       })]
       
 20780     })]
       
 20781   });
       
 20782 }
       
 20783 /* harmony default export */ const screen_color_palette = (ScreenColorPalette);
       
 20784 
       
 20785 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
       
 20786 /**
       
 20787  * WordPress dependencies
       
 20788  */
       
 20789 
       
 20790 
       
 20791 const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 20792   xmlns: "http://www.w3.org/2000/svg",
       
 20793   viewBox: "0 0 24 24",
       
 20794   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 20795     d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
       
 20796   })
       
 20797 });
       
 20798 /* harmony default export */ const library_plus = (plus);
       
 20799 
       
 20800 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/shadows-panel.js
       
 20801 /**
       
 20802  * WordPress dependencies
       
 20803  */
       
 20804 
       
 20805 
       
 20806 
       
 20807 
       
 20808 
       
 20809 /**
       
 20810  * Internal dependencies
       
 20811  */
       
 20812 
       
 20813 
       
 20814 
       
 20815 
       
 20816 
       
 20817 
       
 20818 
       
 20819 
       
 20820 const {
       
 20821   useGlobalSetting: shadows_panel_useGlobalSetting
       
 20822 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 20823 const defaultShadow = '6px 6px 9px rgba(0, 0, 0, 0.2)';
       
 20824 function ShadowsPanel() {
       
 20825   const [defaultShadows] = shadows_panel_useGlobalSetting('shadow.presets.default');
       
 20826   const [defaultShadowsEnabled] = shadows_panel_useGlobalSetting('shadow.defaultPresets');
       
 20827   const [themeShadows] = shadows_panel_useGlobalSetting('shadow.presets.theme');
       
 20828   const [customShadows, setCustomShadows] = shadows_panel_useGlobalSetting('shadow.presets.custom');
       
 20829   const onCreateShadow = shadow => {
       
 20830     setCustomShadows([...(customShadows || []), shadow]);
       
 20831   };
       
 20832   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 20833     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 20834       title: (0,external_wp_i18n_namespaceObject.__)('Shadows'),
       
 20835       description: (0,external_wp_i18n_namespaceObject.__)('Manage and create shadow styles for use across the site.')
       
 20836     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 20837       className: "edit-site-global-styles-screen",
       
 20838       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20839         className: "edit-site-global-styles__shadows-panel",
       
 20840         spacing: 7,
       
 20841         children: [defaultShadowsEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowList, {
       
 20842           label: (0,external_wp_i18n_namespaceObject.__)('Default'),
       
 20843           shadows: defaultShadows || [],
       
 20844           category: "default"
       
 20845         }), themeShadows && themeShadows.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowList, {
       
 20846           label: (0,external_wp_i18n_namespaceObject.__)('Theme'),
       
 20847           shadows: themeShadows || [],
       
 20848           category: "theme"
       
 20849         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowList, {
       
 20850           label: (0,external_wp_i18n_namespaceObject.__)('Custom'),
       
 20851           shadows: customShadows || [],
       
 20852           category: "custom",
       
 20853           canCreate: true,
       
 20854           onCreate: onCreateShadow
       
 20855         })]
       
 20856       })
       
 20857     })]
       
 20858   });
       
 20859 }
       
 20860 function ShadowList({
       
 20861   label,
       
 20862   shadows,
       
 20863   category,
       
 20864   canCreate,
       
 20865   onCreate
       
 20866 }) {
       
 20867   const handleAddShadow = () => {
       
 20868     const newIndex = getNewIndexFromPresets(shadows, 'shadow-');
       
 20869     onCreate({
       
 20870       name: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: is an index for a preset */
       
 20871       (0,external_wp_i18n_namespaceObject.__)('Shadow %s'), newIndex),
       
 20872       shadow: defaultShadow,
       
 20873       slug: `shadow-${newIndex}`
       
 20874     });
       
 20875   };
       
 20876   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 20877     spacing: 2,
       
 20878     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 20879       justify: "space-between",
       
 20880       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
       
 20881         align: "center",
       
 20882         className: "edit-site-global-styles__shadows-panel__title",
       
 20883         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 20884           level: 3,
       
 20885           children: label
       
 20886         })
       
 20887       }), canCreate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 20888         className: "edit-site-global-styles__shadows-panel__options-container",
       
 20889         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 20890           size: "small",
       
 20891           icon: library_plus,
       
 20892           label: (0,external_wp_i18n_namespaceObject.__)('Add shadow'),
       
 20893           onClick: () => {
       
 20894             handleAddShadow();
       
 20895           }
       
 20896         })
       
 20897       })]
       
 20898     }), shadows.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 20899       isBordered: true,
       
 20900       isSeparated: true,
       
 20901       children: shadows.map(shadow => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowItem, {
       
 20902         shadow: shadow,
       
 20903         category: category
       
 20904       }, shadow.slug))
       
 20905     })]
       
 20906   });
       
 20907 }
       
 20908 function ShadowItem({
       
 20909   shadow,
       
 20910   category
       
 20911 }) {
       
 20912   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
       
 20913     path: `/shadows/edit/${category}/${shadow.slug}`,
       
 20914     "aria-label":
       
 20915     // translators: %s: name of the shadow
       
 20916     (0,external_wp_i18n_namespaceObject.sprintf)('Edit shadow %s', shadow.name),
       
 20917     icon: library_shadow,
       
 20918     children: shadow.name
       
 20919   });
       
 20920 }
       
 20921 
       
 20922 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/reset.js
       
 20923 /**
       
 20924  * WordPress dependencies
       
 20925  */
       
 20926 
       
 20927 
       
 20928 const reset_reset = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 20929   xmlns: "http://www.w3.org/2000/svg",
       
 20930   viewBox: "0 0 24 24",
       
 20931   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 20932     d: "M7 11.5h10V13H7z"
       
 20933   })
       
 20934 });
       
 20935 /* harmony default export */ const library_reset = (reset_reset);
       
 20936 
       
 20937 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/shadow-utils.js
       
 20938 const CUSTOM_VALUE_SETTINGS = {
       
 20939   px: {
       
 20940     max: 20,
       
 20941     step: 1
       
 20942   },
       
 20943   '%': {
       
 20944     max: 100,
       
 20945     step: 1
       
 20946   },
       
 20947   vw: {
       
 20948     max: 100,
       
 20949     step: 1
       
 20950   },
       
 20951   vh: {
       
 20952     max: 100,
       
 20953     step: 1
       
 20954   },
       
 20955   em: {
       
 20956     max: 10,
       
 20957     step: 0.1
       
 20958   },
       
 20959   rm: {
       
 20960     max: 10,
       
 20961     step: 0.1
       
 20962   },
       
 20963   svw: {
       
 20964     max: 100,
       
 20965     step: 1
       
 20966   },
       
 20967   lvw: {
       
 20968     max: 100,
       
 20969     step: 1
       
 20970   },
       
 20971   dvw: {
       
 20972     max: 100,
       
 20973     step: 1
       
 20974   },
       
 20975   svh: {
       
 20976     max: 100,
       
 20977     step: 1
       
 20978   },
       
 20979   lvh: {
       
 20980     max: 100,
       
 20981     step: 1
       
 20982   },
       
 20983   dvh: {
       
 20984     max: 100,
       
 20985     step: 1
       
 20986   },
       
 20987   vi: {
       
 20988     max: 100,
       
 20989     step: 1
       
 20990   },
       
 20991   svi: {
       
 20992     max: 100,
       
 20993     step: 1
       
 20994   },
       
 20995   lvi: {
       
 20996     max: 100,
       
 20997     step: 1
       
 20998   },
       
 20999   dvi: {
       
 21000     max: 100,
       
 21001     step: 1
       
 21002   },
       
 21003   vb: {
       
 21004     max: 100,
       
 21005     step: 1
       
 21006   },
       
 21007   svb: {
       
 21008     max: 100,
       
 21009     step: 1
       
 21010   },
       
 21011   lvb: {
       
 21012     max: 100,
       
 21013     step: 1
       
 21014   },
       
 21015   dvb: {
       
 21016     max: 100,
       
 21017     step: 1
       
 21018   },
       
 21019   vmin: {
       
 21020     max: 100,
       
 21021     step: 1
       
 21022   },
       
 21023   svmin: {
       
 21024     max: 100,
       
 21025     step: 1
       
 21026   },
       
 21027   lvmin: {
       
 21028     max: 100,
       
 21029     step: 1
       
 21030   },
       
 21031   dvmin: {
       
 21032     max: 100,
       
 21033     step: 1
       
 21034   },
       
 21035   vmax: {
       
 21036     max: 100,
       
 21037     step: 1
       
 21038   },
       
 21039   svmax: {
       
 21040     max: 100,
       
 21041     step: 1
       
 21042   },
       
 21043   lvmax: {
       
 21044     max: 100,
       
 21045     step: 1
       
 21046   },
       
 21047   dvmax: {
       
 21048     max: 100,
       
 21049     step: 1
       
 21050   }
       
 21051 };
       
 21052 function getShadowParts(shadow) {
       
 21053   const shadowValues = shadow.match(/(?:[^,(]|\([^)]*\))+/g) || [];
       
 21054   return shadowValues.map(value => value.trim());
       
 21055 }
       
 21056 function shadowStringToObject(shadowValue) {
       
 21057   /*
       
 21058    * Shadow spec: https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
       
 21059    * Shadow string format: <offset-x> <offset-y> <blur-radius> <spread-radius> <color> [inset]
       
 21060    *
       
 21061    * A shadow to be valid it must satisfy the following.
       
 21062    *
       
 21063    * 1. Should not contain "none" keyword.
       
 21064    * 2. Values x, y, blur, spread should be in the order. Color and inset can be anywhere in the string except in between x, y, blur, spread values.
       
 21065    * 3. Should not contain more than one set of x, y, blur, spread values.
       
 21066    * 4. Should contain at least x and y values. Others are optional.
       
 21067    * 5. Should not contain more than one "inset" (case insensitive) keyword.
       
 21068    * 6. Should not contain more than one color value.
       
 21069    */
       
 21070 
       
 21071   const defaultShadow = {
       
 21072     x: '0',
       
 21073     y: '0',
       
 21074     blur: '0',
       
 21075     spread: '0',
       
 21076     color: '#000',
       
 21077     inset: false
       
 21078   };
       
 21079   if (!shadowValue) {
       
 21080     return defaultShadow;
       
 21081   }
       
 21082 
       
 21083   // Rule 1: Should not contain "none" keyword.
       
 21084   // if the shadow has "none" keyword, it is not a valid shadow string
       
 21085   if (shadowValue.includes('none')) {
       
 21086     return defaultShadow;
       
 21087   }
       
 21088 
       
 21089   // Rule 2: Values x, y, blur, spread should be in the order.
       
 21090   //		   Color and inset can be anywhere in the string except in between x, y, blur, spread values.
       
 21091   // Extract length values (x, y, blur, spread) from shadow string
       
 21092   // Regex match groups of 1 to 4 length values.
       
 21093   const lengthsRegex = /((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g;
       
 21094   const matches = shadowValue.match(lengthsRegex) || [];
       
 21095 
       
 21096   // Rule 3: Should not contain more than one set of x, y, blur, spread values.
       
 21097   // if the string doesn't contain exactly 1 set of x, y, blur, spread values,
       
 21098   // it is not a valid shadow string
       
 21099   if (matches.length !== 1) {
       
 21100     return defaultShadow;
       
 21101   }
       
 21102 
       
 21103   // Extract length values (x, y, blur, spread) from shadow string
       
 21104   const lengths = matches[0].split(' ').map(value => value.trim()).filter(value => value);
       
 21105 
       
 21106   // Rule 4: Should contain at least x and y values. Others are optional.
       
 21107   if (lengths.length < 2) {
       
 21108     return defaultShadow;
       
 21109   }
       
 21110 
       
 21111   // Rule 5: Should not contain more than one "inset" (case insensitive) keyword.
       
 21112   // check if the shadow string contains "inset" keyword
       
 21113   const insets = shadowValue.match(/inset/gi) || [];
       
 21114   if (insets.length > 1) {
       
 21115     return defaultShadow;
       
 21116   }
       
 21117 
       
 21118   // Strip lengths and inset from shadow string, leaving just color.
       
 21119   const hasInset = insets.length === 1;
       
 21120   let colorString = shadowValue.replace(lengthsRegex, '').trim();
       
 21121   if (hasInset) {
       
 21122     colorString = colorString.replace('inset', '').replace('INSET', '').trim();
       
 21123   }
       
 21124 
       
 21125   // Rule 6: Should not contain more than one color value.
       
 21126   // validate color string with regular expression
       
 21127   // check if color has matching hex, rgb or hsl values
       
 21128   const colorRegex = /^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi;
       
 21129   let colorMatches = (colorString.match(colorRegex) || []).map(value => value?.trim()).filter(value => value);
       
 21130 
       
 21131   // If color string has more than one color values, it is not a valid
       
 21132   if (colorMatches.length > 1) {
       
 21133     return defaultShadow;
       
 21134   } else if (colorMatches.length === 0) {
       
 21135     // check if color string has multiple named color values separated by space
       
 21136     colorMatches = colorString.trim().split(' ').filter(value => value);
       
 21137     // If color string has more than one color values, it is not a valid
       
 21138     if (colorMatches.length > 1) {
       
 21139       return defaultShadow;
       
 21140     }
       
 21141   }
       
 21142 
       
 21143   // Return parsed shadow object.
       
 21144   const [x, y, blur, spread] = lengths;
       
 21145   return {
       
 21146     x,
       
 21147     y,
       
 21148     blur: blur || defaultShadow.blur,
       
 21149     spread: spread || defaultShadow.spread,
       
 21150     inset: hasInset,
       
 21151     color: colorString || defaultShadow.color
       
 21152   };
       
 21153 }
       
 21154 function shadowObjectToString(shadowObj) {
       
 21155   const shadowString = `${shadowObj.x || '0px'} ${shadowObj.y || '0px'} ${shadowObj.blur || '0px'} ${shadowObj.spread || '0px'}`;
       
 21156   return `${shadowObj.inset ? 'inset' : ''} ${shadowString} ${shadowObj.color || ''}`.trim();
       
 21157 }
       
 21158 
       
 21159 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/shadows-edit-panel.js
       
 21160 /**
       
 21161  * External dependencies
       
 21162  */
       
 21163 
       
 21164 
       
 21165 /**
       
 21166  * WordPress dependencies
       
 21167  */
       
 21168 
       
 21169 
       
 21170 
       
 21171 
       
 21172 
       
 21173 
       
 21174 /**
       
 21175  * Internal dependencies
       
 21176  */
       
 21177 
       
 21178 
       
 21179 
       
 21180 
       
 21181 
       
 21182 
       
 21183 
       
 21184 
       
 21185 const {
       
 21186   useGlobalSetting: shadows_edit_panel_useGlobalSetting
       
 21187 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 21188 const {
       
 21189   DropdownMenuV2: DropdownMenu,
       
 21190   DropdownMenuItemV2: DropdownMenuItem,
       
 21191   DropdownMenuItemLabelV2: DropdownMenuItemLabel
       
 21192 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 21193 const customShadowMenuItems = [{
       
 21194   label: (0,external_wp_i18n_namespaceObject.__)('Rename'),
       
 21195   action: 'rename'
       
 21196 }, {
       
 21197   label: (0,external_wp_i18n_namespaceObject.__)('Delete'),
       
 21198   action: 'delete'
       
 21199 }];
       
 21200 const presetShadowMenuItems = [{
       
 21201   label: (0,external_wp_i18n_namespaceObject.__)('Reset'),
       
 21202   action: 'reset'
       
 21203 }];
       
 21204 function ShadowsEditPanel() {
       
 21205   const {
       
 21206     params: {
       
 21207       category,
       
 21208       slug
       
 21209     },
       
 21210     goTo
       
 21211   } = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 21212   const [shadows, setShadows] = shadows_edit_panel_useGlobalSetting(`shadow.presets.${category}`);
       
 21213   const [baseShadows] = shadows_edit_panel_useGlobalSetting(`shadow.presets.${category}`, undefined, 'base');
       
 21214   const [selectedShadow, setSelectedShadow] = (0,external_wp_element_namespaceObject.useState)(() => (shadows || []).find(shadow => shadow.slug === slug));
       
 21215   const baseSelectedShadow = (0,external_wp_element_namespaceObject.useMemo)(() => (baseShadows || []).find(b => b.slug === slug), [baseShadows, slug]);
       
 21216   const [isConfirmDialogVisible, setIsConfirmDialogVisible] = (0,external_wp_element_namespaceObject.useState)(false);
       
 21217   const [isRenameModalVisible, setIsRenameModalVisible] = (0,external_wp_element_namespaceObject.useState)(false);
       
 21218   const [shadowName, setShadowName] = (0,external_wp_element_namespaceObject.useState)(selectedShadow.name);
       
 21219   const onShadowChange = shadow => {
       
 21220     setSelectedShadow({
       
 21221       ...selectedShadow,
       
 21222       shadow
       
 21223     });
       
 21224     const updatedShadows = shadows.map(s => s.slug === slug ? {
       
 21225       ...selectedShadow,
       
 21226       shadow
       
 21227     } : s);
       
 21228     setShadows(updatedShadows);
       
 21229   };
       
 21230   const onMenuClick = action => {
       
 21231     if (action === 'reset') {
       
 21232       const updatedShadows = shadows.map(s => s.slug === slug ? baseSelectedShadow : s);
       
 21233       setSelectedShadow(baseSelectedShadow);
       
 21234       setShadows(updatedShadows);
       
 21235     } else if (action === 'delete') {
       
 21236       setIsConfirmDialogVisible(true);
       
 21237     } else if (action === 'rename') {
       
 21238       setIsRenameModalVisible(true);
       
 21239     }
       
 21240   };
       
 21241   const handleShadowDelete = () => {
       
 21242     const updatedShadows = shadows.filter(s => s.slug !== slug);
       
 21243     setShadows(updatedShadows);
       
 21244     goTo(`/shadows`);
       
 21245   };
       
 21246   const handleShadowRename = newName => {
       
 21247     if (!newName) {
       
 21248       return;
       
 21249     }
       
 21250     const updatedShadows = shadows.map(s => s.slug === slug ? {
       
 21251       ...selectedShadow,
       
 21252       name: newName
       
 21253     } : s);
       
 21254     setSelectedShadow({
       
 21255       ...selectedShadow,
       
 21256       name: newName
       
 21257     });
       
 21258     setShadows(updatedShadows);
       
 21259   };
       
 21260   return !selectedShadow ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 21261     title: ""
       
 21262   }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 21263     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 21264       justify: "space-between",
       
 21265       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 21266         title: selectedShadow.name
       
 21267       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 21268         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 21269           marginTop: 2,
       
 21270           marginBottom: 0,
       
 21271           paddingX: 4,
       
 21272           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenu, {
       
 21273             trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 21274               size: "small",
       
 21275               icon: more_vertical,
       
 21276               label: (0,external_wp_i18n_namespaceObject.__)('Menu')
       
 21277             }),
       
 21278             children: (category === 'custom' ? customShadowMenuItems : presetShadowMenuItems).map(item => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItem, {
       
 21279               onClick: () => onMenuClick(item.action),
       
 21280               disabled: item.action === 'reset' && selectedShadow.shadow === baseSelectedShadow.shadow,
       
 21281               children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemLabel, {
       
 21282                 children: item.label
       
 21283               })
       
 21284             }, item.action))
       
 21285           })
       
 21286         })
       
 21287       })]
       
 21288     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 21289       className: "edit-site-global-styles-screen",
       
 21290       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowsPreview, {
       
 21291         shadow: selectedShadow.shadow
       
 21292       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowEditor, {
       
 21293         shadow: selectedShadow.shadow,
       
 21294         onChange: onShadowChange
       
 21295       })]
       
 21296     }), isConfirmDialogVisible && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
       
 21297       isOpen: true,
       
 21298       onConfirm: () => {
       
 21299         handleShadowDelete();
       
 21300         setIsConfirmDialogVisible(false);
       
 21301       },
       
 21302       onCancel: () => {
       
 21303         setIsConfirmDialogVisible(false);
       
 21304       },
       
 21305       confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Delete'),
       
 21306       size: "medium",
       
 21307       children: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 21308       // translators: %s: name of the shadow
       
 21309       'Are you sure you want to delete "%s"?', selectedShadow.name)
       
 21310     }), isRenameModalVisible && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 21311       title: (0,external_wp_i18n_namespaceObject.__)('Rename'),
       
 21312       onRequestClose: () => setIsRenameModalVisible(false),
       
 21313       size: "small",
       
 21314       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", {
       
 21315         onSubmit: event => {
       
 21316           event.preventDefault();
       
 21317           handleShadowRename(shadowName);
       
 21318           setIsRenameModalVisible(false);
       
 21319         },
       
 21320         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControl, {
       
 21321           autoComplete: "off",
       
 21322           label: (0,external_wp_i18n_namespaceObject.__)('Name'),
       
 21323           placeholder: (0,external_wp_i18n_namespaceObject.__)('Shadow name'),
       
 21324           value: shadowName,
       
 21325           onChange: value => setShadowName(value)
       
 21326         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 21327           marginBottom: 6
       
 21328         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 21329           className: "block-editor-shadow-edit-modal__actions",
       
 21330           justify: "flex-end",
       
 21331           expanded: false,
       
 21332           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 21333             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 21334               variant: "tertiary",
       
 21335               onClick: () => setIsRenameModalVisible(false),
       
 21336               children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
       
 21337             })
       
 21338           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 21339             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 21340               variant: "primary",
       
 21341               type: "submit",
       
 21342               children: (0,external_wp_i18n_namespaceObject.__)('Save')
       
 21343             })
       
 21344           })]
       
 21345         })]
       
 21346       })
       
 21347     })]
       
 21348   });
       
 21349 }
       
 21350 function ShadowsPreview({
       
 21351   shadow
       
 21352 }) {
       
 21353   const shadowStyle = {
       
 21354     boxShadow: shadow
       
 21355   };
       
 21356   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
       
 21357     marginBottom: 4,
       
 21358     marginTop: -2,
       
 21359     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 21360       align: "center",
       
 21361       justify: "center",
       
 21362       className: "edit-site-global-styles__shadow-preview-panel",
       
 21363       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 21364         className: "edit-site-global-styles__shadow-preview-block",
       
 21365         style: shadowStyle
       
 21366       })
       
 21367     })
       
 21368   });
       
 21369 }
       
 21370 function ShadowEditor({
       
 21371   shadow,
       
 21372   onChange
       
 21373 }) {
       
 21374   const shadowParts = (0,external_wp_element_namespaceObject.useMemo)(() => getShadowParts(shadow), [shadow]);
       
 21375   const onChangeShadowPart = (index, part) => {
       
 21376     shadowParts[index] = part;
       
 21377     onChange(shadowParts.join(', '));
       
 21378   };
       
 21379   const onAddShadowPart = () => {
       
 21380     shadowParts.push(defaultShadow);
       
 21381     onChange(shadowParts.join(', '));
       
 21382   };
       
 21383   const onRemoveShadowPart = index => {
       
 21384     shadowParts.splice(index, 1);
       
 21385     onChange(shadowParts.join(', '));
       
 21386   };
       
 21387   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 21388     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 21389       spacing: 2,
       
 21390       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 21391         justify: "space-between",
       
 21392         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
       
 21393           align: "center",
       
 21394           className: "edit-site-global-styles__shadows-panel__title",
       
 21395           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 21396             level: 3,
       
 21397             children: (0,external_wp_i18n_namespaceObject.__)('Shadows')
       
 21398           })
       
 21399         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 21400           className: "edit-site-global-styles__shadows-panel__options-container",
       
 21401           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 21402             size: "small",
       
 21403             icon: library_plus,
       
 21404             label: (0,external_wp_i18n_namespaceObject.__)('Add shadow'),
       
 21405             onClick: () => {
       
 21406               onAddShadowPart();
       
 21407             }
       
 21408           })
       
 21409         })]
       
 21410       })
       
 21411     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 21412       isBordered: true,
       
 21413       isSeparated: true,
       
 21414       children: shadowParts.map((part, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(shadows_edit_panel_ShadowItem, {
       
 21415         shadow: part,
       
 21416         onChange: value => onChangeShadowPart(index, value),
       
 21417         canRemove: shadowParts.length > 1,
       
 21418         onRemove: () => onRemoveShadowPart(index)
       
 21419       }, index))
       
 21420     })]
       
 21421   });
       
 21422 }
       
 21423 function shadows_edit_panel_ShadowItem({
       
 21424   shadow,
       
 21425   onChange,
       
 21426   canRemove,
       
 21427   onRemove
       
 21428 }) {
       
 21429   const popoverProps = {
       
 21430     placement: 'left-start',
       
 21431     offset: 36,
       
 21432     shift: true
       
 21433   };
       
 21434   const shadowObj = (0,external_wp_element_namespaceObject.useMemo)(() => shadowStringToObject(shadow), [shadow]);
       
 21435   const onShadowChange = newShadow => {
       
 21436     onChange(shadowObjectToString(newShadow));
       
 21437   };
       
 21438   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
       
 21439     popoverProps: popoverProps,
       
 21440     className: "edit-site-global-styles__shadow-editor__dropdown",
       
 21441     renderToggle: ({
       
 21442       onToggle,
       
 21443       isOpen
       
 21444     }) => {
       
 21445       const toggleProps = {
       
 21446         onClick: onToggle,
       
 21447         className: dist_clsx('edit-site-global-styles__shadow-editor__dropdown-toggle', {
       
 21448           'is-open': isOpen
       
 21449         }),
       
 21450         'aria-expanded': isOpen
       
 21451       };
       
 21452       const removeButtonProps = {
       
 21453         onClick: onRemove,
       
 21454         className: dist_clsx('edit-site-global-styles__shadow-editor__remove-button', {
       
 21455           'is-open': isOpen
       
 21456         }),
       
 21457         label: (0,external_wp_i18n_namespaceObject.__)('Remove shadow')
       
 21458       };
       
 21459       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 21460         align: "center",
       
 21461         justify: "flex-start",
       
 21462         spacing: 0,
       
 21463         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 21464           style: {
       
 21465             flexGrow: 1
       
 21466           },
       
 21467           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 21468             icon: library_shadow,
       
 21469             ...toggleProps,
       
 21470             children: shadowObj.inset ? (0,external_wp_i18n_namespaceObject.__)('Inner shadow') : (0,external_wp_i18n_namespaceObject.__)('Drop shadow')
       
 21471           })
       
 21472         }), canRemove && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 21473           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 21474             icon: library_reset,
       
 21475             ...removeButtonProps
       
 21476           })
       
 21477         })]
       
 21478       });
       
 21479     },
       
 21480     renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalDropdownContentWrapper, {
       
 21481       paddingSize: "none",
       
 21482       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 21483         className: "edit-site-global-styles__shadow-editor__dropdown-content",
       
 21484         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowPopover, {
       
 21485           shadowObj: shadowObj,
       
 21486           onChange: onShadowChange
       
 21487         })
       
 21488       })
       
 21489     })
       
 21490   });
       
 21491 }
       
 21492 function ShadowPopover({
       
 21493   shadowObj,
       
 21494   onChange
       
 21495 }) {
       
 21496   const __experimentalIsRenderedInSidebar = true;
       
 21497   const enableAlpha = true;
       
 21498   const onShadowChange = (key, value) => {
       
 21499     const newShadow = {
       
 21500       ...shadowObj,
       
 21501       [key]: value
       
 21502     };
       
 21503     onChange(newShadow);
       
 21504   };
       
 21505   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 21506     className: "edit-site-global-styles__shadow-editor-panel",
       
 21507     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 21508       spacing: 2,
       
 21509       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 21510         level: 5,
       
 21511         children: (0,external_wp_i18n_namespaceObject.__)('Shadow')
       
 21512       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 21513         className: "edit-site-global-styles__shadow-editor-color-palette",
       
 21514         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ColorPalette, {
       
 21515           clearable: false,
       
 21516           enableAlpha: enableAlpha,
       
 21517           __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
       
 21518           value: shadowObj.color,
       
 21519           onChange: value => onShadowChange('color', value)
       
 21520         })
       
 21521       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
       
 21522         value: shadowObj.inset ? 'inset' : 'outset',
       
 21523         isBlock: true,
       
 21524         onChange: value => onShadowChange('inset', value === 'inset'),
       
 21525         hideLabelFromVision: true,
       
 21526         __next40pxDefaultSize: true,
       
 21527         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 21528           value: "outset",
       
 21529           label: (0,external_wp_i18n_namespaceObject.__)('Outset')
       
 21530         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
       
 21531           value: "inset",
       
 21532           label: (0,external_wp_i18n_namespaceObject.__)('Inset')
       
 21533         })]
       
 21534       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalGrid, {
       
 21535         columns: 2,
       
 21536         gap: 4,
       
 21537         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowInputControl, {
       
 21538           label: (0,external_wp_i18n_namespaceObject.__)('X Position'),
       
 21539           value: shadowObj.x,
       
 21540           hasNegativeRange: true,
       
 21541           onChange: value => onShadowChange('x', value)
       
 21542         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowInputControl, {
       
 21543           label: (0,external_wp_i18n_namespaceObject.__)('Y Position'),
       
 21544           value: shadowObj.y,
       
 21545           hasNegativeRange: true,
       
 21546           onChange: value => onShadowChange('y', value)
       
 21547         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowInputControl, {
       
 21548           label: (0,external_wp_i18n_namespaceObject.__)('Blur'),
       
 21549           value: shadowObj.blur,
       
 21550           onChange: value => onShadowChange('blur', value)
       
 21551         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowInputControl, {
       
 21552           label: (0,external_wp_i18n_namespaceObject.__)('Spread'),
       
 21553           value: shadowObj.spread,
       
 21554           hasNegativeRange: true,
       
 21555           onChange: value => onShadowChange('spread', value)
       
 21556         })]
       
 21557       })]
       
 21558     })
       
 21559   });
       
 21560 }
       
 21561 function ShadowInputControl({
       
 21562   label,
       
 21563   value,
       
 21564   onChange,
       
 21565   hasNegativeRange
       
 21566 }) {
       
 21567   var _CUSTOM_VALUE_SETTING, _CUSTOM_VALUE_SETTING2, _CUSTOM_VALUE_SETTING3;
       
 21568   const [isCustomInput, setIsCustomInput] = (0,external_wp_element_namespaceObject.useState)(false);
       
 21569   const [parsedQuantity, parsedUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(value);
       
 21570   const sliderOnChange = next => {
       
 21571     onChange(next !== undefined ? [next, parsedUnit || 'px'].join('') : '0px');
       
 21572   };
       
 21573   const onValueChange = next => {
       
 21574     const isNumeric = next !== undefined && !isNaN(parseFloat(next));
       
 21575     const nextValue = isNumeric ? next : '0px';
       
 21576     onChange(nextValue);
       
 21577   };
       
 21578   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 21579     justify: "flex-start",
       
 21580     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 21581       justify: "space-between",
       
 21582       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
       
 21583         children: label
       
 21584       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 21585         label: (0,external_wp_i18n_namespaceObject.__)('Use custom size'),
       
 21586         icon: library_settings,
       
 21587         onClick: () => {
       
 21588           setIsCustomInput(!isCustomInput);
       
 21589         },
       
 21590         isPressed: isCustomInput,
       
 21591         size: "small"
       
 21592       })]
       
 21593     }), isCustomInput ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
       
 21594       label: label,
       
 21595       hideLabelFromVision: true,
       
 21596       __next40pxDefaultSize: true,
       
 21597       value: value,
       
 21598       onChange: onValueChange
       
 21599     }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
       
 21600       value: parsedQuantity !== null && parsedQuantity !== void 0 ? parsedQuantity : 0,
       
 21601       onChange: sliderOnChange,
       
 21602       withInputField: false,
       
 21603       __next40pxDefaultSize: true,
       
 21604       __nextHasNoMarginBottom: true,
       
 21605       min: hasNegativeRange ? -((_CUSTOM_VALUE_SETTING = CUSTOM_VALUE_SETTINGS[parsedUnit !== null && parsedUnit !== void 0 ? parsedUnit : 'px']?.max) !== null && _CUSTOM_VALUE_SETTING !== void 0 ? _CUSTOM_VALUE_SETTING : 10) : 0,
       
 21606       max: (_CUSTOM_VALUE_SETTING2 = CUSTOM_VALUE_SETTINGS[parsedUnit !== null && parsedUnit !== void 0 ? parsedUnit : 'px']?.max) !== null && _CUSTOM_VALUE_SETTING2 !== void 0 ? _CUSTOM_VALUE_SETTING2 : 10,
       
 21607       step: (_CUSTOM_VALUE_SETTING3 = CUSTOM_VALUE_SETTINGS[parsedUnit !== null && parsedUnit !== void 0 ? parsedUnit : 'px']?.step) !== null && _CUSTOM_VALUE_SETTING3 !== void 0 ? _CUSTOM_VALUE_SETTING3 : 0.1
       
 21608     })]
       
 21609   });
       
 21610 }
       
 21611 
       
 21612 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-shadows.js
       
 21613 /**
       
 21614  * Internal dependencies
       
 21615  */
       
 21616 
       
 21617 
       
 21618 
       
 21619 function ScreenShadows() {
       
 21620   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowsPanel, {});
       
 21621 }
       
 21622 function ScreenShadowsEdit() {
       
 21623   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShadowsEditPanel, {});
       
 21624 }
       
 21625 
       
 21626 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/dimensions-panel.js
       
 21627 /**
       
 21628  * WordPress dependencies
       
 21629  */
       
 21630 
       
 21631 
       
 21632 
       
 21633 /**
       
 21634  * Internal dependencies
       
 21635  */
       
 21636 
       
 21637 
       
 21638 const {
       
 21639   useGlobalStyle: dimensions_panel_useGlobalStyle,
       
 21640   useGlobalSetting: dimensions_panel_useGlobalSetting,
       
 21641   useSettingsForBlockElement: dimensions_panel_useSettingsForBlockElement,
       
 21642   DimensionsPanel: dimensions_panel_StylesDimensionsPanel
       
 21643 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 21644 const DEFAULT_CONTROLS = {
       
 21645   contentSize: true,
       
 21646   wideSize: true,
       
 21647   padding: true,
       
 21648   margin: true,
       
 21649   blockGap: true,
       
 21650   minHeight: true,
       
 21651   childLayout: false
       
 21652 };
       
 21653 function DimensionsPanel() {
       
 21654   const [style] = dimensions_panel_useGlobalStyle('', undefined, 'user', {
       
 21655     shouldDecodeEncode: false
       
 21656   });
       
 21657   const [inheritedStyle, setStyle] = dimensions_panel_useGlobalStyle('', undefined, 'all', {
       
 21658     shouldDecodeEncode: false
       
 21659   });
       
 21660   const [userSettings] = dimensions_panel_useGlobalSetting('', undefined, 'user');
       
 21661   const [rawSettings, setSettings] = dimensions_panel_useGlobalSetting('');
       
 21662   const settings = dimensions_panel_useSettingsForBlockElement(rawSettings);
       
 21663 
       
 21664   // These intermediary objects are needed because the "layout" property is stored
       
 21665   // in settings rather than styles.
       
 21666   const inheritedStyleWithLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 21667     return {
       
 21668       ...inheritedStyle,
       
 21669       layout: settings.layout
       
 21670     };
       
 21671   }, [inheritedStyle, settings.layout]);
       
 21672   const styleWithLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 21673     return {
       
 21674       ...style,
       
 21675       layout: userSettings.layout
       
 21676     };
       
 21677   }, [style, userSettings.layout]);
       
 21678   const onChange = newStyle => {
       
 21679     const updatedStyle = {
       
 21680       ...newStyle
       
 21681     };
       
 21682     delete updatedStyle.layout;
       
 21683     setStyle(updatedStyle);
       
 21684     if (newStyle.layout !== userSettings.layout) {
       
 21685       const updatedSettings = {
       
 21686         ...userSettings,
       
 21687         layout: newStyle.layout
       
 21688       };
       
 21689 
       
 21690       // Ensure any changes to layout definitions are not persisted.
       
 21691       if (updatedSettings.layout?.definitions) {
       
 21692         delete updatedSettings.layout.definitions;
       
 21693       }
       
 21694       setSettings(updatedSettings);
       
 21695     }
       
 21696   };
       
 21697   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dimensions_panel_StylesDimensionsPanel, {
       
 21698     inheritedValue: inheritedStyleWithLayout,
       
 21699     value: styleWithLayout,
       
 21700     onChange: onChange,
       
 21701     settings: settings,
       
 21702     includeLayoutControls: true,
       
 21703     defaultControls: DEFAULT_CONTROLS
       
 21704   });
       
 21705 }
       
 21706 
       
 21707 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/background-panel.js
       
 21708 /**
       
 21709  * WordPress dependencies
       
 21710  */
       
 21711 
       
 21712 
       
 21713 /**
       
 21714  * Internal dependencies
       
 21715  */
       
 21716 
       
 21717 
       
 21718 // Initial control values where no block style is set.
       
 21719 
       
 21720 const BACKGROUND_DEFAULT_VALUES = {
       
 21721   backgroundSize: 'auto'
       
 21722 };
       
 21723 const {
       
 21724   useGlobalStyle: background_panel_useGlobalStyle,
       
 21725   useGlobalSetting: background_panel_useGlobalSetting,
       
 21726   useGlobalStyleLinks,
       
 21727   BackgroundPanel: StylesBackgroundPanel
       
 21728 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 21729 
       
 21730 /**
       
 21731  * Checks if there is a current value in the background image block support
       
 21732  * attributes.
       
 21733  *
       
 21734  * @param {Object} style Style attribute.
       
 21735  * @return {boolean}     Whether the block has a background image value set.
       
 21736  */
       
 21737 function hasBackgroundImageValue(style) {
       
 21738   return !!style?.background?.backgroundImage?.id || !!style?.background?.backgroundImage?.url || typeof style?.background?.backgroundImage === 'string';
       
 21739 }
       
 21740 function BackgroundPanel() {
       
 21741   const [style] = background_panel_useGlobalStyle('', undefined, 'user', {
       
 21742     shouldDecodeEncode: false
       
 21743   });
       
 21744   const [inheritedStyle, setStyle] = background_panel_useGlobalStyle('', undefined, 'all', {
       
 21745     shouldDecodeEncode: false
       
 21746   });
       
 21747   const _links = useGlobalStyleLinks();
       
 21748   const [settings] = background_panel_useGlobalSetting('');
       
 21749   const defaultControls = {
       
 21750     backgroundImage: true,
       
 21751     backgroundSize: hasBackgroundImageValue(style) || hasBackgroundImageValue(inheritedStyle)
       
 21752   };
       
 21753   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StylesBackgroundPanel, {
       
 21754     inheritedValue: inheritedStyle,
       
 21755     value: style,
       
 21756     onChange: setStyle,
       
 21757     settings: settings,
       
 21758     defaultValues: BACKGROUND_DEFAULT_VALUES,
       
 21759     defaultControls: defaultControls,
       
 21760     themeFileURIs: _links?.['wp:theme-file']
       
 21761   });
       
 21762 }
       
 21763 
       
 21764 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-layout.js
       
 21765 /**
       
 21766  * WordPress dependencies
       
 21767  */
       
 21768 
       
 21769 
       
 21770 
       
 21771 /**
       
 21772  * Internal dependencies
       
 21773  */
       
 21774 
       
 21775 
       
 21776 
       
 21777 
       
 21778 
       
 21779 
       
 21780 
       
 21781 const {
       
 21782   useHasBackgroundPanel,
       
 21783   useHasDimensionsPanel: screen_layout_useHasDimensionsPanel,
       
 21784   useGlobalSetting: screen_layout_useGlobalSetting,
       
 21785   useSettingsForBlockElement: screen_layout_useSettingsForBlockElement
       
 21786 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 21787 function ScreenLayout() {
       
 21788   const [rawSettings] = screen_layout_useGlobalSetting('');
       
 21789   const settings = screen_layout_useSettingsForBlockElement(rawSettings);
       
 21790   const hasDimensionsPanel = screen_layout_useHasDimensionsPanel(settings);
       
 21791   const hasBackgroundPanel = useHasBackgroundPanel(settings);
       
 21792   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 21793     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 21794       title: (0,external_wp_i18n_namespaceObject.__)('Layout')
       
 21795     }), hasDimensionsPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DimensionsPanel, {}), hasBackgroundPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BackgroundPanel, {})]
       
 21796   });
       
 21797 }
       
 21798 /* harmony default export */ const screen_layout = (ScreenLayout);
       
 21799 
       
 21800 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/style-variations-container.js
       
 21801 /**
       
 21802  * WordPress dependencies
       
 21803  */
       
 21804 
       
 21805 
       
 21806 
       
 21807 
       
 21808 
       
 21809 
       
 21810 
       
 21811 /**
       
 21812  * Internal dependencies
       
 21813  */
       
 21814 
       
 21815 
       
 21816 
       
 21817 
       
 21818 
       
 21819 const {
       
 21820   GlobalStylesContext: style_variations_container_GlobalStylesContext
       
 21821 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 21822 function StyleVariationsContainer({
       
 21823   gap = 2
       
 21824 }) {
       
 21825   const {
       
 21826     user
       
 21827   } = (0,external_wp_element_namespaceObject.useContext)(style_variations_container_GlobalStylesContext);
       
 21828   const [currentUserStyles, setCurrentUserStyles] = (0,external_wp_element_namespaceObject.useState)(user);
       
 21829   const userStyles = currentUserStyles?.styles;
       
 21830   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 21831     setCurrentUserStyles(user);
       
 21832   }, [user]);
       
 21833   const variations = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 21834     return select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations();
       
 21835   }, []);
       
 21836 
       
 21837   // Filter out variations that are of single property type, i.e. color or typography variations.
       
 21838   const multiplePropertyVariations = variations?.filter(variation => {
       
 21839     return !isVariationWithSingleProperty(variation, 'color') && !isVariationWithSingleProperty(variation, 'typography');
       
 21840   });
       
 21841   const themeVariations = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 21842     const withEmptyVariation = [{
       
 21843       title: (0,external_wp_i18n_namespaceObject.__)('Default'),
       
 21844       settings: {},
       
 21845       styles: {}
       
 21846     }, ...(multiplePropertyVariations !== null && multiplePropertyVariations !== void 0 ? multiplePropertyVariations : [])];
       
 21847     return [...withEmptyVariation.map(variation => {
       
 21848       var _variation$settings;
       
 21849       const blockStyles = {
       
 21850         ...variation?.styles?.blocks
       
 21851       } || {};
       
 21852 
       
 21853       // We need to copy any user custom CSS to the variation to prevent it being lost
       
 21854       // when switching variations.
       
 21855       if (userStyles?.blocks) {
       
 21856         Object.keys(userStyles.blocks).forEach(blockName => {
       
 21857           // First get any block specific custom CSS from the current user styles and merge with any custom CSS for
       
 21858           // that block in the variation.
       
 21859           if (userStyles.blocks[blockName].css) {
       
 21860             const variationBlockStyles = blockStyles[blockName] || {};
       
 21861             const customCSS = {
       
 21862               css: `${blockStyles[blockName]?.css || ''} ${userStyles.blocks[blockName].css.trim() || ''}`
       
 21863             };
       
 21864             blockStyles[blockName] = {
       
 21865               ...variationBlockStyles,
       
 21866               ...customCSS
       
 21867             };
       
 21868           }
       
 21869         });
       
 21870       }
       
 21871       // Now merge any global custom CSS from current user styles with global custom CSS in the variation.
       
 21872       const css = userStyles?.css || variation.styles?.css ? {
       
 21873         css: `${variation.styles?.css || ''} ${userStyles?.css || ''}`
       
 21874       } : {};
       
 21875       const blocks = Object.keys(blockStyles).length > 0 ? {
       
 21876         blocks: blockStyles
       
 21877       } : {};
       
 21878       const styles = {
       
 21879         ...variation.styles,
       
 21880         ...css,
       
 21881         ...blocks
       
 21882       };
       
 21883       return {
       
 21884         ...variation,
       
 21885         settings: (_variation$settings = variation.settings) !== null && _variation$settings !== void 0 ? _variation$settings : {},
       
 21886         styles
       
 21887       };
       
 21888     })];
       
 21889   }, [multiplePropertyVariations, userStyles?.blocks, userStyles?.css]);
       
 21890   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalGrid, {
       
 21891     columns: 2,
       
 21892     className: "edit-site-global-styles-style-variations-container",
       
 21893     gap: gap,
       
 21894     children: themeVariations.map((variation, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Variation, {
       
 21895       variation: variation,
       
 21896       children: isFocused => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(preview_styles, {
       
 21897         label: variation?.title,
       
 21898         withHoverView: true,
       
 21899         isFocused: isFocused,
       
 21900         variation: variation
       
 21901       })
       
 21902     }, index))
       
 21903   });
       
 21904 }
       
 21905 
       
 21906 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-style-variations.js
       
 21907 /**
       
 21908  * WordPress dependencies
       
 21909  */
       
 21910 
       
 21911 
       
 21912 
       
 21913 
       
 21914 /**
       
 21915  * Internal dependencies
       
 21916  */
       
 21917 
       
 21918 
       
 21919 
       
 21920 
       
 21921 
       
 21922 function ScreenStyleVariations() {
       
 21923   // Move to zoom out mode when this component is mounted
       
 21924   // and back to the previous mode when unmounted.
       
 21925   (0,external_wp_blockEditor_namespaceObject.useZoomOut)();
       
 21926   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 21927     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 21928       title: (0,external_wp_i18n_namespaceObject.__)('Browse styles'),
       
 21929       description: (0,external_wp_i18n_namespaceObject.__)('Choose a variation to change the look of the site.')
       
 21930     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Card, {
       
 21931       size: "small",
       
 21932       isBorderless: true,
       
 21933       className: "edit-site-global-styles-screen-style-variations",
       
 21934       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CardBody, {
       
 21935         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyleVariationsContainer, {})
       
 21936       })
       
 21937     })]
       
 21938   });
       
 21939 }
       
 21940 /* harmony default export */ const screen_style_variations = (ScreenStyleVariations);
       
 21941 
       
 21942 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
       
 21943 /**
       
 21944  * WordPress dependencies
       
 21945  */
       
 21946 
       
 21947 
       
 21948 const closeSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 21949   xmlns: "http://www.w3.org/2000/svg",
       
 21950   viewBox: "0 0 24 24",
       
 21951   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 21952     d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
       
 21953   })
       
 21954 });
       
 21955 /* harmony default export */ const close_small = (closeSmall);
       
 21956 
       
 21957 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/editor-canvas-container/index.js
       
 21958 /**
       
 21959  * WordPress dependencies
       
 21960  */
       
 21961 
       
 21962 
       
 21963 
       
 21964 
       
 21965 
       
 21966 
       
 21967 
       
 21968 
       
 21969 
       
 21970 
       
 21971 /**
       
 21972  * Internal dependencies
       
 21973  */
       
 21974 
       
 21975 
       
 21976 
       
 21977 
       
 21978 const {
       
 21979   EditorContentSlotFill,
       
 21980   ResizableEditor
       
 21981 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 21982 
       
 21983 /**
       
 21984  * Returns a translated string for the title of the editor canvas container.
       
 21985  *
       
 21986  * @param {string} view Editor canvas container view.
       
 21987  *
       
 21988  * @return {string} Translated string corresponding to value of view. Default is ''.
       
 21989  */
       
 21990 function getEditorCanvasContainerTitle(view) {
       
 21991   switch (view) {
       
 21992     case 'style-book':
       
 21993       return (0,external_wp_i18n_namespaceObject.__)('Style Book');
       
 21994     case 'global-styles-revisions':
       
 21995     case 'global-styles-revisions:style-book':
       
 21996       return (0,external_wp_i18n_namespaceObject.__)('Style Revisions');
       
 21997     default:
       
 21998       return '';
       
 21999   }
       
 22000 }
       
 22001 function EditorCanvasContainer({
       
 22002   children,
       
 22003   closeButtonLabel,
       
 22004   onClose,
       
 22005   enableResizing = false
       
 22006 }) {
       
 22007   const {
       
 22008     editorCanvasContainerView,
       
 22009     showListViewByDefault
       
 22010   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 22011     const _editorCanvasContainerView = lock_unlock_unlock(select(store)).getEditorCanvasContainerView();
       
 22012     const _showListViewByDefault = select(external_wp_preferences_namespaceObject.store).get('core', 'showListViewByDefault');
       
 22013     return {
       
 22014       editorCanvasContainerView: _editorCanvasContainerView,
       
 22015       showListViewByDefault: _showListViewByDefault
       
 22016     };
       
 22017   }, []);
       
 22018   const [isClosed, setIsClosed] = (0,external_wp_element_namespaceObject.useState)(false);
       
 22019   const {
       
 22020     setEditorCanvasContainerView
       
 22021   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 22022   const {
       
 22023     setIsListViewOpened
       
 22024   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
       
 22025   const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)('firstElement');
       
 22026   const sectionFocusReturnRef = (0,external_wp_compose_namespaceObject.useFocusReturn)();
       
 22027   function onCloseContainer() {
       
 22028     setIsListViewOpened(showListViewByDefault);
       
 22029     setEditorCanvasContainerView(undefined);
       
 22030     setIsClosed(true);
       
 22031     if (typeof onClose === 'function') {
       
 22032       onClose();
       
 22033     }
       
 22034   }
       
 22035   function closeOnEscape(event) {
       
 22036     if (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE && !event.defaultPrevented) {
       
 22037       event.preventDefault();
       
 22038       onCloseContainer();
       
 22039     }
       
 22040   }
       
 22041   const childrenWithProps = Array.isArray(children) ? external_wp_element_namespaceObject.Children.map(children, (child, index) => index === 0 ? (0,external_wp_element_namespaceObject.cloneElement)(child, {
       
 22042     ref: sectionFocusReturnRef
       
 22043   }) : child) : (0,external_wp_element_namespaceObject.cloneElement)(children, {
       
 22044     ref: sectionFocusReturnRef
       
 22045   });
       
 22046   if (isClosed) {
       
 22047     return null;
       
 22048   }
       
 22049   const title = getEditorCanvasContainerTitle(editorCanvasContainerView);
       
 22050   const shouldShowCloseButton = onClose || closeButtonLabel;
       
 22051   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditorContentSlotFill.Fill, {
       
 22052     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 22053       className: "edit-site-editor-canvas-container",
       
 22054       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableEditor, {
       
 22055         enableResizing: enableResizing,
       
 22056         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("section", {
       
 22057           className: "edit-site-editor-canvas-container__section",
       
 22058           ref: shouldShowCloseButton ? focusOnMountRef : null,
       
 22059           onKeyDown: closeOnEscape,
       
 22060           "aria-label": title,
       
 22061           children: [shouldShowCloseButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 22062             className: "edit-site-editor-canvas-container__close-button",
       
 22063             icon: close_small,
       
 22064             label: closeButtonLabel || (0,external_wp_i18n_namespaceObject.__)('Close'),
       
 22065             onClick: onCloseContainer
       
 22066           }), childrenWithProps]
       
 22067         })
       
 22068       })
       
 22069     })
       
 22070   });
       
 22071 }
       
 22072 function useHasEditorCanvasContainer() {
       
 22073   const fills = (0,external_wp_components_namespaceObject.__experimentalUseSlotFills)(EditorContentSlotFill.privateKey);
       
 22074   return !!fills?.length;
       
 22075 }
       
 22076 /* harmony default export */ const editor_canvas_container = (EditorCanvasContainer);
       
 22077 
       
 22078 
       
 22079 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/style-book/index.js
       
 22080 /**
       
 22081  * External dependencies
       
 22082  */
       
 22083 
       
 22084 
       
 22085 /**
       
 22086  * WordPress dependencies
       
 22087  */
       
 22088 
       
 22089 
       
 22090 
       
 22091 
       
 22092 
       
 22093 
       
 22094 
       
 22095 
       
 22096 
       
 22097 
       
 22098 /**
       
 22099  * Internal dependencies
       
 22100  */
       
 22101 
       
 22102 
       
 22103 
       
 22104 
       
 22105 const {
       
 22106   ExperimentalBlockEditorProvider,
       
 22107   useGlobalStyle: style_book_useGlobalStyle,
       
 22108   GlobalStylesContext: style_book_GlobalStylesContext,
       
 22109   useGlobalStylesOutputWithConfig
       
 22110 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 22111 const {
       
 22112   mergeBaseAndUserConfigs: style_book_mergeBaseAndUserConfigs
       
 22113 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 22114 const {
       
 22115   CompositeV2: Composite,
       
 22116   CompositeItemV2: CompositeItem,
       
 22117   useCompositeStoreV2: useCompositeStore,
       
 22118   Tabs: style_book_Tabs
       
 22119 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 22120 
       
 22121 // The content area of the Style Book is rendered within an iframe so that global styles
       
 22122 // are applied to elements within the entire content area. To support elements that are
       
 22123 // not part of the block previews, such as headings and layout for the block previews,
       
 22124 // additional CSS rules need to be passed into the iframe. These are hard-coded below.
       
 22125 // Note that button styles are unset, and then focus rules from the `Button` component are
       
 22126 // applied to the `button` element, targeted via `.edit-site-style-book__example`.
       
 22127 // This is to ensure that browser default styles for buttons are not applied to the previews.
       
 22128 const STYLE_BOOK_IFRAME_STYLES = `
       
 22129 	.edit-site-style-book__examples {
       
 22130 		max-width: 900px;
       
 22131 		margin: 0 auto;
       
 22132 	}
       
 22133 
       
 22134 	.edit-site-style-book__example {
       
 22135 		border-radius: 2px;
       
 22136 		cursor: pointer;
       
 22137 		display: flex;
       
 22138 		flex-direction: column;
       
 22139 		gap: 40px;
       
 22140 		margin-bottom: 40px;
       
 22141 		padding: 16px;
       
 22142 		width: 100%;
       
 22143 		box-sizing: border-box;
       
 22144 		scroll-margin-top: 32px;
       
 22145 		scroll-margin-bottom: 32px;
       
 22146 	}
       
 22147 
       
 22148 	.edit-site-style-book__example.is-selected {
       
 22149 		box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
       
 22150 	}
       
 22151 
       
 22152 	.edit-site-style-book__example:focus:not(:disabled) {
       
 22153 		box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
       
 22154 		outline: 3px solid transparent;
       
 22155 	}
       
 22156 
       
 22157 	.edit-site-style-book__examples.is-wide .edit-site-style-book__example {
       
 22158 		flex-direction: row;
       
 22159 	}
       
 22160 
       
 22161 	.edit-site-style-book__example-title {
       
 22162 		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
       
 22163 		font-size: 11px;
       
 22164 		font-weight: 500;
       
 22165 		line-height: normal;
       
 22166 		margin: 0;
       
 22167 		text-align: left;
       
 22168 		text-transform: uppercase;
       
 22169 	}
       
 22170 
       
 22171 	.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {
       
 22172 		text-align: right;
       
 22173 		width: 120px;
       
 22174 	}
       
 22175 
       
 22176 	.edit-site-style-book__example-preview {
       
 22177 		width: 100%;
       
 22178 	}
       
 22179 
       
 22180 	.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,
       
 22181 	.edit-site-style-book__example-preview .block-list-appender {
       
 22182 		display: none;
       
 22183 	}
       
 22184 
       
 22185 	.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {
       
 22186 		margin-top: 0;
       
 22187 	}
       
 22188 	.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {
       
 22189 		margin-bottom: 0;
       
 22190 	}
       
 22191 `;
       
 22192 function isObjectEmpty(object) {
       
 22193   return !object || Object.keys(object).length === 0;
       
 22194 }
       
 22195 function getExamples() {
       
 22196   // Use our own example for the Heading block so that we can show multiple
       
 22197   // heading levels.
       
 22198   const headingsExample = {
       
 22199     name: 'core/heading',
       
 22200     title: (0,external_wp_i18n_namespaceObject.__)('Headings'),
       
 22201     category: 'text',
       
 22202     blocks: [(0,external_wp_blocks_namespaceObject.createBlock)('core/heading', {
       
 22203       content: (0,external_wp_i18n_namespaceObject.__)('Code Is Poetry'),
       
 22204       level: 1
       
 22205     }), (0,external_wp_blocks_namespaceObject.createBlock)('core/heading', {
       
 22206       content: (0,external_wp_i18n_namespaceObject.__)('Code Is Poetry'),
       
 22207       level: 2
       
 22208     }), (0,external_wp_blocks_namespaceObject.createBlock)('core/heading', {
       
 22209       content: (0,external_wp_i18n_namespaceObject.__)('Code Is Poetry'),
       
 22210       level: 3
       
 22211     }), (0,external_wp_blocks_namespaceObject.createBlock)('core/heading', {
       
 22212       content: (0,external_wp_i18n_namespaceObject.__)('Code Is Poetry'),
       
 22213       level: 4
       
 22214     }), (0,external_wp_blocks_namespaceObject.createBlock)('core/heading', {
       
 22215       content: (0,external_wp_i18n_namespaceObject.__)('Code Is Poetry'),
       
 22216       level: 5
       
 22217     })]
       
 22218   };
       
 22219   const otherExamples = (0,external_wp_blocks_namespaceObject.getBlockTypes)().filter(blockType => {
       
 22220     const {
       
 22221       name,
       
 22222       example,
       
 22223       supports
       
 22224     } = blockType;
       
 22225     return name !== 'core/heading' && !!example && supports.inserter !== false;
       
 22226   }).map(blockType => ({
       
 22227     name: blockType.name,
       
 22228     title: blockType.title,
       
 22229     category: blockType.category,
       
 22230     blocks: (0,external_wp_blocks_namespaceObject.getBlockFromExample)(blockType.name, blockType.example)
       
 22231   }));
       
 22232   return [headingsExample, ...otherExamples];
       
 22233 }
       
 22234 function StyleBook({
       
 22235   enableResizing = true,
       
 22236   isSelected,
       
 22237   onClick,
       
 22238   onSelect,
       
 22239   showCloseButton = true,
       
 22240   onClose,
       
 22241   showTabs = true,
       
 22242   userConfig = {}
       
 22243 }) {
       
 22244   const [resizeObserver, sizes] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
       
 22245   const [textColor] = style_book_useGlobalStyle('color.text');
       
 22246   const [backgroundColor] = style_book_useGlobalStyle('color.background');
       
 22247   const [examples] = (0,external_wp_element_namespaceObject.useState)(getExamples);
       
 22248   const tabs = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_wp_blocks_namespaceObject.getCategories)().filter(category => examples.some(example => example.category === category.slug)).map(category => ({
       
 22249     name: category.slug,
       
 22250     title: category.title,
       
 22251     icon: category.icon
       
 22252   })), [examples]);
       
 22253   const {
       
 22254     base: baseConfig
       
 22255   } = (0,external_wp_element_namespaceObject.useContext)(style_book_GlobalStylesContext);
       
 22256   const mergedConfig = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 22257     if (!isObjectEmpty(userConfig) && !isObjectEmpty(baseConfig)) {
       
 22258       return style_book_mergeBaseAndUserConfigs(baseConfig, userConfig);
       
 22259     }
       
 22260     return {};
       
 22261   }, [baseConfig, userConfig]);
       
 22262 
       
 22263   // Copied from packages/edit-site/src/components/revisions/index.js
       
 22264   // could we create a shared hook?
       
 22265   const originalSettings = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings(), []);
       
 22266   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => ({
       
 22267     ...originalSettings,
       
 22268     __unstableIsPreviewMode: true
       
 22269   }), [originalSettings]);
       
 22270   const [globalStyles] = useGlobalStylesOutputWithConfig(mergedConfig);
       
 22271   settings.styles = !isObjectEmpty(globalStyles) && !isObjectEmpty(userConfig) ? globalStyles : settings.styles;
       
 22272   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(editor_canvas_container, {
       
 22273     onClose: onClose,
       
 22274     enableResizing: enableResizing,
       
 22275     closeButtonLabel: showCloseButton ? (0,external_wp_i18n_namespaceObject.__)('Close') : null,
       
 22276     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 22277       className: dist_clsx('edit-site-style-book', {
       
 22278         'is-wide': sizes.width > 600,
       
 22279         'is-button': !!onClick
       
 22280       }),
       
 22281       style: {
       
 22282         color: textColor,
       
 22283         background: backgroundColor
       
 22284       },
       
 22285       children: [resizeObserver, showTabs ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 22286         className: "edit-site-style-book__tabs",
       
 22287         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(style_book_Tabs, {
       
 22288           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(style_book_Tabs.TabList, {
       
 22289             children: tabs.map(tab => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(style_book_Tabs.Tab, {
       
 22290               tabId: tab.name,
       
 22291               children: tab.title
       
 22292             }, tab.name))
       
 22293           }), tabs.map(tab => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(style_book_Tabs.TabPanel, {
       
 22294             tabId: tab.name,
       
 22295             focusable: false,
       
 22296             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyleBookBody, {
       
 22297               category: tab.name,
       
 22298               examples: examples,
       
 22299               isSelected: isSelected,
       
 22300               onSelect: onSelect,
       
 22301               settings: settings,
       
 22302               sizes: sizes,
       
 22303               title: tab.title
       
 22304             })
       
 22305           }, tab.name))]
       
 22306         })
       
 22307       }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyleBookBody, {
       
 22308         examples: examples,
       
 22309         isSelected: isSelected,
       
 22310         onClick: onClick,
       
 22311         onSelect: onSelect,
       
 22312         settings: settings,
       
 22313         sizes: sizes
       
 22314       })]
       
 22315     })
       
 22316   });
       
 22317 }
       
 22318 const StyleBookBody = ({
       
 22319   category,
       
 22320   examples,
       
 22321   isSelected,
       
 22322   onClick,
       
 22323   onSelect,
       
 22324   settings,
       
 22325   sizes,
       
 22326   title
       
 22327 }) => {
       
 22328   const [isFocused, setIsFocused] = (0,external_wp_element_namespaceObject.useState)(false);
       
 22329 
       
 22330   // The presence of an `onClick` prop indicates that the Style Book is being used as a button.
       
 22331   // In this case, add additional props to the iframe to make it behave like a button.
       
 22332   const buttonModeProps = {
       
 22333     role: 'button',
       
 22334     onFocus: () => setIsFocused(true),
       
 22335     onBlur: () => setIsFocused(false),
       
 22336     onKeyDown: event => {
       
 22337       if (event.defaultPrevented) {
       
 22338         return;
       
 22339       }
       
 22340       const {
       
 22341         keyCode
       
 22342       } = event;
       
 22343       if (onClick && (keyCode === external_wp_keycodes_namespaceObject.ENTER || keyCode === external_wp_keycodes_namespaceObject.SPACE)) {
       
 22344         event.preventDefault();
       
 22345         onClick(event);
       
 22346       }
       
 22347     },
       
 22348     onClick: event => {
       
 22349       if (event.defaultPrevented) {
       
 22350         return;
       
 22351       }
       
 22352       if (onClick) {
       
 22353         event.preventDefault();
       
 22354         onClick(event);
       
 22355       }
       
 22356     },
       
 22357     readonly: true
       
 22358   };
       
 22359   const buttonModeStyles = onClick ? 'body { cursor: pointer; } body * { pointer-events: none; }' : '';
       
 22360   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.__unstableIframe, {
       
 22361     className: dist_clsx('edit-site-style-book__iframe', {
       
 22362       'is-focused': isFocused && !!onClick,
       
 22363       'is-button': !!onClick
       
 22364     }),
       
 22365     name: "style-book-canvas",
       
 22366     tabIndex: 0,
       
 22367     ...(onClick ? buttonModeProps : {}),
       
 22368     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
       
 22369       styles: settings.styles
       
 22370     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("style", {
       
 22371       children:
       
 22372       // Forming a "block formatting context" to prevent margin collapsing.
       
 22373       // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
       
 22374       `.is-root-container { display: flow-root; }
       
 22375 						body { position: relative; padding: 32px !important; }` + STYLE_BOOK_IFRAME_STYLES + buttonModeStyles
       
 22376     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Examples, {
       
 22377       className: dist_clsx('edit-site-style-book__examples', {
       
 22378         'is-wide': sizes.width > 600
       
 22379       }),
       
 22380       examples: examples,
       
 22381       category: category,
       
 22382       label: title ? (0,external_wp_i18n_namespaceObject.sprintf)(
       
 22383       // translators: %s: Category of blocks, e.g. Text.
       
 22384       (0,external_wp_i18n_namespaceObject.__)('Examples of blocks in the %s category'), title) : (0,external_wp_i18n_namespaceObject.__)('Examples of blocks'),
       
 22385       isSelected: isSelected,
       
 22386       onSelect: onSelect
       
 22387     }, category)]
       
 22388   });
       
 22389 };
       
 22390 const Examples = (0,external_wp_element_namespaceObject.memo)(({
       
 22391   className,
       
 22392   examples,
       
 22393   category,
       
 22394   label,
       
 22395   isSelected,
       
 22396   onSelect
       
 22397 }) => {
       
 22398   const compositeStore = useCompositeStore({
       
 22399     orientation: 'vertical'
       
 22400   });
       
 22401   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Composite, {
       
 22402     store: compositeStore,
       
 22403     className: className,
       
 22404     "aria-label": label,
       
 22405     role: "grid",
       
 22406     children: examples.filter(example => category ? example.category === category : true).map(example => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Example, {
       
 22407       id: `example-${example.name}`,
       
 22408       title: example.title,
       
 22409       blocks: example.blocks,
       
 22410       isSelected: isSelected(example.name),
       
 22411       onClick: () => {
       
 22412         onSelect?.(example.name);
       
 22413       }
       
 22414     }, example.name))
       
 22415   });
       
 22416 });
       
 22417 const Example = ({
       
 22418   id,
       
 22419   title,
       
 22420   blocks,
       
 22421   isSelected,
       
 22422   onClick
       
 22423 }) => {
       
 22424   const originalSettings = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings(), []);
       
 22425   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => ({
       
 22426     ...originalSettings,
       
 22427     focusMode: false,
       
 22428     // Disable "Spotlight mode".
       
 22429     __unstableIsPreviewMode: true
       
 22430   }), [originalSettings]);
       
 22431 
       
 22432   // Cache the list of blocks to avoid additional processing when the component is re-rendered.
       
 22433   const renderedBlocks = (0,external_wp_element_namespaceObject.useMemo)(() => Array.isArray(blocks) ? blocks : [blocks], [blocks]);
       
 22434   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 22435     role: "row",
       
 22436     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 22437       role: "gridcell",
       
 22438       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(CompositeItem, {
       
 22439         className: dist_clsx('edit-site-style-book__example', {
       
 22440           'is-selected': isSelected
       
 22441         }),
       
 22442         id: id,
       
 22443         "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
       
 22444         // translators: %s: Title of a block, e.g. Heading.
       
 22445         (0,external_wp_i18n_namespaceObject.__)('Open %s styles in Styles panel'), title),
       
 22446         render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {}),
       
 22447         role: "button",
       
 22448         onClick: onClick,
       
 22449         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 22450           className: "edit-site-style-book__example-title",
       
 22451           children: title
       
 22452         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 22453           className: "edit-site-style-book__example-preview",
       
 22454           "aria-hidden": true,
       
 22455           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
       
 22456             className: "edit-site-style-book__example-preview__content",
       
 22457             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ExperimentalBlockEditorProvider, {
       
 22458               value: renderedBlocks,
       
 22459               settings: settings,
       
 22460               children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, {
       
 22461                 renderAppender: false
       
 22462               })
       
 22463             })
       
 22464           })
       
 22465         })]
       
 22466       })
       
 22467     })
       
 22468   });
       
 22469 };
       
 22470 /* harmony default export */ const style_book = (StyleBook);
       
 22471 
       
 22472 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-css.js
       
 22473 /**
       
 22474  * WordPress dependencies
       
 22475  */
       
 22476 
       
 22477 
       
 22478 
       
 22479 
       
 22480 /**
       
 22481  * Internal dependencies
       
 22482  */
       
 22483 
       
 22484 
       
 22485 
       
 22486 
       
 22487 
       
 22488 const {
       
 22489   useGlobalStyle: screen_css_useGlobalStyle,
       
 22490   AdvancedPanel: screen_css_StylesAdvancedPanel
       
 22491 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 22492 function ScreenCSS() {
       
 22493   const description = (0,external_wp_i18n_namespaceObject.__)('Add your own CSS to customize the appearance and layout of your site.');
       
 22494   const [style] = screen_css_useGlobalStyle('', undefined, 'user', {
       
 22495     shouldDecodeEncode: false
       
 22496   });
       
 22497   const [inheritedStyle, setStyle] = screen_css_useGlobalStyle('', undefined, 'all', {
       
 22498     shouldDecodeEncode: false
       
 22499   });
       
 22500   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 22501     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 22502       title: (0,external_wp_i18n_namespaceObject.__)('CSS'),
       
 22503       description: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 22504         children: [description, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
       
 22505           href: "https://developer.wordpress.org/advanced-administration/wordpress/css/",
       
 22506           className: "edit-site-global-styles-screen-css-help-link",
       
 22507           children: (0,external_wp_i18n_namespaceObject.__)('Learn more about CSS')
       
 22508         })]
       
 22509       })
       
 22510     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 22511       className: "edit-site-global-styles-screen-css",
       
 22512       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_css_StylesAdvancedPanel, {
       
 22513         value: style,
       
 22514         onChange: setStyle,
       
 22515         inheritedValue: inheritedStyle
       
 22516       })
       
 22517     })]
       
 22518   });
       
 22519 }
       
 22520 /* harmony default export */ const screen_css = (ScreenCSS);
       
 22521 
       
 22522 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/revisions/index.js
       
 22523 /**
       
 22524  * WordPress dependencies
       
 22525  */
       
 22526 
       
 22527 
       
 22528 
       
 22529 
       
 22530 
       
 22531 
       
 22532 
       
 22533 /**
       
 22534  * Internal dependencies
       
 22535  */
       
 22536 
       
 22537 
       
 22538 
       
 22539 
       
 22540 
       
 22541 const {
       
 22542   ExperimentalBlockEditorProvider: revisions_ExperimentalBlockEditorProvider,
       
 22543   GlobalStylesContext: revisions_GlobalStylesContext,
       
 22544   useGlobalStylesOutputWithConfig: revisions_useGlobalStylesOutputWithConfig,
       
 22545   __unstableBlockStyleVariationOverridesWithConfig
       
 22546 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 22547 const {
       
 22548   mergeBaseAndUserConfigs: revisions_mergeBaseAndUserConfigs
       
 22549 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 22550 function revisions_isObjectEmpty(object) {
       
 22551   return !object || Object.keys(object).length === 0;
       
 22552 }
       
 22553 function Revisions({
       
 22554   userConfig,
       
 22555   blocks
       
 22556 }) {
       
 22557   const {
       
 22558     base: baseConfig
       
 22559   } = (0,external_wp_element_namespaceObject.useContext)(revisions_GlobalStylesContext);
       
 22560   const mergedConfig = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 22561     if (!revisions_isObjectEmpty(userConfig) && !revisions_isObjectEmpty(baseConfig)) {
       
 22562       return revisions_mergeBaseAndUserConfigs(baseConfig, userConfig);
       
 22563     }
       
 22564     return {};
       
 22565   }, [baseConfig, userConfig]);
       
 22566   const renderedBlocksArray = (0,external_wp_element_namespaceObject.useMemo)(() => Array.isArray(blocks) ? blocks : [blocks], [blocks]);
       
 22567   const originalSettings = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings(), []);
       
 22568   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => ({
       
 22569     ...originalSettings,
       
 22570     __unstableIsPreviewMode: true
       
 22571   }), [originalSettings]);
       
 22572   const [globalStyles] = revisions_useGlobalStylesOutputWithConfig(mergedConfig);
       
 22573   const editorStyles = !revisions_isObjectEmpty(globalStyles) && !revisions_isObjectEmpty(userConfig) ? globalStyles : settings.styles;
       
 22574   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(editor_canvas_container, {
       
 22575     title: (0,external_wp_i18n_namespaceObject.__)('Revisions'),
       
 22576     closeButtonLabel: (0,external_wp_i18n_namespaceObject.__)('Close revisions'),
       
 22577     enableResizing: true,
       
 22578     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.__unstableIframe, {
       
 22579       className: "edit-site-revisions__iframe",
       
 22580       name: "revisions",
       
 22581       tabIndex: 0,
       
 22582       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("style", {
       
 22583         children:
       
 22584         // Forming a "block formatting context" to prevent margin collapsing.
       
 22585         // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
       
 22586         `.is-root-container { display: flow-root; }`
       
 22587       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
       
 22588         className: "edit-site-revisions__example-preview__content",
       
 22589         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(revisions_ExperimentalBlockEditorProvider, {
       
 22590           value: renderedBlocksArray,
       
 22591           settings: settings,
       
 22592           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, {
       
 22593             renderAppender: false
       
 22594           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
       
 22595             styles: editorStyles
       
 22596           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(__unstableBlockStyleVariationOverridesWithConfig, {
       
 22597             config: mergedConfig
       
 22598           })]
       
 22599         })
       
 22600       })]
       
 22601     })
       
 22602   });
       
 22603 }
       
 22604 /* harmony default export */ const components_revisions = (Revisions);
       
 22605 
       
 22606 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js
       
 22607 /**
       
 22608  * WordPress dependencies
       
 22609  */
       
 22610 
       
 22611 
       
 22612 
       
 22613 
       
 22614 
       
 22615 /**
       
 22616  * Internal dependencies
       
 22617  */
       
 22618 
       
 22619 const SITE_EDITOR_AUTHORS_QUERY = {
       
 22620   per_page: -1,
       
 22621   _fields: 'id,name,avatar_urls',
       
 22622   context: 'view',
       
 22623   capabilities: ['edit_theme_options']
       
 22624 };
       
 22625 const DEFAULT_QUERY = {
       
 22626   per_page: 100,
       
 22627   page: 1
       
 22628 };
       
 22629 const EMPTY_ARRAY = [];
       
 22630 const {
       
 22631   GlobalStylesContext: use_global_styles_revisions_GlobalStylesContext
       
 22632 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 22633 function useGlobalStylesRevisions({
       
 22634   query
       
 22635 } = {}) {
       
 22636   const {
       
 22637     user: userConfig
       
 22638   } = (0,external_wp_element_namespaceObject.useContext)(use_global_styles_revisions_GlobalStylesContext);
       
 22639   const _query = {
       
 22640     ...DEFAULT_QUERY,
       
 22641     ...query
       
 22642   };
       
 22643   const {
       
 22644     authors,
       
 22645     currentUser,
       
 22646     isDirty,
       
 22647     revisions,
       
 22648     isLoadingGlobalStylesRevisions,
       
 22649     revisionsCount
       
 22650   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 22651     var _globalStyles$_links$;
       
 22652     const {
       
 22653       __experimentalGetDirtyEntityRecords,
       
 22654       getCurrentUser,
       
 22655       getUsers,
       
 22656       getRevisions,
       
 22657       __experimentalGetCurrentGlobalStylesId,
       
 22658       getEntityRecord,
       
 22659       isResolving
       
 22660     } = select(external_wp_coreData_namespaceObject.store);
       
 22661     const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
       
 22662     const _currentUser = getCurrentUser();
       
 22663     const _isDirty = dirtyEntityRecords.length > 0;
       
 22664     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 22665     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 22666     const _revisionsCount = (_globalStyles$_links$ = globalStyles?._links?.['version-history']?.[0]?.count) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : 0;
       
 22667     const globalStylesRevisions = getRevisions('root', 'globalStyles', globalStylesId, _query) || EMPTY_ARRAY;
       
 22668     const _authors = getUsers(SITE_EDITOR_AUTHORS_QUERY) || EMPTY_ARRAY;
       
 22669     const _isResolving = isResolving('getRevisions', ['root', 'globalStyles', globalStylesId, _query]);
       
 22670     return {
       
 22671       authors: _authors,
       
 22672       currentUser: _currentUser,
       
 22673       isDirty: _isDirty,
       
 22674       revisions: globalStylesRevisions,
       
 22675       isLoadingGlobalStylesRevisions: _isResolving,
       
 22676       revisionsCount: _revisionsCount
       
 22677     };
       
 22678   }, [query]);
       
 22679   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 22680     if (!authors.length || isLoadingGlobalStylesRevisions) {
       
 22681       return {
       
 22682         revisions: EMPTY_ARRAY,
       
 22683         hasUnsavedChanges: isDirty,
       
 22684         isLoading: true,
       
 22685         revisionsCount
       
 22686       };
       
 22687     }
       
 22688 
       
 22689     // Adds author details to each revision.
       
 22690     const _modifiedRevisions = revisions.map(revision => {
       
 22691       return {
       
 22692         ...revision,
       
 22693         author: authors.find(author => author.id === revision.author)
       
 22694       };
       
 22695     });
       
 22696     const fetchedRevisionsCount = revisions.length;
       
 22697     if (fetchedRevisionsCount) {
       
 22698       // Flags the most current saved revision.
       
 22699       if (_modifiedRevisions[0].id !== 'unsaved' && _query.page === 1) {
       
 22700         _modifiedRevisions[0].isLatest = true;
       
 22701       }
       
 22702 
       
 22703       // Adds an item for unsaved changes.
       
 22704       if (isDirty && userConfig && Object.keys(userConfig).length > 0 && currentUser && _query.page === 1) {
       
 22705         const unsavedRevision = {
       
 22706           id: 'unsaved',
       
 22707           styles: userConfig?.styles,
       
 22708           settings: userConfig?.settings,
       
 22709           _links: userConfig?._links,
       
 22710           author: {
       
 22711             name: currentUser?.name,
       
 22712             avatar_urls: currentUser?.avatar_urls
       
 22713           },
       
 22714           modified: new Date()
       
 22715         };
       
 22716         _modifiedRevisions.unshift(unsavedRevision);
       
 22717       }
       
 22718       if (_query.page === Math.ceil(revisionsCount / _query.per_page)) {
       
 22719         // Adds an item for the default theme styles.
       
 22720         _modifiedRevisions.push({
       
 22721           id: 'parent',
       
 22722           styles: {},
       
 22723           settings: {}
       
 22724         });
       
 22725       }
       
 22726     }
       
 22727     return {
       
 22728       revisions: _modifiedRevisions,
       
 22729       hasUnsavedChanges: isDirty,
       
 22730       isLoading: false,
       
 22731       revisionsCount
       
 22732     };
       
 22733   }, [isDirty, revisions, currentUser, authors, userConfig, isLoadingGlobalStylesRevisions]);
       
 22734 }
       
 22735 
       
 22736 ;// CONCATENATED MODULE: external ["wp","date"]
       
 22737 const external_wp_date_namespaceObject = window["wp"]["date"];
       
 22738 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-revisions/revisions-buttons.js
       
 22739 /**
       
 22740  * External dependencies
       
 22741  */
       
 22742 
       
 22743 
       
 22744 /**
       
 22745  * WordPress dependencies
       
 22746  */
       
 22747 
       
 22748 
       
 22749 
       
 22750 
       
 22751 
       
 22752 
       
 22753 
       
 22754 /**
       
 22755  * Internal dependencies
       
 22756  */
       
 22757 
       
 22758 
       
 22759 
       
 22760 const DAY_IN_MILLISECONDS = 60 * 60 * 1000 * 24;
       
 22761 const {
       
 22762   getGlobalStylesChanges
       
 22763 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 22764 function ChangesSummary({
       
 22765   revision,
       
 22766   previousRevision
       
 22767 }) {
       
 22768   const changes = getGlobalStylesChanges(revision, previousRevision, {
       
 22769     maxResults: 7
       
 22770   });
       
 22771   if (!changes.length) {
       
 22772     return null;
       
 22773   }
       
 22774   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
       
 22775     "data-testid": "global-styles-revision-changes",
       
 22776     className: "edit-site-global-styles-screen-revisions__changes",
       
 22777     children: changes.map(change => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
       
 22778       children: change
       
 22779     }, change))
       
 22780   });
       
 22781 }
       
 22782 
       
 22783 /**
       
 22784  * Returns a button label for the revision.
       
 22785  *
       
 22786  * @param {string|number} id                    A revision object.
       
 22787  * @param {string}        authorDisplayName     Author name.
       
 22788  * @param {string}        formattedModifiedDate Revision modified date formatted.
       
 22789  * @param {boolean}       areStylesEqual        Whether the revision matches the current editor styles.
       
 22790  * @return {string} Translated label.
       
 22791  */
       
 22792 function getRevisionLabel(id, authorDisplayName, formattedModifiedDate, areStylesEqual) {
       
 22793   if ('parent' === id) {
       
 22794     return (0,external_wp_i18n_namespaceObject.__)('Reset the styles to the theme defaults');
       
 22795   }
       
 22796   if ('unsaved' === id) {
       
 22797     return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: author display name */
       
 22798     (0,external_wp_i18n_namespaceObject.__)('Unsaved changes by %s'), authorDisplayName);
       
 22799   }
       
 22800   return areStylesEqual ? (0,external_wp_i18n_namespaceObject.sprintf)(
       
 22801   // translators: %1$s: author display name, %2$s: revision creation date.
       
 22802   (0,external_wp_i18n_namespaceObject.__)('Changes saved by %1$s on %2$s. This revision matches current editor styles.'), authorDisplayName, formattedModifiedDate) : (0,external_wp_i18n_namespaceObject.sprintf)(
       
 22803   // translators: %1$s: author display name, %2$s: revision creation date.
       
 22804   (0,external_wp_i18n_namespaceObject.__)('Changes saved by %1$s on %2$s'), authorDisplayName, formattedModifiedDate);
       
 22805 }
       
 22806 
       
 22807 /**
       
 22808  * Returns a rendered list of revisions buttons.
       
 22809  *
       
 22810  * @typedef {Object} props
       
 22811  * @property {Array<Object>} userRevisions      A collection of user revisions.
       
 22812  * @property {number}        selectedRevisionId The id of the currently-selected revision.
       
 22813  * @property {Function}      onChange           Callback fired when a revision is selected.
       
 22814  *
       
 22815  * @param    {props}         Component          props.
       
 22816  * @return {JSX.Element} The modal component.
       
 22817  */
       
 22818 function RevisionsButtons({
       
 22819   userRevisions,
       
 22820   selectedRevisionId,
       
 22821   onChange,
       
 22822   canApplyRevision,
       
 22823   onApplyRevision
       
 22824 }) {
       
 22825   const {
       
 22826     currentThemeName,
       
 22827     currentUser
       
 22828   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 22829     const {
       
 22830       getCurrentTheme,
       
 22831       getCurrentUser
       
 22832     } = select(external_wp_coreData_namespaceObject.store);
       
 22833     const currentTheme = getCurrentTheme();
       
 22834     return {
       
 22835       currentThemeName: currentTheme?.name?.rendered || currentTheme?.stylesheet,
       
 22836       currentUser: getCurrentUser()
       
 22837     };
       
 22838   }, []);
       
 22839   const dateNowInMs = (0,external_wp_date_namespaceObject.getDate)().getTime();
       
 22840   const {
       
 22841     datetimeAbbreviated
       
 22842   } = (0,external_wp_date_namespaceObject.getSettings)().formats;
       
 22843   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", {
       
 22844     className: "edit-site-global-styles-screen-revisions__revisions-list",
       
 22845     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Global styles revisions list'),
       
 22846     role: "group",
       
 22847     children: userRevisions.map((revision, index) => {
       
 22848       const {
       
 22849         id,
       
 22850         author,
       
 22851         modified
       
 22852       } = revision;
       
 22853       const isUnsaved = 'unsaved' === id;
       
 22854       // Unsaved changes are created by the current user.
       
 22855       const revisionAuthor = isUnsaved ? currentUser : author;
       
 22856       const authorDisplayName = revisionAuthor?.name || (0,external_wp_i18n_namespaceObject.__)('User');
       
 22857       const authorAvatar = revisionAuthor?.avatar_urls?.['48'];
       
 22858       const isFirstItem = index === 0;
       
 22859       const isSelected = selectedRevisionId ? selectedRevisionId === id : isFirstItem;
       
 22860       const areStylesEqual = !canApplyRevision && isSelected;
       
 22861       const isReset = 'parent' === id;
       
 22862       const modifiedDate = (0,external_wp_date_namespaceObject.getDate)(modified);
       
 22863       const displayDate = modified && dateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS ? (0,external_wp_date_namespaceObject.dateI18n)(datetimeAbbreviated, modifiedDate) : (0,external_wp_date_namespaceObject.humanTimeDiff)(modified);
       
 22864       const revisionLabel = getRevisionLabel(id, authorDisplayName, (0,external_wp_date_namespaceObject.dateI18n)(datetimeAbbreviated, modifiedDate), areStylesEqual);
       
 22865       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
       
 22866         className: dist_clsx('edit-site-global-styles-screen-revisions__revision-item', {
       
 22867           'is-selected': isSelected,
       
 22868           'is-active': areStylesEqual,
       
 22869           'is-reset': isReset
       
 22870         }),
       
 22871         "aria-current": isSelected,
       
 22872         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 22873           className: "edit-site-global-styles-screen-revisions__revision-button",
       
 22874           __experimentalIsFocusable: true,
       
 22875           disabled: isSelected,
       
 22876           onClick: () => {
       
 22877             onChange(revision);
       
 22878           },
       
 22879           "aria-label": revisionLabel,
       
 22880           children: isReset ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
       
 22881             className: "edit-site-global-styles-screen-revisions__description",
       
 22882             children: [(0,external_wp_i18n_namespaceObject.__)('Default styles'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 22883               className: "edit-site-global-styles-screen-revisions__meta",
       
 22884               children: currentThemeName
       
 22885             })]
       
 22886           }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
       
 22887             className: "edit-site-global-styles-screen-revisions__description",
       
 22888             children: [isUnsaved ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 22889               className: "edit-site-global-styles-screen-revisions__date",
       
 22890               children: (0,external_wp_i18n_namespaceObject.__)('(Unsaved)')
       
 22891             }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
       
 22892               className: "edit-site-global-styles-screen-revisions__date",
       
 22893               dateTime: modified,
       
 22894               children: displayDate
       
 22895             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
       
 22896               className: "edit-site-global-styles-screen-revisions__meta",
       
 22897               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
       
 22898                 alt: authorDisplayName,
       
 22899                 src: authorAvatar
       
 22900               }), authorDisplayName]
       
 22901             }), isSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ChangesSummary, {
       
 22902               revision: revision,
       
 22903               previousRevision: index < userRevisions.length ? userRevisions[index + 1] : {}
       
 22904             })]
       
 22905           })
       
 22906         }), isSelected && (areStylesEqual ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 22907           className: "edit-site-global-styles-screen-revisions__applied-text",
       
 22908           children: (0,external_wp_i18n_namespaceObject.__)('These styles are already applied to your site.')
       
 22909         }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 22910           size: "compact",
       
 22911           variant: "primary",
       
 22912           className: "edit-site-global-styles-screen-revisions__apply-button",
       
 22913           onClick: onApplyRevision,
       
 22914           children: isReset ? (0,external_wp_i18n_namespaceObject.__)('Reset to defaults') : (0,external_wp_i18n_namespaceObject.__)('Apply')
       
 22915         }))]
       
 22916       }, id);
       
 22917     })
       
 22918   });
       
 22919 }
       
 22920 /* harmony default export */ const revisions_buttons = (RevisionsButtons);
       
 22921 
       
 22922 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/previous.js
       
 22923 /**
       
 22924  * WordPress dependencies
       
 22925  */
       
 22926 
       
 22927 
       
 22928 const previous = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 22929   xmlns: "http://www.w3.org/2000/svg",
       
 22930   viewBox: "0 0 24 24",
       
 22931   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 22932     d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"
       
 22933   })
       
 22934 });
       
 22935 /* harmony default export */ const library_previous = (previous);
       
 22936 
       
 22937 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/next.js
       
 22938 /**
       
 22939  * WordPress dependencies
       
 22940  */
       
 22941 
       
 22942 
       
 22943 const next = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 22944   xmlns: "http://www.w3.org/2000/svg",
       
 22945   viewBox: "0 0 24 24",
       
 22946   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 22947     d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"
       
 22948   })
       
 22949 });
       
 22950 /* harmony default export */ const library_next = (next);
       
 22951 
       
 22952 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/pagination/index.js
       
 22953 /**
       
 22954  * External dependencies
       
 22955  */
       
 22956 
       
 22957 
       
 22958 /**
       
 22959  * WordPress dependencies
       
 22960  */
       
 22961 
       
 22962 
       
 22963 
       
 22964 
       
 22965 
       
 22966 function Pagination({
       
 22967   currentPage,
       
 22968   numPages,
       
 22969   changePage,
       
 22970   totalItems,
       
 22971   className,
       
 22972   disabled = false,
       
 22973   buttonVariant = 'tertiary',
       
 22974   label = (0,external_wp_i18n_namespaceObject.__)('Pagination Navigation')
       
 22975 }) {
       
 22976   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 22977     expanded: false,
       
 22978     as: "nav",
       
 22979     "aria-label": label,
       
 22980     spacing: 3,
       
 22981     justify: "flex-start",
       
 22982     className: dist_clsx('edit-site-pagination', className),
       
 22983     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 22984       variant: "muted",
       
 22985       className: "edit-site-pagination__total",
       
 22986       children:
       
 22987       // translators: %s: Total number of patterns.
       
 22988       (0,external_wp_i18n_namespaceObject.sprintf)(
       
 22989       // translators: %s: Total number of patterns.
       
 22990       (0,external_wp_i18n_namespaceObject._n)('%s item', '%s items', totalItems), totalItems)
       
 22991     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 22992       expanded: false,
       
 22993       spacing: 1,
       
 22994       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 22995         variant: buttonVariant,
       
 22996         onClick: () => changePage(1),
       
 22997         __experimentalIsFocusable: true,
       
 22998         disabled: disabled || currentPage === 1,
       
 22999         label: (0,external_wp_i18n_namespaceObject.__)('First page'),
       
 23000         icon: library_previous,
       
 23001         size: "compact"
       
 23002       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 23003         variant: buttonVariant,
       
 23004         onClick: () => changePage(currentPage - 1),
       
 23005         __experimentalIsFocusable: true,
       
 23006         disabled: disabled || currentPage === 1,
       
 23007         label: (0,external_wp_i18n_namespaceObject.__)('Previous page'),
       
 23008         icon: chevron_left,
       
 23009         size: "compact"
       
 23010       })]
       
 23011     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 23012       variant: "muted",
       
 23013       children: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 23014       // translators: %1$s: Current page number, %2$s: Total number of pages.
       
 23015       (0,external_wp_i18n_namespaceObject._x)('%1$s of %2$s', 'paging'), currentPage, numPages)
       
 23016     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 23017       expanded: false,
       
 23018       spacing: 1,
       
 23019       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 23020         variant: buttonVariant,
       
 23021         onClick: () => changePage(currentPage + 1),
       
 23022         __experimentalIsFocusable: true,
       
 23023         disabled: disabled || currentPage === numPages,
       
 23024         label: (0,external_wp_i18n_namespaceObject.__)('Next page'),
       
 23025         icon: chevron_right,
       
 23026         size: "compact"
       
 23027       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 23028         variant: buttonVariant,
       
 23029         onClick: () => changePage(numPages),
       
 23030         __experimentalIsFocusable: true,
       
 23031         disabled: disabled || currentPage === numPages,
       
 23032         label: (0,external_wp_i18n_namespaceObject.__)('Last page'),
       
 23033         icon: library_next,
       
 23034         size: "compact"
       
 23035       })]
       
 23036     })]
       
 23037   });
       
 23038 }
       
 23039 
       
 23040 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-revisions/index.js
       
 23041 /**
       
 23042  * WordPress dependencies
       
 23043  */
       
 23044 
       
 23045 
       
 23046 
       
 23047 
       
 23048 
       
 23049 
       
 23050 /**
       
 23051  * Internal dependencies
       
 23052  */
       
 23053 
       
 23054 
       
 23055 
       
 23056 
       
 23057 
       
 23058 
       
 23059 
       
 23060 
       
 23061 
       
 23062 
       
 23063 
       
 23064 const {
       
 23065   GlobalStylesContext: screen_revisions_GlobalStylesContext,
       
 23066   areGlobalStyleConfigsEqual: screen_revisions_areGlobalStyleConfigsEqual
       
 23067 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 23068 const PAGE_SIZE = 10;
       
 23069 function ScreenRevisions() {
       
 23070   const {
       
 23071     goTo
       
 23072   } = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 23073   const {
       
 23074     user: currentEditorGlobalStyles,
       
 23075     setUserConfig
       
 23076   } = (0,external_wp_element_namespaceObject.useContext)(screen_revisions_GlobalStylesContext);
       
 23077   const {
       
 23078     blocks,
       
 23079     editorCanvasContainerView
       
 23080   } = (0,external_wp_data_namespaceObject.useSelect)(select => ({
       
 23081     editorCanvasContainerView: lock_unlock_unlock(select(store)).getEditorCanvasContainerView(),
       
 23082     blocks: select(external_wp_blockEditor_namespaceObject.store).getBlocks()
       
 23083   }), []);
       
 23084   const [currentPage, setCurrentPage] = (0,external_wp_element_namespaceObject.useState)(1);
       
 23085   const [currentRevisions, setCurrentRevisions] = (0,external_wp_element_namespaceObject.useState)([]);
       
 23086   const {
       
 23087     revisions,
       
 23088     isLoading,
       
 23089     hasUnsavedChanges,
       
 23090     revisionsCount
       
 23091   } = useGlobalStylesRevisions({
       
 23092     query: {
       
 23093       per_page: PAGE_SIZE,
       
 23094       page: currentPage
       
 23095     }
       
 23096   });
       
 23097   const numPages = Math.ceil(revisionsCount / PAGE_SIZE);
       
 23098   const [currentlySelectedRevision, setCurrentlySelectedRevision] = (0,external_wp_element_namespaceObject.useState)(currentEditorGlobalStyles);
       
 23099   const [isLoadingRevisionWithUnsavedChanges, setIsLoadingRevisionWithUnsavedChanges] = (0,external_wp_element_namespaceObject.useState)(false);
       
 23100   const {
       
 23101     setEditorCanvasContainerView
       
 23102   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 23103   const selectedRevisionMatchesEditorStyles = screen_revisions_areGlobalStyleConfigsEqual(currentlySelectedRevision, currentEditorGlobalStyles);
       
 23104   const onCloseRevisions = () => {
       
 23105     goTo('/'); // Return to global styles main panel.
       
 23106     const canvasContainerView = editorCanvasContainerView === 'global-styles-revisions:style-book' ? 'style-book' : undefined;
       
 23107     setEditorCanvasContainerView(canvasContainerView);
       
 23108   };
       
 23109   const restoreRevision = revision => {
       
 23110     setUserConfig(() => revision);
       
 23111     setIsLoadingRevisionWithUnsavedChanges(false);
       
 23112     onCloseRevisions();
       
 23113   };
       
 23114   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 23115     if (!editorCanvasContainerView || !editorCanvasContainerView.startsWith('global-styles-revisions')) {
       
 23116       goTo('/'); // Return to global styles main panel.
       
 23117     }
       
 23118   }, [editorCanvasContainerView]);
       
 23119   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 23120     if (!isLoading && revisions.length) {
       
 23121       setCurrentRevisions(revisions);
       
 23122     }
       
 23123   }, [revisions, isLoading]);
       
 23124   const firstRevision = revisions[0];
       
 23125   const currentlySelectedRevisionId = currentlySelectedRevision?.id;
       
 23126   const shouldSelectFirstItem = !!firstRevision?.id && !selectedRevisionMatchesEditorStyles && !currentlySelectedRevisionId;
       
 23127   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 23128     /*
       
 23129      * Ensure that the first item is selected and loaded into the preview pane
       
 23130      * when no revision is selected and the selected styles don't match the current editor styles.
       
 23131      * This is required in case editor styles are changed outside the revisions panel,
       
 23132      * e.g., via the reset styles function of useGlobalStylesReset().
       
 23133      * See: https://github.com/WordPress/gutenberg/issues/55866
       
 23134      */
       
 23135     if (shouldSelectFirstItem) {
       
 23136       setCurrentlySelectedRevision(firstRevision);
       
 23137     }
       
 23138   }, [shouldSelectFirstItem, firstRevision]);
       
 23139 
       
 23140   // Only display load button if there is a revision to load,
       
 23141   // and it is different from the current editor styles.
       
 23142   const isLoadButtonEnabled = !!currentlySelectedRevisionId && currentlySelectedRevisionId !== 'unsaved' && !selectedRevisionMatchesEditorStyles;
       
 23143   const hasRevisions = !!currentRevisions.length;
       
 23144   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 23145     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
       
 23146       title: revisionsCount &&
       
 23147       // translators: %s: number of revisions.
       
 23148       (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Revisions (%s)'), revisionsCount),
       
 23149       description: (0,external_wp_i18n_namespaceObject.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),
       
 23150       onBack: onCloseRevisions
       
 23151     }), !hasRevisions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {
       
 23152       className: "edit-site-global-styles-screen-revisions__loading"
       
 23153     }), hasRevisions && (editorCanvasContainerView === 'global-styles-revisions:style-book' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(style_book, {
       
 23154       userConfig: currentlySelectedRevision,
       
 23155       isSelected: () => {},
       
 23156       onClose: () => {
       
 23157         setEditorCanvasContainerView('global-styles-revisions');
       
 23158       }
       
 23159     }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(components_revisions, {
       
 23160       blocks: blocks,
       
 23161       userConfig: currentlySelectedRevision,
       
 23162       closeButtonLabel: (0,external_wp_i18n_namespaceObject.__)('Close revisions')
       
 23163     })), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(revisions_buttons, {
       
 23164       onChange: setCurrentlySelectedRevision,
       
 23165       selectedRevisionId: currentlySelectedRevisionId,
       
 23166       userRevisions: currentRevisions,
       
 23167       canApplyRevision: isLoadButtonEnabled,
       
 23168       onApplyRevision: () => hasUnsavedChanges ? setIsLoadingRevisionWithUnsavedChanges(true) : restoreRevision(currentlySelectedRevision)
       
 23169     }), numPages > 1 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 23170       className: "edit-site-global-styles-screen-revisions__footer",
       
 23171       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Pagination, {
       
 23172         className: "edit-site-global-styles-screen-revisions__pagination",
       
 23173         currentPage: currentPage,
       
 23174         numPages: numPages,
       
 23175         changePage: setCurrentPage,
       
 23176         totalItems: revisionsCount,
       
 23177         disabled: isLoading,
       
 23178         label: (0,external_wp_i18n_namespaceObject.__)('Global Styles pagination navigation')
       
 23179       })
       
 23180     }), isLoadingRevisionWithUnsavedChanges && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
       
 23181       isOpen: isLoadingRevisionWithUnsavedChanges,
       
 23182       confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Apply'),
       
 23183       onConfirm: () => restoreRevision(currentlySelectedRevision),
       
 23184       onCancel: () => setIsLoadingRevisionWithUnsavedChanges(false),
       
 23185       size: "medium",
       
 23186       children: (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to apply this revision? Any unsaved changes will be lost.')
       
 23187     })]
       
 23188   });
       
 23189 }
       
 23190 /* harmony default export */ const screen_revisions = (ScreenRevisions);
       
 23191 
       
 23192 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/ui.js
       
 23193 /**
       
 23194  * WordPress dependencies
       
 23195  */
       
 23196 
       
 23197 
       
 23198 
       
 23199 
       
 23200 
       
 23201 
       
 23202 
       
 23203 
       
 23204 
       
 23205 
       
 23206 /**
       
 23207  * Internal dependencies
       
 23208  */
       
 23209 
       
 23210 
       
 23211 
       
 23212 
       
 23213 
       
 23214 
       
 23215 
       
 23216 
       
 23217 
       
 23218 
       
 23219 
       
 23220 
       
 23221 
       
 23222 
       
 23223 
       
 23224 
       
 23225 
       
 23226 
       
 23227 const SLOT_FILL_NAME = 'GlobalStylesMenu';
       
 23228 const {
       
 23229   useGlobalStylesReset: ui_useGlobalStylesReset
       
 23230 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 23231 const {
       
 23232   Slot: GlobalStylesMenuSlot,
       
 23233   Fill: GlobalStylesMenuFill
       
 23234 } = (0,external_wp_components_namespaceObject.createSlotFill)(SLOT_FILL_NAME);
       
 23235 function GlobalStylesActionMenu() {
       
 23236   const [canReset, onReset] = ui_useGlobalStylesReset();
       
 23237   const {
       
 23238     toggle
       
 23239   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
 23240   const {
       
 23241     canEditCSS
       
 23242   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 23243     const {
       
 23244       getEntityRecord,
       
 23245       __experimentalGetCurrentGlobalStylesId
       
 23246     } = select(external_wp_coreData_namespaceObject.store);
       
 23247     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 23248     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 23249     return {
       
 23250       canEditCSS: !!globalStyles?._links?.['wp:action-edit-css']
       
 23251     };
       
 23252   }, []);
       
 23253   const {
       
 23254     setEditorCanvasContainerView
       
 23255   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 23256   const {
       
 23257     goTo
       
 23258   } = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 23259   const loadCustomCSS = () => {
       
 23260     setEditorCanvasContainerView('global-styles-css');
       
 23261     goTo('/css');
       
 23262   };
       
 23263   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesMenuFill, {
       
 23264     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
       
 23265       icon: more_vertical,
       
 23266       label: (0,external_wp_i18n_namespaceObject.__)('More'),
       
 23267       toggleProps: {
       
 23268         size: 'compact'
       
 23269       },
       
 23270       children: ({
       
 23271         onClose
       
 23272       }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 23273         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
       
 23274           children: [canEditCSS && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 23275             onClick: loadCustomCSS,
       
 23276             children: (0,external_wp_i18n_namespaceObject.__)('Additional CSS')
       
 23277           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 23278             onClick: () => {
       
 23279               toggle('core/edit-site', 'welcomeGuideStyles');
       
 23280               onClose();
       
 23281             },
       
 23282             children: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
       
 23283           })]
       
 23284         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
       
 23285           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 23286             onClick: () => {
       
 23287               onReset();
       
 23288               onClose();
       
 23289             },
       
 23290             disabled: !canReset,
       
 23291             children: (0,external_wp_i18n_namespaceObject.__)('Reset styles')
       
 23292           })
       
 23293         })]
       
 23294       })
       
 23295     })
       
 23296   });
       
 23297 }
       
 23298 function GlobalStylesNavigationScreen({
       
 23299   className,
       
 23300   ...props
       
 23301 }) {
       
 23302   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
       
 23303     className: ['edit-site-global-styles-sidebar__navigator-screen', className].filter(Boolean).join(' '),
       
 23304     ...props
       
 23305   });
       
 23306 }
       
 23307 function BlockStylesNavigationScreens({
       
 23308   parentMenu,
       
 23309   blockStyles,
       
 23310   blockName
       
 23311 }) {
       
 23312   return blockStyles.map((style, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23313     path: parentMenu + '/variations/' + style.name,
       
 23314     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_block, {
       
 23315       name: blockName,
       
 23316       variation: style.name
       
 23317     })
       
 23318   }, index));
       
 23319 }
       
 23320 function ContextScreens({
       
 23321   name,
       
 23322   parentMenu = ''
       
 23323 }) {
       
 23324   const blockStyleVariations = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 23325     const {
       
 23326       getBlockStyles
       
 23327     } = select(external_wp_blocks_namespaceObject.store);
       
 23328     return getBlockStyles(name);
       
 23329   }, [name]);
       
 23330   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 23331     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23332       path: parentMenu + '/colors/palette',
       
 23333       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_color_palette, {
       
 23334         name: name
       
 23335       })
       
 23336     }), !!blockStyleVariations?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockStylesNavigationScreens, {
       
 23337       parentMenu: parentMenu,
       
 23338       blockStyles: blockStyleVariations,
       
 23339       blockName: name
       
 23340     })]
       
 23341   });
       
 23342 }
       
 23343 function GlobalStylesStyleBook() {
       
 23344   const navigator = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 23345   const {
       
 23346     path
       
 23347   } = navigator.location;
       
 23348   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(style_book, {
       
 23349     isSelected: blockName =>
       
 23350     // Match '/blocks/core%2Fbutton' and
       
 23351     // '/blocks/core%2Fbutton/typography', but not
       
 23352     // '/blocks/core%2Fbuttons'.
       
 23353     path === `/blocks/${encodeURIComponent(blockName)}` || path.startsWith(`/blocks/${encodeURIComponent(blockName)}/`),
       
 23354     onSelect: blockName => {
       
 23355       // Now go to the selected block.
       
 23356       navigator.goTo('/blocks/' + encodeURIComponent(blockName));
       
 23357     }
       
 23358   });
       
 23359 }
       
 23360 function GlobalStylesBlockLink() {
       
 23361   const navigator = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 23362   const {
       
 23363     selectedBlockName,
       
 23364     selectedBlockClientId
       
 23365   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 23366     const {
       
 23367       getSelectedBlockClientId,
       
 23368       getBlockName
       
 23369     } = select(external_wp_blockEditor_namespaceObject.store);
       
 23370     const clientId = getSelectedBlockClientId();
       
 23371     return {
       
 23372       selectedBlockName: getBlockName(clientId),
       
 23373       selectedBlockClientId: clientId
       
 23374     };
       
 23375   }, []);
       
 23376   const blockHasGlobalStyles = useBlockHasGlobalStyles(selectedBlockName);
       
 23377   // When we're in the `Blocks` screen enable deep linking to the selected block.
       
 23378   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 23379     if (!selectedBlockClientId || !blockHasGlobalStyles) {
       
 23380       return;
       
 23381     }
       
 23382     const currentPath = navigator.location.path;
       
 23383     if (currentPath !== '/blocks' && !currentPath.startsWith('/blocks/')) {
       
 23384       return;
       
 23385     }
       
 23386     const newPath = '/blocks/' + encodeURIComponent(selectedBlockName);
       
 23387     // Avoid navigating to the same path. This can happen when selecting
       
 23388     // a new block of the same type.
       
 23389     if (newPath !== currentPath) {
       
 23390       navigator.goTo(newPath, {
       
 23391         skipFocus: true
       
 23392       });
       
 23393     }
       
 23394   }, [selectedBlockClientId, selectedBlockName, blockHasGlobalStyles]);
       
 23395 }
       
 23396 function GlobalStylesEditorCanvasContainerLink() {
       
 23397   const {
       
 23398     goTo,
       
 23399     location
       
 23400   } = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 23401   const editorCanvasContainerView = (0,external_wp_data_namespaceObject.useSelect)(select => lock_unlock_unlock(select(store)).getEditorCanvasContainerView(), []);
       
 23402   const path = location?.path;
       
 23403   const isRevisionsOpen = path === '/revisions';
       
 23404 
       
 23405   // If the user switches the editor canvas container view, redirect
       
 23406   // to the appropriate screen. This effectively allows deep linking to the
       
 23407   // desired screens from outside the global styles navigation provider.
       
 23408   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 23409     switch (editorCanvasContainerView) {
       
 23410       case 'global-styles-revisions':
       
 23411       case 'global-styles-revisions:style-book':
       
 23412         goTo('/revisions');
       
 23413         break;
       
 23414       case 'global-styles-css':
       
 23415         goTo('/css');
       
 23416         break;
       
 23417       case 'style-book':
       
 23418         /*
       
 23419          * The stand-alone style book is open
       
 23420          * and the revisions panel is open,
       
 23421          * close the revisions panel.
       
 23422          * Otherwise keep the style book open while
       
 23423          * browsing global styles panel.
       
 23424          */
       
 23425         if (isRevisionsOpen) {
       
 23426           goTo('/');
       
 23427         }
       
 23428         break;
       
 23429       default:
       
 23430         /*
       
 23431          * Example: the user has navigated to "Browse styles" or elsewhere
       
 23432          * and changes the editorCanvasContainerView, e.g., closes the style book.
       
 23433          * The panel should not be affected.
       
 23434          * Exclude revisions panel from this behavior,
       
 23435          * as it should close when the editorCanvasContainerView doesn't correspond.
       
 23436          */
       
 23437         if (path !== '/' && !isRevisionsOpen) {
       
 23438           return;
       
 23439         }
       
 23440         goTo('/');
       
 23441         break;
       
 23442     }
       
 23443   }, [editorCanvasContainerView, isRevisionsOpen, goTo]);
       
 23444 }
       
 23445 function GlobalStylesUI() {
       
 23446   const blocks = (0,external_wp_blocks_namespaceObject.getBlockTypes)();
       
 23447   const editorCanvasContainerView = (0,external_wp_data_namespaceObject.useSelect)(select => lock_unlock_unlock(select(store)).getEditorCanvasContainerView(), []);
       
 23448   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalNavigatorProvider, {
       
 23449     className: "edit-site-global-styles-sidebar__navigator-provider",
       
 23450     initialPath: "/",
       
 23451     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23452       path: "/",
       
 23453       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_root, {})
       
 23454     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23455       path: "/variations",
       
 23456       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_style_variations, {})
       
 23457     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23458       path: "/blocks",
       
 23459       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_block_list, {})
       
 23460     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23461       path: "/typography",
       
 23462       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typography, {})
       
 23463     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23464       path: "/typography/text",
       
 23465       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typography_element, {
       
 23466         element: "text"
       
 23467       })
       
 23468     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23469       path: "/typography/link",
       
 23470       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typography_element, {
       
 23471         element: "link"
       
 23472       })
       
 23473     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23474       path: "/typography/heading",
       
 23475       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typography_element, {
       
 23476         element: "heading"
       
 23477       })
       
 23478     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23479       path: "/typography/caption",
       
 23480       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typography_element, {
       
 23481         element: "caption"
       
 23482       })
       
 23483     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23484       path: "/typography/button",
       
 23485       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typography_element, {
       
 23486         element: "button"
       
 23487       })
       
 23488     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23489       path: "/colors",
       
 23490       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_colors, {})
       
 23491     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23492       path: "/shadows",
       
 23493       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ScreenShadows, {})
       
 23494     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23495       path: "/shadows/edit/:category/:slug",
       
 23496       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ScreenShadowsEdit, {})
       
 23497     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23498       path: "/layout",
       
 23499       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_layout, {})
       
 23500     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23501       path: "/css",
       
 23502       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_css, {})
       
 23503     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23504       path: "/revisions",
       
 23505       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_revisions, {})
       
 23506     }), blocks.map(block => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
       
 23507       path: '/blocks/' + encodeURIComponent(block.name),
       
 23508       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_block, {
       
 23509         name: block.name
       
 23510       })
       
 23511     }, 'menu-block-' + block.name)), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ContextScreens, {}), blocks.map(block => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ContextScreens, {
       
 23512       name: block.name,
       
 23513       parentMenu: '/blocks/' + encodeURIComponent(block.name)
       
 23514     }, 'screens-block-' + block.name)), 'style-book' === editorCanvasContainerView && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesStyleBook, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesActionMenu, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesBlockLink, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesEditorCanvasContainerLink, {})]
       
 23515   });
       
 23516 }
       
 23517 
       
 23518 /* harmony default export */ const ui = (GlobalStylesUI);
       
 23519 
       
 23520 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/index.js
       
 23521 
       
 23522 
       
 23523 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles-sidebar/default-sidebar.js
       
 23524 /**
       
 23525  * WordPress dependencies
       
 23526  */
       
 23527 
       
 23528 
       
 23529 /**
       
 23530  * Internal dependencies
       
 23531  */
       
 23532 
       
 23533 
       
 23534 
       
 23535 
       
 23536 const {
       
 23537   ComplementaryArea,
       
 23538   ComplementaryAreaMoreMenuItem
       
 23539 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 23540 function DefaultSidebar({
       
 23541   className,
       
 23542   identifier,
       
 23543   title,
       
 23544   icon,
       
 23545   children,
       
 23546   closeLabel,
       
 23547   header,
       
 23548   headerClassName,
       
 23549   panelClassName,
       
 23550   isActiveByDefault
       
 23551 }) {
       
 23552   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 23553     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryArea, {
       
 23554       className: className,
       
 23555       scope: "core",
       
 23556       identifier: identifier,
       
 23557       title: title,
       
 23558       smallScreenTitle: title,
       
 23559       icon: icon,
       
 23560       closeLabel: closeLabel,
       
 23561       header: header,
       
 23562       headerClassName: headerClassName,
       
 23563       panelClassName: panelClassName,
       
 23564       isActiveByDefault: isActiveByDefault,
       
 23565       children: children
       
 23566     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaMoreMenuItem, {
       
 23567       scope: "core",
       
 23568       identifier: identifier,
       
 23569       icon: icon,
       
 23570       children: title
       
 23571     })]
       
 23572   });
       
 23573 }
       
 23574 
       
 23575 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles-sidebar/index.js
       
 23576 /**
       
 23577  * WordPress dependencies
       
 23578  */
       
 23579 
       
 23580 
       
 23581 
       
 23582 
       
 23583 
       
 23584 
       
 23585 
       
 23586 
       
 23587 /**
       
 23588  * Internal dependencies
       
 23589  */
       
 23590 
       
 23591 
       
 23592 
       
 23593 
       
 23594 
       
 23595 
       
 23596 
       
 23597 
       
 23598 const {
       
 23599   interfaceStore: global_styles_sidebar_interfaceStore
       
 23600 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 23601 function GlobalStylesSidebar() {
       
 23602   const {
       
 23603     shouldClearCanvasContainerView,
       
 23604     isStyleBookOpened,
       
 23605     showListViewByDefault,
       
 23606     hasRevisions,
       
 23607     isRevisionsOpened,
       
 23608     isRevisionsStyleBookOpened
       
 23609   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 23610     const {
       
 23611       getActiveComplementaryArea
       
 23612     } = select(global_styles_sidebar_interfaceStore);
       
 23613     const {
       
 23614       getEditorCanvasContainerView,
       
 23615       getCanvasMode
       
 23616     } = lock_unlock_unlock(select(store));
       
 23617     const canvasContainerView = getEditorCanvasContainerView();
       
 23618     const _isVisualEditorMode = 'visual' === select(external_wp_editor_namespaceObject.store).getEditorMode();
       
 23619     const _isEditCanvasMode = 'edit' === getCanvasMode();
       
 23620     const _showListViewByDefault = select(external_wp_preferences_namespaceObject.store).get('core', 'showListViewByDefault');
       
 23621     const {
       
 23622       getEntityRecord,
       
 23623       __experimentalGetCurrentGlobalStylesId
       
 23624     } = select(external_wp_coreData_namespaceObject.store);
       
 23625     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 23626     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 23627     return {
       
 23628       isStyleBookOpened: 'style-book' === canvasContainerView,
       
 23629       shouldClearCanvasContainerView: 'edit-site/global-styles' !== getActiveComplementaryArea('core') || !_isVisualEditorMode || !_isEditCanvasMode,
       
 23630       showListViewByDefault: _showListViewByDefault,
       
 23631       hasRevisions: !!globalStyles?._links?.['version-history']?.[0]?.count,
       
 23632       isRevisionsStyleBookOpened: 'global-styles-revisions:style-book' === canvasContainerView,
       
 23633       isRevisionsOpened: 'global-styles-revisions' === canvasContainerView
       
 23634     };
       
 23635   }, []);
       
 23636   const {
       
 23637     setEditorCanvasContainerView
       
 23638   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 23639   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 23640     if (shouldClearCanvasContainerView) {
       
 23641       setEditorCanvasContainerView(undefined);
       
 23642     }
       
 23643   }, [shouldClearCanvasContainerView]);
       
 23644   const {
       
 23645     setIsListViewOpened
       
 23646   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
       
 23647   const {
       
 23648     goTo
       
 23649   } = (0,external_wp_components_namespaceObject.__experimentalUseNavigator)();
       
 23650   const toggleRevisions = () => {
       
 23651     setIsListViewOpened(false);
       
 23652     if (isRevisionsStyleBookOpened) {
       
 23653       goTo('/');
       
 23654       setEditorCanvasContainerView('style-book');
       
 23655       return;
       
 23656     }
       
 23657     if (isRevisionsOpened) {
       
 23658       goTo('/');
       
 23659       setEditorCanvasContainerView(undefined);
       
 23660       return;
       
 23661     }
       
 23662     goTo('/revisions');
       
 23663     if (isStyleBookOpened) {
       
 23664       setEditorCanvasContainerView('global-styles-revisions:style-book');
       
 23665     } else {
       
 23666       setEditorCanvasContainerView('global-styles-revisions');
       
 23667     }
       
 23668   };
       
 23669   const toggleStyleBook = () => {
       
 23670     if (isRevisionsOpened) {
       
 23671       setEditorCanvasContainerView('global-styles-revisions:style-book');
       
 23672       return;
       
 23673     }
       
 23674     if (isRevisionsStyleBookOpened) {
       
 23675       setEditorCanvasContainerView('global-styles-revisions');
       
 23676       return;
       
 23677     }
       
 23678     setIsListViewOpened(isStyleBookOpened && showListViewByDefault);
       
 23679     setEditorCanvasContainerView(isStyleBookOpened ? undefined : 'style-book');
       
 23680   };
       
 23681   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DefaultSidebar, {
       
 23682     className: "edit-site-global-styles-sidebar",
       
 23683     identifier: "edit-site/global-styles",
       
 23684     title: (0,external_wp_i18n_namespaceObject.__)('Styles'),
       
 23685     icon: library_styles,
       
 23686     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close Styles'),
       
 23687     panelClassName: "edit-site-global-styles-sidebar__panel",
       
 23688     header: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 23689       className: "edit-site-global-styles-sidebar__header",
       
 23690       gap: 1,
       
 23691       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexBlock, {
       
 23692         style: {
       
 23693           minWidth: 'min-content'
       
 23694         },
       
 23695         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
       
 23696           className: "edit-site-global-styles-sidebar__header-title",
       
 23697           children: (0,external_wp_i18n_namespaceObject.__)('Styles')
       
 23698         })
       
 23699       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 23700         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 23701           icon: library_seen,
       
 23702           label: (0,external_wp_i18n_namespaceObject.__)('Style Book'),
       
 23703           isPressed: isStyleBookOpened || isRevisionsStyleBookOpened,
       
 23704           __experimentalIsFocusable: true,
       
 23705           disabled: shouldClearCanvasContainerView,
       
 23706           onClick: toggleStyleBook,
       
 23707           size: "compact"
       
 23708         })
       
 23709       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 23710         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 23711           label: (0,external_wp_i18n_namespaceObject.__)('Revisions'),
       
 23712           icon: library_backup,
       
 23713           onClick: toggleRevisions,
       
 23714           __experimentalIsFocusable: true,
       
 23715           disabled: !hasRevisions,
       
 23716           isPressed: isRevisionsOpened || isRevisionsStyleBookOpened,
       
 23717           size: "compact"
       
 23718         })
       
 23719       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesMenuSlot, {})]
       
 23720     }),
       
 23721     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ui, {})
       
 23722   });
       
 23723 }
       
 23724 
       
 23725 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/save-button/index.js
       
 23726 /**
       
 23727  * WordPress dependencies
       
 23728  */
       
 23729 
       
 23730 
       
 23731 
       
 23732 
       
 23733 
       
 23734 
       
 23735 
       
 23736 
       
 23737 /**
       
 23738  * Internal dependencies
       
 23739  */
       
 23740 
       
 23741 
       
 23742 
       
 23743 
       
 23744 const {
       
 23745   useLocation: save_button_useLocation
       
 23746 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 23747 function SaveButton({
       
 23748   className = 'edit-site-save-button__button',
       
 23749   variant = 'primary',
       
 23750   showTooltip = true,
       
 23751   showReviewMessage,
       
 23752   icon,
       
 23753   size,
       
 23754   __next40pxDefaultSize = false
       
 23755 }) {
       
 23756   const {
       
 23757     params
       
 23758   } = save_button_useLocation();
       
 23759   const {
       
 23760     setIsSaveViewOpened
       
 23761   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 23762   const {
       
 23763     saveDirtyEntities
       
 23764   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store));
       
 23765   const {
       
 23766     dirtyEntityRecords
       
 23767   } = (0,external_wp_editor_namespaceObject.useEntitiesSavedStatesIsDirty)();
       
 23768   const {
       
 23769     isSaving,
       
 23770     isSaveViewOpen,
       
 23771     previewingThemeName
       
 23772   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 23773     const {
       
 23774       isSavingEntityRecord,
       
 23775       isResolving
       
 23776     } = select(external_wp_coreData_namespaceObject.store);
       
 23777     const {
       
 23778       isSaveViewOpened
       
 23779     } = select(store);
       
 23780     const isActivatingTheme = isResolving('activateTheme');
       
 23781     const currentlyPreviewingThemeId = currentlyPreviewingTheme();
       
 23782     return {
       
 23783       isSaving: dirtyEntityRecords.some(record => isSavingEntityRecord(record.kind, record.name, record.key)) || isActivatingTheme,
       
 23784       isSaveViewOpen: isSaveViewOpened(),
       
 23785       // Do not call `getTheme` with null, it will cause a request to
       
 23786       // the server.
       
 23787       previewingThemeName: currentlyPreviewingThemeId ? select(external_wp_coreData_namespaceObject.store).getTheme(currentlyPreviewingThemeId)?.name?.rendered : undefined
       
 23788     };
       
 23789   }, [dirtyEntityRecords]);
       
 23790   const hasDirtyEntities = !!dirtyEntityRecords.length;
       
 23791   let isOnlyCurrentEntityDirty;
       
 23792   // Check if the current entity is the only entity with changes.
       
 23793   // We have some extra logic for `wp_global_styles` for now, that
       
 23794   // is used in navigation sidebar.
       
 23795   if (dirtyEntityRecords.length === 1) {
       
 23796     if (params.postId) {
       
 23797       isOnlyCurrentEntityDirty = `${dirtyEntityRecords[0].key}` === params.postId && dirtyEntityRecords[0].name === params.postType;
       
 23798     } else if (params.path?.includes('wp_global_styles')) {
       
 23799       isOnlyCurrentEntityDirty = dirtyEntityRecords[0].name === 'globalStyles';
       
 23800     }
       
 23801   }
       
 23802   const disabled = isSaving || !hasDirtyEntities && !isPreviewingTheme();
       
 23803   const getLabel = () => {
       
 23804     if (isPreviewingTheme()) {
       
 23805       if (isSaving) {
       
 23806         return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: The name of theme to be activated. */
       
 23807         (0,external_wp_i18n_namespaceObject.__)('Activating %s'), previewingThemeName);
       
 23808       } else if (disabled) {
       
 23809         return (0,external_wp_i18n_namespaceObject.__)('Saved');
       
 23810       } else if (hasDirtyEntities) {
       
 23811         return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: The name of theme to be activated. */
       
 23812         (0,external_wp_i18n_namespaceObject.__)('Activate %s & Save'), previewingThemeName);
       
 23813       }
       
 23814       return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: The name of theme to be activated. */
       
 23815       (0,external_wp_i18n_namespaceObject.__)('Activate %s'), previewingThemeName);
       
 23816     }
       
 23817     if (isSaving) {
       
 23818       return (0,external_wp_i18n_namespaceObject.__)('Saving');
       
 23819     }
       
 23820     if (disabled) {
       
 23821       return (0,external_wp_i18n_namespaceObject.__)('Saved');
       
 23822     }
       
 23823     if (!isOnlyCurrentEntityDirty && showReviewMessage) {
       
 23824       return (0,external_wp_i18n_namespaceObject.sprintf)(
       
 23825       // translators: %d: number of unsaved changes (number).
       
 23826       (0,external_wp_i18n_namespaceObject._n)('Review %d change…', 'Review %d changes…', dirtyEntityRecords.length), dirtyEntityRecords.length);
       
 23827     }
       
 23828     return (0,external_wp_i18n_namespaceObject.__)('Save');
       
 23829   };
       
 23830   const label = getLabel();
       
 23831   const onClick = isOnlyCurrentEntityDirty ? () => saveDirtyEntities({
       
 23832     dirtyEntityRecords
       
 23833   }) : () => setIsSaveViewOpened(true);
       
 23834   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 23835     variant: variant,
       
 23836     className: className,
       
 23837     "aria-disabled": disabled,
       
 23838     "aria-expanded": isSaveViewOpen,
       
 23839     isBusy: isSaving,
       
 23840     onClick: disabled ? undefined : onClick,
       
 23841     label: label
       
 23842     /*
       
 23843      * We want the tooltip to show the keyboard shortcut only when the
       
 23844      * button does something, i.e. when it's not disabled.
       
 23845      */,
       
 23846     shortcut: disabled ? undefined : external_wp_keycodes_namespaceObject.displayShortcut.primary('s')
       
 23847     /*
       
 23848      * Displaying the keyboard shortcut conditionally makes the tooltip
       
 23849      * itself show conditionally. This would trigger a full-rerendering
       
 23850      * of the button that we want to avoid. By setting `showTooltip`,
       
 23851      * the tooltip is always rendered even when there's no keyboard shortcut.
       
 23852      */,
       
 23853     showTooltip: showTooltip,
       
 23854     icon: icon,
       
 23855     __next40pxDefaultSize: __next40pxDefaultSize,
       
 23856     size: size,
       
 23857     children: label
       
 23858   });
       
 23859 }
       
 23860 
       
 23861 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/use-activate-theme.js
       
 23862 /**
       
 23863  * WordPress dependencies
       
 23864  */
       
 23865 
       
 23866 
       
 23867 
       
 23868 
       
 23869 /**
       
 23870  * Internal dependencies
       
 23871  */
       
 23872 
       
 23873 
       
 23874 const {
       
 23875   useHistory: use_activate_theme_useHistory
       
 23876 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 23877 
       
 23878 /**
       
 23879  * This should be refactored to use the REST API, once the REST API can activate themes.
       
 23880  *
       
 23881  * @return {Function} A function that activates the theme.
       
 23882  */
       
 23883 function useActivateTheme() {
       
 23884   const history = use_activate_theme_useHistory();
       
 23885   const {
       
 23886     startResolution,
       
 23887     finishResolution
       
 23888   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 23889   return async () => {
       
 23890     if (isPreviewingTheme()) {
       
 23891       const activationURL = 'themes.php?action=activate&stylesheet=' + currentlyPreviewingTheme() + '&_wpnonce=' + window.WP_BLOCK_THEME_ACTIVATE_NONCE;
       
 23892       startResolution('activateTheme');
       
 23893       await window.fetch(activationURL);
       
 23894       finishResolution('activateTheme');
       
 23895       // Remove the wp_theme_preview query param: we've finished activating
       
 23896       // the queue and are switching to normal Site Editor.
       
 23897       const {
       
 23898         params
       
 23899       } = history.getLocationWithParams();
       
 23900       history.replace({
       
 23901         ...params,
       
 23902         wp_theme_preview: undefined
       
 23903       });
       
 23904     }
       
 23905   };
       
 23906 }
       
 23907 
       
 23908 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/use-actual-current-theme.js
       
 23909 /**
       
 23910  * WordPress dependencies
       
 23911  */
       
 23912 
       
 23913 
       
 23914 
       
 23915 const ACTIVE_THEMES_URL = '/wp/v2/themes?status=active';
       
 23916 function useActualCurrentTheme() {
       
 23917   const [currentTheme, setCurrentTheme] = (0,external_wp_element_namespaceObject.useState)();
       
 23918   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 23919     // Set the `wp_theme_preview` to empty string to bypass the createThemePreviewMiddleware.
       
 23920     const path = (0,external_wp_url_namespaceObject.addQueryArgs)(ACTIVE_THEMES_URL, {
       
 23921       context: 'edit',
       
 23922       wp_theme_preview: ''
       
 23923     });
       
 23924     external_wp_apiFetch_default()({
       
 23925       path
       
 23926     }).then(activeThemes => setCurrentTheme(activeThemes[0]))
       
 23927     // Do nothing
       
 23928     .catch(() => {});
       
 23929   }, []);
       
 23930   return currentTheme;
       
 23931 }
       
 23932 
       
 23933 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/save-panel/index.js
       
 23934 /**
       
 23935  * External dependencies
       
 23936  */
       
 23937 
       
 23938 
       
 23939 /**
       
 23940  * WordPress dependencies
       
 23941  */
       
 23942 
       
 23943 
       
 23944 
       
 23945 
       
 23946 
       
 23947 
       
 23948 /**
       
 23949  * Internal dependencies
       
 23950  */
       
 23951 
       
 23952 
       
 23953 
       
 23954 
       
 23955 
       
 23956 
       
 23957 
       
 23958 const {
       
 23959   EntitiesSavedStatesExtensible,
       
 23960   NavigableRegion
       
 23961 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 23962 const EntitiesSavedStatesForPreview = ({
       
 23963   onClose
       
 23964 }) => {
       
 23965   var _currentTheme$name$re, _previewingTheme$name;
       
 23966   const isDirtyProps = (0,external_wp_editor_namespaceObject.useEntitiesSavedStatesIsDirty)();
       
 23967   let activateSaveLabel;
       
 23968   if (isDirtyProps.isDirty) {
       
 23969     activateSaveLabel = (0,external_wp_i18n_namespaceObject.__)('Activate & Save');
       
 23970   } else {
       
 23971     activateSaveLabel = (0,external_wp_i18n_namespaceObject.__)('Activate');
       
 23972   }
       
 23973   const currentTheme = useActualCurrentTheme();
       
 23974   const previewingTheme = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getCurrentTheme(), []);
       
 23975   const additionalPrompt = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 23976     children: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %1$s: The name of active theme, %2$s: The name of theme to be activated. */
       
 23977     (0,external_wp_i18n_namespaceObject.__)('Saving your changes will change your active theme from %1$s to %2$s.'), (_currentTheme$name$re = currentTheme?.name?.rendered) !== null && _currentTheme$name$re !== void 0 ? _currentTheme$name$re : '...', (_previewingTheme$name = previewingTheme?.name?.rendered) !== null && _previewingTheme$name !== void 0 ? _previewingTheme$name : '...')
       
 23978   });
       
 23979   const activateTheme = useActivateTheme();
       
 23980   const onSave = async values => {
       
 23981     await activateTheme();
       
 23982     return values;
       
 23983   };
       
 23984   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EntitiesSavedStatesExtensible, {
       
 23985     ...isDirtyProps,
       
 23986     additionalPrompt,
       
 23987     close: onClose,
       
 23988     onSave,
       
 23989     saveEnabled: true,
       
 23990     saveLabel: activateSaveLabel
       
 23991   });
       
 23992 };
       
 23993 const _EntitiesSavedStates = ({
       
 23994   onClose,
       
 23995   renderDialog = undefined
       
 23996 }) => {
       
 23997   if (isPreviewingTheme()) {
       
 23998     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EntitiesSavedStatesForPreview, {
       
 23999       onClose: onClose
       
 24000     });
       
 24001   }
       
 24002   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EntitiesSavedStates, {
       
 24003     close: onClose,
       
 24004     renderDialog: renderDialog
       
 24005   });
       
 24006 };
       
 24007 function SavePanel() {
       
 24008   const {
       
 24009     isSaveViewOpen,
       
 24010     canvasMode,
       
 24011     isDirty,
       
 24012     isSaving
       
 24013   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 24014     const {
       
 24015       __experimentalGetDirtyEntityRecords,
       
 24016       isSavingEntityRecord,
       
 24017       isResolving
       
 24018     } = select(external_wp_coreData_namespaceObject.store);
       
 24019     const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
       
 24020     const isActivatingTheme = isResolving('activateTheme');
       
 24021     const {
       
 24022       isSaveViewOpened,
       
 24023       getCanvasMode
       
 24024     } = lock_unlock_unlock(select(store));
       
 24025 
       
 24026     // The currently selected entity to display.
       
 24027     // Typically template or template part in the site editor.
       
 24028     return {
       
 24029       isSaveViewOpen: isSaveViewOpened(),
       
 24030       canvasMode: getCanvasMode(),
       
 24031       isDirty: dirtyEntityRecords.length > 0,
       
 24032       isSaving: dirtyEntityRecords.some(record => isSavingEntityRecord(record.kind, record.name, record.key)) || isActivatingTheme
       
 24033     };
       
 24034   }, []);
       
 24035   const {
       
 24036     setIsSaveViewOpened
       
 24037   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 24038   const onClose = () => setIsSaveViewOpened(false);
       
 24039   if (canvasMode === 'view') {
       
 24040     return isSaveViewOpen ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 24041       className: "edit-site-save-panel__modal",
       
 24042       onRequestClose: onClose,
       
 24043       __experimentalHideHeader: true,
       
 24044       contentLabel: (0,external_wp_i18n_namespaceObject.__)('Save site, content, and template changes'),
       
 24045       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(_EntitiesSavedStates, {
       
 24046         onClose: onClose
       
 24047       })
       
 24048     }) : null;
       
 24049   }
       
 24050   const activateSaveEnabled = isPreviewingTheme() || isDirty;
       
 24051   const disabled = isSaving || !activateSaveEnabled;
       
 24052   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(NavigableRegion, {
       
 24053     className: dist_clsx('edit-site-layout__actions', {
       
 24054       'is-entity-save-view-open': isSaveViewOpen
       
 24055     }),
       
 24056     ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Save panel'),
       
 24057     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 24058       className: dist_clsx('edit-site-editor__toggle-save-panel', {
       
 24059         'screen-reader-text': isSaveViewOpen
       
 24060       }),
       
 24061       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 24062         variant: "secondary",
       
 24063         className: "edit-site-editor__toggle-save-panel-button",
       
 24064         onClick: () => setIsSaveViewOpened(true),
       
 24065         "aria-haspopup": "dialog",
       
 24066         disabled: disabled,
       
 24067         __experimentalIsFocusable: true,
       
 24068         children: (0,external_wp_i18n_namespaceObject.__)('Open save panel')
       
 24069       })
       
 24070     }), isSaveViewOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(_EntitiesSavedStates, {
       
 24071       onClose: onClose,
       
 24072       renderDialog: true
       
 24073     })]
       
 24074   });
       
 24075 }
       
 24076 
       
 24077 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/download.js
       
 24078 /**
       
 24079  * WordPress dependencies
       
 24080  */
       
 24081 
       
 24082 
       
 24083 const download = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 24084   xmlns: "http://www.w3.org/2000/svg",
       
 24085   viewBox: "0 0 24 24",
       
 24086   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 24087     d: "M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"
       
 24088   })
       
 24089 });
       
 24090 /* harmony default export */ const library_download = (download);
       
 24091 
       
 24092 ;// CONCATENATED MODULE: external ["wp","blob"]
       
 24093 const external_wp_blob_namespaceObject = window["wp"]["blob"];
       
 24094 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/more-menu/site-export.js
       
 24095 /**
       
 24096  * WordPress dependencies
       
 24097  */
       
 24098 
       
 24099 
       
 24100 
       
 24101 
       
 24102 
       
 24103 
       
 24104 
       
 24105 
       
 24106 function SiteExport() {
       
 24107   const {
       
 24108     createErrorNotice
       
 24109   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
 24110   async function handleExport() {
       
 24111     try {
       
 24112       const response = await external_wp_apiFetch_default()({
       
 24113         path: '/wp-block-editor/v1/export',
       
 24114         parse: false,
       
 24115         headers: {
       
 24116           Accept: 'application/zip'
       
 24117         }
       
 24118       });
       
 24119       const blob = await response.blob();
       
 24120       const contentDisposition = response.headers.get('content-disposition');
       
 24121       const contentDispositionMatches = contentDisposition.match(/=(.+)\.zip/);
       
 24122       const fileName = contentDispositionMatches[1] ? contentDispositionMatches[1] : 'edit-site-export';
       
 24123       (0,external_wp_blob_namespaceObject.downloadBlob)(fileName + '.zip', blob, 'application/zip');
       
 24124     } catch (errorResponse) {
       
 24125       let error = {};
       
 24126       try {
       
 24127         error = await errorResponse.json();
       
 24128       } catch (e) {}
       
 24129       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while creating the site export.');
       
 24130       createErrorNotice(errorMessage, {
       
 24131         type: 'snackbar'
       
 24132       });
       
 24133     }
       
 24134   }
       
 24135   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 24136     role: "menuitem",
       
 24137     icon: library_download,
       
 24138     onClick: handleExport,
       
 24139     info: (0,external_wp_i18n_namespaceObject.__)('Download your theme with updated templates and styles.'),
       
 24140     children: (0,external_wp_i18n_namespaceObject._x)('Export', 'site exporter menu item')
       
 24141   });
       
 24142 }
       
 24143 
       
 24144 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/more-menu/welcome-guide-menu-item.js
       
 24145 /**
       
 24146  * WordPress dependencies
       
 24147  */
       
 24148 
       
 24149 
       
 24150 
       
 24151 
       
 24152 
       
 24153 function WelcomeGuideMenuItem() {
       
 24154   const {
       
 24155     toggle
       
 24156   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
 24157   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 24158     onClick: () => toggle('core/edit-site', 'welcomeGuide'),
       
 24159     children: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
       
 24160   });
       
 24161 }
       
 24162 
       
 24163 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/more-menu/index.js
       
 24164 /**
       
 24165  * WordPress dependencies
       
 24166  */
       
 24167 
       
 24168 
       
 24169 
       
 24170 
       
 24171 /**
       
 24172  * Internal dependencies
       
 24173  */
       
 24174 
       
 24175 
       
 24176 
       
 24177 
       
 24178 
       
 24179 
       
 24180 const {
       
 24181   ToolsMoreMenuGroup,
       
 24182   PreferencesModal
       
 24183 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 24184 function MoreMenu() {
       
 24185   const isBlockBasedTheme = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 24186     return select(external_wp_coreData_namespaceObject.store).getCurrentTheme().is_block_theme;
       
 24187   }, []);
       
 24188   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 24189     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ToolsMoreMenuGroup, {
       
 24190       children: [isBlockBasedTheme && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteExport, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideMenuItem, {})]
       
 24191     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferencesModal, {})]
       
 24192   });
       
 24193 }
       
 24194 
       
 24195 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/use-editor-iframe-props.js
       
 24196 /**
       
 24197  * External dependencies
       
 24198  */
       
 24199 
       
 24200 
       
 24201 /**
       
 24202  * WordPress dependencies
       
 24203  */
       
 24204 
       
 24205 
       
 24206 
       
 24207 
       
 24208 
       
 24209 
       
 24210 /**
       
 24211  * Internal dependencies
       
 24212  */
       
 24213 
       
 24214 
       
 24215 function useEditorIframeProps() {
       
 24216   const {
       
 24217     canvasMode,
       
 24218     currentPostIsTrashed
       
 24219   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 24220     const {
       
 24221       getCanvasMode
       
 24222     } = lock_unlock_unlock(select(store));
       
 24223     return {
       
 24224       canvasMode: getCanvasMode(),
       
 24225       currentPostIsTrashed: select(external_wp_editor_namespaceObject.store).getCurrentPostAttribute('status') === 'trash'
       
 24226     };
       
 24227   }, []);
       
 24228   const {
       
 24229     setCanvasMode
       
 24230   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 24231   const [isFocused, setIsFocused] = (0,external_wp_element_namespaceObject.useState)(false);
       
 24232   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 24233     if (canvasMode === 'edit') {
       
 24234       setIsFocused(false);
       
 24235     }
       
 24236   }, [canvasMode]);
       
 24237 
       
 24238   // In view mode, make the canvas iframe be perceived and behave as a button
       
 24239   // to switch to edit mode, with a meaningful label and no title attribute.
       
 24240   const viewModeIframeProps = {
       
 24241     'aria-label': (0,external_wp_i18n_namespaceObject.__)('Edit'),
       
 24242     'aria-disabled': currentPostIsTrashed,
       
 24243     title: null,
       
 24244     role: 'button',
       
 24245     tabIndex: 0,
       
 24246     onFocus: () => setIsFocused(true),
       
 24247     onBlur: () => setIsFocused(false),
       
 24248     onKeyDown: event => {
       
 24249       const {
       
 24250         keyCode
       
 24251       } = event;
       
 24252       if ((keyCode === external_wp_keycodes_namespaceObject.ENTER || keyCode === external_wp_keycodes_namespaceObject.SPACE) && !currentPostIsTrashed) {
       
 24253         event.preventDefault();
       
 24254         setCanvasMode('edit');
       
 24255       }
       
 24256     },
       
 24257     onClick: () => {
       
 24258       setCanvasMode('edit');
       
 24259     },
       
 24260     onClickCapture: event => {
       
 24261       if (currentPostIsTrashed) {
       
 24262         event.preventDefault();
       
 24263         event.stopPropagation();
       
 24264       }
       
 24265     },
       
 24266     readonly: true
       
 24267   };
       
 24268   return {
       
 24269     className: dist_clsx('edit-site-visual-editor__editor-canvas', {
       
 24270       'is-focused': isFocused && canvasMode === 'view'
       
 24271     }),
       
 24272     ...(canvasMode === 'view' ? viewModeIframeProps : {})
       
 24273   };
       
 24274 }
       
 24275 
 12034 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/use-title.js
 24276 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/use-title.js
 12035 /**
 24277 /**
 12036  * WordPress dependencies
 24278  * WordPress dependencies
 12037  */
 24279  */
 12038 
 24280 
 12039 
 24281 
 12040 
 24282 
 12041 
 24283 
 12042 
 24284 
       
 24285 
       
 24286 
       
 24287 
 12043 /**
 24288 /**
 12044  * Internal dependencies
 24289  * Internal dependencies
 12045  */
 24290  */
 12046 
 24291 
 12047 
 24292 const {
       
 24293   useLocation: use_title_useLocation
       
 24294 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
 12048 function useTitle(title) {
 24295 function useTitle(title) {
 12049   const location = useLocation();
 24296   const location = use_title_useLocation();
 12050   const siteTitle = (0,external_wp_data_namespaceObject.useSelect)(select => {
 24297   const siteTitle = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getEntityRecord('root', 'site')?.title, []);
 12051     var _select$getEntityReco;
       
 12052 
       
 12053     return (_select$getEntityReco = select(external_wp_coreData_namespaceObject.store).getEntityRecord('root', 'site')) === null || _select$getEntityReco === void 0 ? void 0 : _select$getEntityReco.title;
       
 12054   }, []);
       
 12055   const isInitialLocationRef = (0,external_wp_element_namespaceObject.useRef)(true);
 24298   const isInitialLocationRef = (0,external_wp_element_namespaceObject.useRef)(true);
 12056   (0,external_wp_element_namespaceObject.useEffect)(() => {
 24299   (0,external_wp_element_namespaceObject.useEffect)(() => {
 12057     isInitialLocationRef.current = false;
 24300     isInitialLocationRef.current = false;
 12058   }, [location]);
 24301   }, [location]);
 12059   (0,external_wp_element_namespaceObject.useEffect)(() => {
 24302   (0,external_wp_element_namespaceObject.useEffect)(() => {
 12060     // Don't update or announce the title for initial page load.
 24303     // Don't update or announce the title for initial page load.
 12061     if (isInitialLocationRef.current) {
 24304     if (isInitialLocationRef.current) {
 12062       return;
 24305       return;
 12063     }
 24306     }
 12064 
       
 12065     if (title && siteTitle) {
 24307     if (title && siteTitle) {
 12066       // @see https://github.com/WordPress/wordpress-develop/blob/94849898192d271d533e09756007e176feb80697/src/wp-admin/admin-header.php#L67-L68
 24308       // @see https://github.com/WordPress/wordpress-develop/blob/94849898192d271d533e09756007e176feb80697/src/wp-admin/admin-header.php#L67-L68
 12067       const formattedTitle = (0,external_wp_i18n_namespaceObject.sprintf)(
 24309       const formattedTitle = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: Admin document title. 1: Admin screen name, 2: Network or site name. */
 12068       /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
 24310       (0,external_wp_i18n_namespaceObject.__)('%1$s ‹ %2$s ‹ Editor — WordPress'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(siteTitle));
 12069       (0,external_wp_i18n_namespaceObject.__)('%1$s ‹ %2$s — WordPress'), title, siteTitle);
 24311       document.title = formattedTitle;
 12070       document.title = formattedTitle; // Announce title on route change for screen readers.
 24312 
 12071 
 24313       // Announce title on route change for screen readers.
 12072       (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.sprintf)(
 24314       (0,external_wp_a11y_namespaceObject.speak)(title, 'assertive');
 12073       /* translators: The page title that is currently displaying. */
       
 12074       (0,external_wp_i18n_namespaceObject.__)('Now displaying: %s'), document.title), 'assertive');
       
 12075     }
 24315     }
 12076   }, [title, siteTitle, location]);
 24316   }, [title, siteTitle, location]);
 12077 }
 24317 }
 12078 
 24318 
       
 24319 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/editor/use-editor-title.js
       
 24320 /**
       
 24321  * WordPress dependencies
       
 24322  */
       
 24323 
       
 24324 
       
 24325 /**
       
 24326  * Internal dependencies
       
 24327  */
       
 24328 
       
 24329 
       
 24330 
       
 24331 function useEditorTitle() {
       
 24332   const {
       
 24333     record: editedPost,
       
 24334     getTitle,
       
 24335     isLoaded: hasLoadedPost
       
 24336   } = useEditedEntityRecord();
       
 24337   let title;
       
 24338   if (hasLoadedPost) {
       
 24339     var _POST_TYPE_LABELS$edi;
       
 24340     title = (0,external_wp_i18n_namespaceObject.sprintf)(
       
 24341     // translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
       
 24342     (0,external_wp_i18n_namespaceObject.__)('%1$s ‹ %2$s'), getTitle(), (_POST_TYPE_LABELS$edi = POST_TYPE_LABELS[editedPost.type]) !== null && _POST_TYPE_LABELS$edi !== void 0 ? _POST_TYPE_LABELS$edi : POST_TYPE_LABELS[TEMPLATE_POST_TYPE]);
       
 24343   }
       
 24344 
       
 24345   // Only announce the title once the editor is ready to prevent "Replace"
       
 24346   // action in <URLQueryController> from double-announcing.
       
 24347   useTitle(hasLoadedPost && title);
       
 24348 }
       
 24349 /* harmony default export */ const use_editor_title = (useEditorTitle);
       
 24350 
 12079 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/editor/index.js
 24351 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/editor/index.js
       
 24352 /**
       
 24353  * External dependencies
       
 24354  */
 12080 
 24355 
 12081 
 24356 
 12082 /**
 24357 /**
 12083  * WordPress dependencies
 24358  * WordPress dependencies
 12084  */
 24359  */
 12090 
 24365 
 12091 
 24366 
 12092 
 24367 
 12093 
 24368 
 12094 
 24369 
       
 24370 
       
 24371 
       
 24372 
 12095 /**
 24373 /**
 12096  * Internal dependencies
 24374  * Internal dependencies
 12097  */
 24375  */
 12098 
 24376 
 12099 
 24377 
 12109 
 24387 
 12110 
 24388 
 12111 
 24389 
 12112 
 24390 
 12113 
 24391 
 12114 const interfaceLabels = {
 24392 
 12115   drawer: (0,external_wp_i18n_namespaceObject.__)('Navigation Sidebar')
 24393 
 12116 };
 24394 
 12117 
 24395 
 12118 function Editor(_ref) {
 24396 const {
 12119   let {
 24397   Editor,
 12120     onError
 24398   BackButton
 12121   } = _ref;
 24399 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 24400 const {
       
 24401   useHistory: editor_useHistory
       
 24402 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 24403 const {
       
 24404   BlockKeyboardShortcuts
       
 24405 } = lock_unlock_unlock(external_wp_blockLibrary_namespaceObject.privateApis);
       
 24406 function EditSiteEditor({
       
 24407   isLoading
       
 24408 }) {
 12122   const {
 24409   const {
 12123     isInserterOpen,
 24410     editedPostType,
 12124     isListViewOpen,
 24411     editedPostId,
 12125     sidebarIsOpened,
 24412     contextPostType,
 12126     settings,
 24413     contextPostId,
 12127     entityId,
       
 12128     templateType,
       
 12129     page,
       
 12130     template,
       
 12131     templateResolved,
       
 12132     isNavigationOpen,
       
 12133     previousShortcut,
       
 12134     nextShortcut,
       
 12135     editorMode,
 24414     editorMode,
 12136     showIconLabels
 24415     canvasMode,
       
 24416     isEditingPage,
       
 24417     supportsGlobalStyles,
       
 24418     showIconLabels,
       
 24419     editorCanvasView,
       
 24420     currentPostIsTrashed
 12137   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 24421   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 12138     const {
 24422     const {
 12139       isInserterOpened,
 24423       getEditedPostContext,
 12140       isListViewOpened,
 24424       getCanvasMode,
 12141       getSettings,
 24425       isPage,
 12142       getEditedPostType,
 24426       getEditedPostType,
 12143       getEditedPostId,
 24427       getEditedPostId
 12144       getPage,
 24428     } = lock_unlock_unlock(select(store));
 12145       isNavigationOpened,
 24429     const {
       
 24430       get
       
 24431     } = select(external_wp_preferences_namespaceObject.store);
       
 24432     const {
       
 24433       getCurrentTheme
       
 24434     } = select(external_wp_coreData_namespaceObject.store);
       
 24435     const {
 12146       getEditorMode
 24436       getEditorMode
 12147     } = select(store_store);
 24437     } = select(external_wp_editor_namespaceObject.store);
 12148     const {
 24438     const _context = getEditedPostContext();
 12149       hasFinishedResolution,
 24439 
 12150       getEntityRecord
 24440     // The currently selected entity to display.
 12151     } = select(external_wp_coreData_namespaceObject.store);
 24441     // Typically template or template part in the site editor.
 12152     const postType = getEditedPostType();
       
 12153     const postId = getEditedPostId(); // The currently selected entity to display. Typically template or template part.
       
 12154 
       
 12155     return {
 24442     return {
 12156       isInserterOpen: isInserterOpened(),
 24443       editedPostType: getEditedPostType(),
 12157       isListViewOpen: isListViewOpened(),
 24444       editedPostId: getEditedPostId(),
 12158       sidebarIsOpened: !!select(store).getActiveComplementaryArea(store_store.name),
 24445       contextPostType: _context?.postId ? _context.postType : undefined,
 12159       settings: getSettings(),
 24446       contextPostId: _context?.postId ? _context.postId : undefined,
 12160       templateType: postType,
       
 12161       page: getPage(),
       
 12162       template: postId ? getEntityRecord('postType', postType, postId) : null,
       
 12163       templateResolved: postId ? hasFinishedResolution('getEntityRecord', ['postType', postType, postId]) : false,
       
 12164       entityId: postId,
       
 12165       isNavigationOpen: isNavigationOpened(),
       
 12166       previousShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-site/previous-region'),
       
 12167       nextShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-site/next-region'),
       
 12168       editorMode: getEditorMode(),
 24447       editorMode: getEditorMode(),
 12169       showIconLabels: select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'showIconLabels')
 24448       canvasMode: getCanvasMode(),
       
 24449       isEditingPage: isPage(),
       
 24450       supportsGlobalStyles: getCurrentTheme()?.is_block_theme,
       
 24451       showIconLabels: get('core', 'showIconLabels'),
       
 24452       editorCanvasView: lock_unlock_unlock(select(store)).getEditorCanvasContainerView(),
       
 24453       currentPostIsTrashed: select(external_wp_editor_namespaceObject.store).getCurrentPostAttribute('status') === 'trash'
 12170     };
 24454     };
 12171   }, []);
 24455   }, []);
       
 24456   use_editor_title();
       
 24457   const _isPreviewingTheme = isPreviewingTheme();
       
 24458   const hasDefaultEditorCanvasView = !useHasEditorCanvasContainer();
       
 24459   const iframeProps = useEditorIframeProps();
       
 24460   const isViewMode = canvasMode === 'view';
       
 24461   const isEditMode = canvasMode === 'edit';
       
 24462   const showVisualEditor = isViewMode || editorMode === 'visual';
       
 24463   const postWithTemplate = !!contextPostId;
       
 24464   const loadingProgressId = (0,external_wp_compose_namespaceObject.useInstanceId)(CanvasLoader, 'edit-site-editor__loading-progress');
       
 24465   const settings = useSpecificEditorSettings();
       
 24466   const styles = (0,external_wp_element_namespaceObject.useMemo)(() => [...settings.styles, {
       
 24467     // Forming a "block formatting context" to prevent margin collapsing.
       
 24468     // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
       
 24469 
       
 24470     css: `body{${canvasMode === 'view' ? `min-height: 100vh; ${currentPostIsTrashed ? '' : 'cursor: pointer;'}` : ''}}}`
       
 24471   }], [settings.styles, canvasMode, currentPostIsTrashed]);
 12172   const {
 24472   const {
 12173     setPage,
 24473     setCanvasMode
 12174     setIsInserterOpened
 24474   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
 12175   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
 12176   const {
 24475   const {
 12177     enableComplementaryArea
 24476     createSuccessNotice
 12178   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
 24477   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 12179   const [isEntitiesSavedStatesOpen, setIsEntitiesSavedStatesOpen] = (0,external_wp_element_namespaceObject.useState)(false);
 24478   const history = editor_useHistory();
 12180   const openEntitiesSavedStates = (0,external_wp_element_namespaceObject.useCallback)(() => setIsEntitiesSavedStatesOpen(true), []);
 24479   const onActionPerformed = (0,external_wp_element_namespaceObject.useCallback)((actionId, items) => {
 12181   const closeEntitiesSavedStates = (0,external_wp_element_namespaceObject.useCallback)(() => {
 24480     switch (actionId) {
 12182     setIsEntitiesSavedStatesOpen(false);
 24481       case 'move-to-trash':
       
 24482       case 'delete-post':
       
 24483         {
       
 24484           history.push({
       
 24485             postType: items[0].type
       
 24486           });
       
 24487         }
       
 24488         break;
       
 24489       case 'duplicate-post':
       
 24490         {
       
 24491           const newItem = items[0];
       
 24492           const _title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
       
 24493           createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
       
 24494           // translators: %s: Title of the created post e.g: "Post 1".
       
 24495           (0,external_wp_i18n_namespaceObject.__)('"%s" successfully created.'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(_title)), {
       
 24496             type: 'snackbar',
       
 24497             id: 'duplicate-post-action',
       
 24498             actions: [{
       
 24499               label: (0,external_wp_i18n_namespaceObject.__)('Edit'),
       
 24500               onClick: () => {
       
 24501                 history.push({
       
 24502                   postId: newItem.id,
       
 24503                   postType: newItem.type,
       
 24504                   canvas: 'edit'
       
 24505                 });
       
 24506               }
       
 24507             }]
       
 24508           });
       
 24509         }
       
 24510         break;
       
 24511     }
       
 24512   }, [history, createSuccessNotice]);
       
 24513   const isReady = !isLoading;
       
 24514   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 24515     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesRenderer, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorKeyboardShortcutsRegister, {}), isEditMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}), showVisualEditor && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartConverter, {}), !isReady ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CanvasLoader, {
       
 24516       id: loadingProgressId
       
 24517     }) : null, isEditMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {}), isReady && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Editor, {
       
 24518       postType: postWithTemplate ? contextPostType : editedPostType,
       
 24519       postId: postWithTemplate ? contextPostId : editedPostId,
       
 24520       templateId: postWithTemplate ? editedPostId : undefined,
       
 24521       settings: settings,
       
 24522       className: dist_clsx('edit-site-editor__editor-interface', {
       
 24523         'show-icon-labels': showIconLabels
       
 24524       }),
       
 24525       styles: styles,
       
 24526       enableRegionNavigation: false,
       
 24527       customSaveButton: _isPreviewingTheme && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SaveButton, {
       
 24528         size: "compact"
       
 24529       }),
       
 24530       customSavePanel: _isPreviewingTheme && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SavePanel, {}),
       
 24531       forceDisableBlockTools: !hasDefaultEditorCanvasView,
       
 24532       title: !hasDefaultEditorCanvasView ? getEditorCanvasContainerTitle(editorCanvasView) : undefined,
       
 24533       iframeProps: iframeProps,
       
 24534       onActionPerformed: onActionPerformed,
       
 24535       extraSidebarPanels: !isEditingPage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(plugin_template_setting_panel.Slot, {}),
       
 24536       children: [isEditMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BackButton, {
       
 24537         children: ({
       
 24538           length
       
 24539         }) => length <= 1 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 24540           label: (0,external_wp_i18n_namespaceObject.__)('Open Navigation'),
       
 24541           className: "edit-site-layout__view-mode-toggle",
       
 24542           onClick: () => setCanvasMode('view'),
       
 24543           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(site_icon, {
       
 24544             className: "edit-site-layout__view-mode-toggle-icon"
       
 24545           })
       
 24546         })
       
 24547       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MoreMenu, {}), supportsGlobalStyles && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesSidebar, {})]
       
 24548     })]
       
 24549   });
       
 24550 }
       
 24551 
       
 24552 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/pagination.js
       
 24553 /**
       
 24554  * WordPress dependencies
       
 24555  */
       
 24556 
       
 24557 
       
 24558 
       
 24559 
       
 24560 
       
 24561 /**
       
 24562  * Internal dependencies
       
 24563  */
       
 24564 
       
 24565 
       
 24566 const pagination_Pagination = (0,external_wp_element_namespaceObject.memo)(function Pagination({
       
 24567   view,
       
 24568   onChangeView,
       
 24569   paginationInfo: {
       
 24570     totalItems = 0,
       
 24571     totalPages
       
 24572   }
       
 24573 }) {
       
 24574   var _view$page;
       
 24575   if (!totalItems || !totalPages) {
       
 24576     return null;
       
 24577   }
       
 24578   const currentPage = (_view$page = view.page) !== null && _view$page !== void 0 ? _view$page : 1;
       
 24579   return !!totalItems && totalPages !== 1 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 24580     expanded: false,
       
 24581     spacing: 6,
       
 24582     justify: "end",
       
 24583     className: "dataviews-pagination",
       
 24584     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 24585       justify: "flex-start",
       
 24586       expanded: false,
       
 24587       spacing: 2,
       
 24588       className: "dataviews-pagination__page-selection",
       
 24589       children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)(
       
 24590       // translators: %s: Total number of pages.
       
 24591       (0,external_wp_i18n_namespaceObject._x)('Page <CurrentPageControl /> of %s', 'paging'), totalPages), {
       
 24592         CurrentPageControl: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
       
 24593           "aria-label": (0,external_wp_i18n_namespaceObject.__)('Current page'),
       
 24594           value: view.page?.toString(),
       
 24595           options: Array.from(Array(totalPages)).map((_, i) => {
       
 24596             const page = i + 1;
       
 24597             return {
       
 24598               value: page.toString(),
       
 24599               label: page.toString()
       
 24600             };
       
 24601           }),
       
 24602           onChange: newValue => {
       
 24603             onChangeView({
       
 24604               ...view,
       
 24605               page: +newValue
       
 24606             });
       
 24607           },
       
 24608           size: "compact",
       
 24609           __nextHasNoMarginBottom: true
       
 24610         })
       
 24611       })
       
 24612     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 24613       expanded: false,
       
 24614       spacing: 1,
       
 24615       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 24616         onClick: () => onChangeView({
       
 24617           ...view,
       
 24618           page: currentPage - 1
       
 24619         }),
       
 24620         disabled: currentPage === 1,
       
 24621         __experimentalIsFocusable: true,
       
 24622         label: (0,external_wp_i18n_namespaceObject.__)('Previous page'),
       
 24623         icon: chevron_left,
       
 24624         showTooltip: true,
       
 24625         size: "compact",
       
 24626         tooltipPosition: "top"
       
 24627       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 24628         onClick: () => onChangeView({
       
 24629           ...view,
       
 24630           page: currentPage + 1
       
 24631         }),
       
 24632         disabled: currentPage >= totalPages,
       
 24633         __experimentalIsFocusable: true,
       
 24634         label: (0,external_wp_i18n_namespaceObject.__)('Next page'),
       
 24635         icon: chevron_right,
       
 24636         showTooltip: true,
       
 24637         size: "compact",
       
 24638         tooltipPosition: "top"
       
 24639       })]
       
 24640     })]
       
 24641   });
       
 24642 });
       
 24643 /* harmony default export */ const pagination = (pagination_Pagination);
       
 24644 
       
 24645 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/lock-unlock.js
       
 24646 /**
       
 24647  * WordPress dependencies
       
 24648  */
       
 24649 
       
 24650 const {
       
 24651   lock: lock_unlock_lock,
       
 24652   unlock: build_module_lock_unlock_unlock
       
 24653 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/dataviews');
       
 24654 
       
 24655 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/constants.js
       
 24656 /**
       
 24657  * WordPress dependencies
       
 24658  */
       
 24659 
       
 24660 
       
 24661 /**
       
 24662  * Internal dependencies
       
 24663  */
       
 24664 
       
 24665 // Filter operators.
       
 24666 const constants_OPERATOR_IS = 'is';
       
 24667 const constants_OPERATOR_IS_NOT = 'isNot';
       
 24668 const constants_OPERATOR_IS_ANY = 'isAny';
       
 24669 const constants_OPERATOR_IS_NONE = 'isNone';
       
 24670 const OPERATOR_IS_ALL = 'isAll';
       
 24671 const OPERATOR_IS_NOT_ALL = 'isNotAll';
       
 24672 const ALL_OPERATORS = [constants_OPERATOR_IS, constants_OPERATOR_IS_NOT, constants_OPERATOR_IS_ANY, constants_OPERATOR_IS_NONE, OPERATOR_IS_ALL, OPERATOR_IS_NOT_ALL];
       
 24673 const OPERATORS = {
       
 24674   [constants_OPERATOR_IS]: {
       
 24675     key: 'is-filter',
       
 24676     label: (0,external_wp_i18n_namespaceObject.__)('Is')
       
 24677   },
       
 24678   [constants_OPERATOR_IS_NOT]: {
       
 24679     key: 'is-not-filter',
       
 24680     label: (0,external_wp_i18n_namespaceObject.__)('Is not')
       
 24681   },
       
 24682   [constants_OPERATOR_IS_ANY]: {
       
 24683     key: 'is-any-filter',
       
 24684     label: (0,external_wp_i18n_namespaceObject.__)('Is any')
       
 24685   },
       
 24686   [constants_OPERATOR_IS_NONE]: {
       
 24687     key: 'is-none-filter',
       
 24688     label: (0,external_wp_i18n_namespaceObject.__)('Is none')
       
 24689   },
       
 24690   [OPERATOR_IS_ALL]: {
       
 24691     key: 'is-all-filter',
       
 24692     label: (0,external_wp_i18n_namespaceObject.__)('Is all')
       
 24693   },
       
 24694   [OPERATOR_IS_NOT_ALL]: {
       
 24695     key: 'is-not-all-filter',
       
 24696     label: (0,external_wp_i18n_namespaceObject.__)('Is not all')
       
 24697   }
       
 24698 };
       
 24699 const SORTING_DIRECTIONS = ['asc', 'desc'];
       
 24700 const sortArrows = {
       
 24701   asc: '↑',
       
 24702   desc: '↓'
       
 24703 };
       
 24704 const sortValues = {
       
 24705   asc: 'ascending',
       
 24706   desc: 'descending'
       
 24707 };
       
 24708 const sortLabels = {
       
 24709   asc: (0,external_wp_i18n_namespaceObject.__)('Sort ascending'),
       
 24710   desc: (0,external_wp_i18n_namespaceObject.__)('Sort descending')
       
 24711 };
       
 24712 
       
 24713 // View layouts.
       
 24714 const constants_LAYOUT_TABLE = 'table';
       
 24715 const constants_LAYOUT_GRID = 'grid';
       
 24716 const constants_LAYOUT_LIST = 'list';
       
 24717 
       
 24718 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-table.js
       
 24719 /**
       
 24720  * WordPress dependencies
       
 24721  */
       
 24722 
       
 24723 
       
 24724 const blockTable = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 24725   viewBox: "0 0 24 24",
       
 24726   xmlns: "http://www.w3.org/2000/svg",
       
 24727   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 24728     d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"
       
 24729   })
       
 24730 });
       
 24731 /* harmony default export */ const block_table = (blockTable);
       
 24732 
       
 24733 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/category.js
       
 24734 /**
       
 24735  * WordPress dependencies
       
 24736  */
       
 24737 
       
 24738 
       
 24739 const category = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 24740   viewBox: "0 0 24 24",
       
 24741   xmlns: "http://www.w3.org/2000/svg",
       
 24742   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 24743     d: "M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",
       
 24744     fillRule: "evenodd",
       
 24745     clipRule: "evenodd"
       
 24746   })
       
 24747 });
       
 24748 /* harmony default export */ const library_category = (category);
       
 24749 
       
 24750 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets-rtl.js
       
 24751 /**
       
 24752  * WordPress dependencies
       
 24753  */
       
 24754 
       
 24755 
       
 24756 const formatListBulletsRTL = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 24757   xmlns: "http://www.w3.org/2000/svg",
       
 24758   viewBox: "0 0 24 24",
       
 24759   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 24760     d: "M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"
       
 24761   })
       
 24762 });
       
 24763 /* harmony default export */ const format_list_bullets_rtl = (formatListBulletsRTL);
       
 24764 
       
 24765 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets.js
       
 24766 /**
       
 24767  * WordPress dependencies
       
 24768  */
       
 24769 
       
 24770 
       
 24771 const formatListBullets = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 24772   xmlns: "http://www.w3.org/2000/svg",
       
 24773   viewBox: "0 0 24 24",
       
 24774   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 24775     d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
       
 24776   })
       
 24777 });
       
 24778 /* harmony default export */ const format_list_bullets = (formatListBullets);
       
 24779 
       
 24780 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/funnel.js
       
 24781 /**
       
 24782  * WordPress dependencies
       
 24783  */
       
 24784 
       
 24785 
       
 24786 const funnel = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 24787   viewBox: "0 0 24 24",
       
 24788   xmlns: "http://www.w3.org/2000/svg",
       
 24789   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 24790     d: "M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"
       
 24791   })
       
 24792 });
       
 24793 /* harmony default export */ const library_funnel = (funnel);
       
 24794 
       
 24795 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/unseen.js
       
 24796 /**
       
 24797  * WordPress dependencies
       
 24798  */
       
 24799 
       
 24800 
       
 24801 const unseen = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 24802   viewBox: "0 0 24 24",
       
 24803   xmlns: "http://www.w3.org/2000/svg",
       
 24804   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 24805     d: "M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z"
       
 24806   })
       
 24807 });
       
 24808 /* harmony default export */ const library_unseen = (unseen);
       
 24809 
       
 24810 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/single-selection-checkbox.js
       
 24811 /**
       
 24812  * WordPress dependencies
       
 24813  */
       
 24814 
       
 24815 
       
 24816 
       
 24817 /**
       
 24818  * Internal dependencies
       
 24819  */
       
 24820 
       
 24821 function SingleSelectionCheckbox({
       
 24822   selection,
       
 24823   onSelectionChange,
       
 24824   item,
       
 24825   data,
       
 24826   getItemId,
       
 24827   primaryField,
       
 24828   disabled
       
 24829 }) {
       
 24830   const id = getItemId(item);
       
 24831   const isSelected = !disabled && selection.includes(id);
       
 24832   let selectionLabel;
       
 24833   if (primaryField?.getValue && item) {
       
 24834     // eslint-disable-next-line @wordpress/valid-sprintf
       
 24835     selectionLabel = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: item title. */
       
 24836     isSelected ? (0,external_wp_i18n_namespaceObject.__)('Deselect item: %s') : (0,external_wp_i18n_namespaceObject.__)('Select item: %s'), primaryField.getValue({
       
 24837       item
       
 24838     }));
       
 24839   } else {
       
 24840     selectionLabel = isSelected ? (0,external_wp_i18n_namespaceObject.__)('Select a new item') : (0,external_wp_i18n_namespaceObject.__)('Deselect item');
       
 24841   }
       
 24842   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
       
 24843     className: "dataviews-view-table-selection-checkbox",
       
 24844     __nextHasNoMarginBottom: true,
       
 24845     "aria-label": selectionLabel,
       
 24846     "aria-disabled": disabled,
       
 24847     checked: isSelected,
       
 24848     onChange: () => {
       
 24849       if (disabled) {
       
 24850         return;
       
 24851       }
       
 24852       if (!isSelected) {
       
 24853         onSelectionChange(data.filter(_item => {
       
 24854           const itemId = getItemId?.(_item);
       
 24855           return itemId === id || selection.includes(itemId);
       
 24856         }));
       
 24857       } else {
       
 24858         onSelectionChange(data.filter(_item => {
       
 24859           const itemId = getItemId?.(_item);
       
 24860           return itemId !== id && selection.includes(itemId);
       
 24861         }));
       
 24862       }
       
 24863     }
       
 24864   });
       
 24865 }
       
 24866 
       
 24867 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/item-actions.js
       
 24868 /**
       
 24869  * External dependencies
       
 24870  */
       
 24871 
       
 24872 /**
       
 24873  * WordPress dependencies
       
 24874  */
       
 24875 
       
 24876 
       
 24877 
       
 24878 
       
 24879 
       
 24880 /**
       
 24881  * Internal dependencies
       
 24882  */
       
 24883 
       
 24884 
       
 24885 
       
 24886 
       
 24887 const {
       
 24888   DropdownMenuV2: item_actions_DropdownMenu,
       
 24889   DropdownMenuGroupV2: DropdownMenuGroup,
       
 24890   DropdownMenuItemV2: item_actions_DropdownMenuItem,
       
 24891   DropdownMenuItemLabelV2: item_actions_DropdownMenuItemLabel,
       
 24892   kebabCase: item_actions_kebabCase
       
 24893 } = build_module_lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 24894 function ButtonTrigger({
       
 24895   action,
       
 24896   onClick,
       
 24897   items
       
 24898 }) {
       
 24899   const label = typeof action.label === 'string' ? action.label : action.label(items);
       
 24900   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 24901     label: label,
       
 24902     icon: action.icon,
       
 24903     isDestructive: action.isDestructive,
       
 24904     size: "compact",
       
 24905     onClick: onClick
       
 24906   });
       
 24907 }
       
 24908 function DropdownMenuItemTrigger({
       
 24909   action,
       
 24910   onClick,
       
 24911   items
       
 24912 }) {
       
 24913   const label = typeof action.label === 'string' ? action.label : action.label(items);
       
 24914   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(item_actions_DropdownMenuItem, {
       
 24915     onClick: onClick,
       
 24916     hideOnClick: !('RenderModal' in action),
       
 24917     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(item_actions_DropdownMenuItemLabel, {
       
 24918       children: label
       
 24919     })
       
 24920   });
       
 24921 }
       
 24922 function ActionModal({
       
 24923   action,
       
 24924   items,
       
 24925   closeModal
       
 24926 }) {
       
 24927   const label = typeof action.label === 'string' ? action.label : action.label(items);
       
 24928   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 24929     title: action.modalHeader || label,
       
 24930     __experimentalHideHeader: !!action.hideModalHeader,
       
 24931     onRequestClose: closeModal !== null && closeModal !== void 0 ? closeModal : () => {},
       
 24932     overlayClassName: `dataviews-action-modal dataviews-action-modal__${item_actions_kebabCase(action.id)}`,
       
 24933     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(action.RenderModal, {
       
 24934       items: items,
       
 24935       closeModal: closeModal,
       
 24936       onActionStart: action.onActionStart,
       
 24937       onActionPerformed: action.onActionPerformed
       
 24938     })
       
 24939   });
       
 24940 }
       
 24941 function ActionWithModal({
       
 24942   action,
       
 24943   items,
       
 24944   ActionTrigger,
       
 24945   isBusy
       
 24946 }) {
       
 24947   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 24948   const actionTriggerProps = {
       
 24949     action,
       
 24950     onClick: () => {
       
 24951       setIsModalOpen(true);
       
 24952     },
       
 24953     items,
       
 24954     isBusy
       
 24955   };
       
 24956   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 24957     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionTrigger, {
       
 24958       ...actionTriggerProps
       
 24959     }), isModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionModal, {
       
 24960       action: action,
       
 24961       items: items,
       
 24962       closeModal: () => setIsModalOpen(false)
       
 24963     })]
       
 24964   });
       
 24965 }
       
 24966 function ActionsDropdownMenuGroup({
       
 24967   actions,
       
 24968   item
       
 24969 }) {
       
 24970   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuGroup, {
       
 24971     children: actions.map(action => {
       
 24972       if ('RenderModal' in action) {
       
 24973         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionWithModal, {
       
 24974           action: action,
       
 24975           items: [item],
       
 24976           ActionTrigger: DropdownMenuItemTrigger
       
 24977         }, action.id);
       
 24978       }
       
 24979       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemTrigger, {
       
 24980         action: action,
       
 24981         onClick: () => action.callback([item]),
       
 24982         items: [item]
       
 24983       }, action.id);
       
 24984     })
       
 24985   });
       
 24986 }
       
 24987 function ItemActions({
       
 24988   item,
       
 24989   actions,
       
 24990   isCompact
       
 24991 }) {
       
 24992   const {
       
 24993     primaryActions,
       
 24994     eligibleActions
       
 24995   } = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 24996     // If an action is eligible for all items, doesn't need
       
 24997     // to provide the `isEligible` function.
       
 24998     const _eligibleActions = actions.filter(action => !action.isEligible || action.isEligible(item));
       
 24999     const _primaryActions = _eligibleActions.filter(action => action.isPrimary && !!action.icon);
       
 25000     return {
       
 25001       primaryActions: _primaryActions,
       
 25002       eligibleActions: _eligibleActions
       
 25003     };
       
 25004   }, [actions, item]);
       
 25005   if (isCompact) {
       
 25006     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CompactItemActions, {
       
 25007       item: item,
       
 25008       actions: eligibleActions
       
 25009     });
       
 25010   }
       
 25011   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 25012     spacing: 1,
       
 25013     justify: "flex-end",
       
 25014     className: "dataviews-item-actions",
       
 25015     style: {
       
 25016       flexShrink: '0',
       
 25017       width: 'auto'
       
 25018     },
       
 25019     children: [!!primaryActions.length && primaryActions.map(action => {
       
 25020       if ('RenderModal' in action) {
       
 25021         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionWithModal, {
       
 25022           action: action,
       
 25023           items: [item],
       
 25024           ActionTrigger: ButtonTrigger
       
 25025         }, action.id);
       
 25026       }
       
 25027       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ButtonTrigger, {
       
 25028         action: action,
       
 25029         onClick: () => action.callback([item]),
       
 25030         items: [item]
       
 25031       }, action.id);
       
 25032     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CompactItemActions, {
       
 25033       item: item,
       
 25034       actions: eligibleActions
       
 25035     })]
       
 25036   });
       
 25037 }
       
 25038 function CompactItemActions({
       
 25039   item,
       
 25040   actions
       
 25041 }) {
       
 25042   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(item_actions_DropdownMenu, {
       
 25043     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 25044       size: "compact",
       
 25045       icon: more_vertical,
       
 25046       label: (0,external_wp_i18n_namespaceObject.__)('Actions'),
       
 25047       __experimentalIsFocusable: true,
       
 25048       disabled: !actions.length,
       
 25049       className: "dataviews-all-actions-button"
       
 25050     }),
       
 25051     placement: "bottom-end",
       
 25052     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionsDropdownMenuGroup, {
       
 25053       actions: actions,
       
 25054       item: item
       
 25055     })
       
 25056   });
       
 25057 }
       
 25058 
       
 25059 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/utils.js
       
 25060 /**
       
 25061  * Internal dependencies
       
 25062  */
       
 25063 
       
 25064 function sanitizeOperators(field) {
       
 25065   let operators = field.filterBy?.operators;
       
 25066 
       
 25067   // Assign default values.
       
 25068   if (!operators || !Array.isArray(operators)) {
       
 25069     operators = [constants_OPERATOR_IS_ANY, constants_OPERATOR_IS_NONE];
       
 25070   }
       
 25071 
       
 25072   // Make sure only valid operators are used.
       
 25073   operators = operators.filter(operator => ALL_OPERATORS.includes(operator));
       
 25074 
       
 25075   // Do not allow mixing single & multiselection operators.
       
 25076   // Remove multiselection operators if any of the single selection ones is present.
       
 25077   if (operators.includes(constants_OPERATOR_IS) || operators.includes(constants_OPERATOR_IS_NOT)) {
       
 25078     operators = operators.filter(operator => [constants_OPERATOR_IS, constants_OPERATOR_IS_NOT].includes(operator));
       
 25079   }
       
 25080   return operators;
       
 25081 }
       
 25082 
       
 25083 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/bulk-actions.js
       
 25084 /**
       
 25085  * WordPress dependencies
       
 25086  */
       
 25087 
       
 25088 
       
 25089 
       
 25090 
       
 25091 /**
       
 25092  * Internal dependencies
       
 25093  */
       
 25094 
       
 25095 
       
 25096 
       
 25097 
       
 25098 const {
       
 25099   DropdownMenuV2: bulk_actions_DropdownMenu,
       
 25100   DropdownMenuGroupV2: bulk_actions_DropdownMenuGroup,
       
 25101   DropdownMenuItemV2: bulk_actions_DropdownMenuItem,
       
 25102   DropdownMenuSeparatorV2: DropdownMenuSeparator
       
 25103 } = build_module_lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 25104 function useHasAPossibleBulkAction(actions, item) {
       
 25105   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25106     return actions.some(action => {
       
 25107       return action.supportsBulk && (!action.isEligible || action.isEligible(item));
       
 25108     });
       
 25109   }, [actions, item]);
       
 25110 }
       
 25111 function useSomeItemHasAPossibleBulkAction(actions, data) {
       
 25112   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25113     return data.some(item => {
       
 25114       return actions.some(action => {
       
 25115         return action.supportsBulk && (!action.isEligible || action.isEligible(item));
       
 25116       });
       
 25117     });
       
 25118   }, [actions, data]);
       
 25119 }
       
 25120 function bulk_actions_ActionWithModal({
       
 25121   action,
       
 25122   selectedItems,
       
 25123   setActionWithModal,
       
 25124   onMenuOpenChange
       
 25125 }) {
       
 25126   const eligibleItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25127     return selectedItems.filter(item => !action.isEligible || action.isEligible(item));
       
 25128   }, [action, selectedItems]);
       
 25129   const {
       
 25130     RenderModal,
       
 25131     hideModalHeader
       
 25132   } = action;
       
 25133   const onCloseModal = (0,external_wp_element_namespaceObject.useCallback)(() => {
       
 25134     setActionWithModal(undefined);
       
 25135   }, [setActionWithModal]);
       
 25136   if (!eligibleItems.length) {
       
 25137     return null;
       
 25138   }
       
 25139   const label = typeof action.label === 'string' ? action.label : action.label(selectedItems);
       
 25140   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 25141     title: !hideModalHeader ? label : undefined,
       
 25142     __experimentalHideHeader: !!hideModalHeader,
       
 25143     onRequestClose: onCloseModal,
       
 25144     overlayClassName: "dataviews-action-modal",
       
 25145     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RenderModal, {
       
 25146       items: eligibleItems,
       
 25147       closeModal: onCloseModal,
       
 25148       onActionPerformed: () => onMenuOpenChange(false)
       
 25149     })
       
 25150   });
       
 25151 }
       
 25152 function BulkActionItem({
       
 25153   action,
       
 25154   selectedItems,
       
 25155   setActionWithModal
       
 25156 }) {
       
 25157   const eligibleItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25158     return selectedItems.filter(item => !action.isEligible || action.isEligible(item));
       
 25159   }, [action, selectedItems]);
       
 25160   const shouldShowModal = ('RenderModal' in action);
       
 25161   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(bulk_actions_DropdownMenuItem, {
       
 25162     disabled: eligibleItems.length === 0,
       
 25163     hideOnClick: !shouldShowModal,
       
 25164     onClick: async () => {
       
 25165       if (shouldShowModal) {
       
 25166         setActionWithModal(action);
       
 25167       } else {
       
 25168         await action.callback(eligibleItems);
       
 25169       }
       
 25170     },
       
 25171     suffix: eligibleItems.length > 0 ? eligibleItems.length : undefined,
       
 25172     children: action.label
       
 25173   }, action.id);
       
 25174 }
       
 25175 function ActionsMenuGroup({
       
 25176   actions,
       
 25177   selectedItems,
       
 25178   setActionWithModal
       
 25179 }) {
       
 25180   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 25181     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(bulk_actions_DropdownMenuGroup, {
       
 25182       children: actions.map(action => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BulkActionItem, {
       
 25183         action: action,
       
 25184         selectedItems: selectedItems,
       
 25185         setActionWithModal: setActionWithModal
       
 25186       }, action.id))
       
 25187     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuSeparator, {})]
       
 25188   });
       
 25189 }
       
 25190 function BulkActions({
       
 25191   data,
       
 25192   actions,
       
 25193   selection,
       
 25194   onSelectionChange,
       
 25195   getItemId
       
 25196 }) {
       
 25197   const bulkActions = (0,external_wp_element_namespaceObject.useMemo)(() => actions.filter(action => action.supportsBulk), [actions]);
       
 25198   const [isMenuOpen, onMenuOpenChange] = (0,external_wp_element_namespaceObject.useState)(false);
       
 25199   const [actionWithModal, setActionWithModal] = (0,external_wp_element_namespaceObject.useState)();
       
 25200   const selectableItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25201     return data.filter(item => {
       
 25202       return bulkActions.some(action => !action.isEligible || action.isEligible(item));
       
 25203     });
       
 25204   }, [data, bulkActions]);
       
 25205   const numberSelectableItems = selectableItems.length;
       
 25206   const selectedItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25207     return data.filter(item => selection.includes(getItemId(item)) && selectableItems.includes(item));
       
 25208   }, [selection, data, getItemId, selectableItems]);
       
 25209   const areAllSelected = selectedItems.length === numberSelectableItems;
       
 25210   if (bulkActions.length === 0) {
       
 25211     return null;
       
 25212   }
       
 25213   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 25214     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(bulk_actions_DropdownMenu, {
       
 25215       open: isMenuOpen,
       
 25216       onOpenChange: onMenuOpenChange,
       
 25217       label: (0,external_wp_i18n_namespaceObject.__)('Bulk actions'),
       
 25218       style: {
       
 25219         minWidth: '240px'
       
 25220       },
       
 25221       trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 25222         className: "dataviews-bulk-edit-button",
       
 25223         __next40pxDefaultSize: true,
       
 25224         variant: "tertiary",
       
 25225         size: "compact",
       
 25226         children: selectedItems.length ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: Number of items. */
       
 25227         (0,external_wp_i18n_namespaceObject._n)('Edit %d item', 'Edit %d items', selectedItems.length), selectedItems.length) : (0,external_wp_i18n_namespaceObject.__)('Bulk edit')
       
 25228       }),
       
 25229       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionsMenuGroup, {
       
 25230         actions: bulkActions,
       
 25231         setActionWithModal: setActionWithModal,
       
 25232         selectedItems: selectedItems
       
 25233       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(bulk_actions_DropdownMenuGroup, {
       
 25234         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(bulk_actions_DropdownMenuItem, {
       
 25235           disabled: areAllSelected,
       
 25236           hideOnClick: false,
       
 25237           onClick: () => {
       
 25238             onSelectionChange(selectableItems);
       
 25239           },
       
 25240           suffix: numberSelectableItems,
       
 25241           children: (0,external_wp_i18n_namespaceObject.__)('Select all')
       
 25242         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(bulk_actions_DropdownMenuItem, {
       
 25243           disabled: selection.length === 0,
       
 25244           hideOnClick: false,
       
 25245           onClick: () => {
       
 25246             onSelectionChange([]);
       
 25247           },
       
 25248           children: (0,external_wp_i18n_namespaceObject.__)('Deselect')
       
 25249         })]
       
 25250       })]
       
 25251     }), actionWithModal && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(bulk_actions_ActionWithModal, {
       
 25252       action: actionWithModal,
       
 25253       selectedItems: selectedItems,
       
 25254       setActionWithModal: setActionWithModal,
       
 25255       onMenuOpenChange: onMenuOpenChange
       
 25256     })]
       
 25257   });
       
 25258 }
       
 25259 
       
 25260 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/view-table.js
       
 25261 /**
       
 25262  * External dependencies
       
 25263  */
       
 25264 
       
 25265 /**
       
 25266  * WordPress dependencies
       
 25267  */
       
 25268 
       
 25269 
       
 25270 
       
 25271 
       
 25272 
       
 25273 /**
       
 25274  * Internal dependencies
       
 25275  */
       
 25276 
       
 25277 
       
 25278 
       
 25279 
       
 25280 
       
 25281 
       
 25282 
       
 25283 
       
 25284 
       
 25285 const {
       
 25286   DropdownMenuV2: view_table_DropdownMenu,
       
 25287   DropdownMenuGroupV2: view_table_DropdownMenuGroup,
       
 25288   DropdownMenuItemV2: view_table_DropdownMenuItem,
       
 25289   DropdownMenuRadioItemV2: DropdownMenuRadioItem,
       
 25290   DropdownMenuItemLabelV2: view_table_DropdownMenuItemLabel,
       
 25291   DropdownMenuSeparatorV2: view_table_DropdownMenuSeparator
       
 25292 } = build_module_lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 25293 function WithDropDownMenuSeparators({
       
 25294   children
       
 25295 }) {
       
 25296   return external_wp_element_namespaceObject.Children.toArray(children).filter(Boolean).map((child, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_element_namespaceObject.Fragment, {
       
 25297     children: [i > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuSeparator, {}), child]
       
 25298   }, i));
       
 25299 }
       
 25300 const _HeaderMenu = (0,external_wp_element_namespaceObject.forwardRef)(function HeaderMenu({
       
 25301   field,
       
 25302   view,
       
 25303   onChangeView,
       
 25304   onHide,
       
 25305   setOpenedFilter
       
 25306 }, ref) {
       
 25307   const isHidable = field.enableHiding !== false;
       
 25308   const isSortable = field.enableSorting !== false;
       
 25309   const isSorted = view.sort?.field === field.id;
       
 25310   const operators = sanitizeOperators(field);
       
 25311   // Filter can be added:
       
 25312   // 1. If the field is not already part of a view's filters.
       
 25313   // 2. If the field meets the type and operator requirements.
       
 25314   // 3. If it's not primary. If it is, it should be already visible.
       
 25315   const canAddFilter = !view.filters?.some(_filter => field.id === _filter.field) && !!field.elements?.length && !!operators.length && !field.filterBy?.isPrimary;
       
 25316   if (!isSortable && !isHidable && !canAddFilter) {
       
 25317     return field.header;
       
 25318   }
       
 25319   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenu, {
       
 25320     align: "start",
       
 25321     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Button, {
       
 25322       size: "compact",
       
 25323       className: "dataviews-view-table-header-button",
       
 25324       ref: ref,
       
 25325       variant: "tertiary",
       
 25326       children: [field.header, view.sort && isSorted && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 25327         "aria-hidden": "true",
       
 25328         children: sortArrows[view.sort.direction]
       
 25329       })]
       
 25330     }),
       
 25331     style: {
       
 25332       minWidth: '240px'
       
 25333     },
       
 25334     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(WithDropDownMenuSeparators, {
       
 25335       children: [isSortable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuGroup, {
       
 25336         children: SORTING_DIRECTIONS.map(direction => {
       
 25337           const isChecked = view.sort && isSorted && view.sort.direction === direction;
       
 25338           const value = `${field.id}-${direction}`;
       
 25339           return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuRadioItem, {
       
 25340             // All sorting radio items share the same name, so that
       
 25341             // selecting a sorting option automatically deselects the
       
 25342             // previously selected one, even if it is displayed in
       
 25343             // another submenu. The field and direction are passed via
       
 25344             // the `value` prop.
       
 25345             name: "view-table-sorting",
       
 25346             value: value,
       
 25347             checked: isChecked,
       
 25348             onChange: () => {
       
 25349               onChangeView({
       
 25350                 ...view,
       
 25351                 sort: {
       
 25352                   field: field.id,
       
 25353                   direction
       
 25354                 }
       
 25355               });
       
 25356             },
       
 25357             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuItemLabel, {
       
 25358               children: sortLabels[direction]
       
 25359             })
       
 25360           }, value);
       
 25361         })
       
 25362       }), canAddFilter && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuGroup, {
       
 25363         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuItem, {
       
 25364           prefix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 25365             icon: library_funnel
       
 25366           }),
       
 25367           onClick: () => {
       
 25368             setOpenedFilter(field.id);
       
 25369             onChangeView({
       
 25370               ...view,
       
 25371               page: 1,
       
 25372               filters: [...(view.filters || []), {
       
 25373                 field: field.id,
       
 25374                 value: undefined,
       
 25375                 operator: operators[0]
       
 25376               }]
       
 25377             });
       
 25378           },
       
 25379           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuItemLabel, {
       
 25380             children: (0,external_wp_i18n_namespaceObject.__)('Add filter')
       
 25381           })
       
 25382         })
       
 25383       }), isHidable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuItem, {
       
 25384         prefix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 25385           icon: library_unseen
       
 25386         }),
       
 25387         onClick: () => {
       
 25388           onHide(field);
       
 25389           onChangeView({
       
 25390             ...view,
       
 25391             hiddenFields: view.hiddenFields.concat(field.id)
       
 25392           });
       
 25393         },
       
 25394         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_table_DropdownMenuItemLabel, {
       
 25395           children: (0,external_wp_i18n_namespaceObject.__)('Hide')
       
 25396         })
       
 25397       })]
       
 25398     })
       
 25399   });
       
 25400 });
       
 25401 
       
 25402 // @ts-expect-error Lift the `Item` type argument through the forwardRef.
       
 25403 const HeaderMenu = _HeaderMenu;
       
 25404 function BulkSelectionCheckbox({
       
 25405   selection,
       
 25406   onSelectionChange,
       
 25407   data,
       
 25408   actions,
       
 25409   getItemId
       
 25410 }) {
       
 25411   const selectableItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25412     return data.filter(item => {
       
 25413       return actions.some(action => action.supportsBulk && (!action.isEligible || action.isEligible(item)));
       
 25414     });
       
 25415   }, [data, actions]);
       
 25416   const selectedItems = data.filter(item => selection.includes(getItemId(item)) && selectableItems.includes(item));
       
 25417   const areAllSelected = selectedItems.length === selectableItems.length;
       
 25418   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
       
 25419     className: "dataviews-view-table-selection-checkbox",
       
 25420     __nextHasNoMarginBottom: true,
       
 25421     checked: areAllSelected,
       
 25422     indeterminate: !areAllSelected && !!selectedItems.length,
       
 25423     onChange: () => {
       
 25424       if (areAllSelected) {
       
 25425         onSelectionChange([]);
       
 25426       } else {
       
 25427         onSelectionChange(selectableItems);
       
 25428       }
       
 25429     },
       
 25430     "aria-label": areAllSelected ? (0,external_wp_i18n_namespaceObject.__)('Deselect all') : (0,external_wp_i18n_namespaceObject.__)('Select all')
       
 25431   });
       
 25432 }
       
 25433 function TableRow({
       
 25434   hasBulkActions,
       
 25435   item,
       
 25436   actions,
       
 25437   id,
       
 25438   visibleFields,
       
 25439   primaryField,
       
 25440   selection,
       
 25441   getItemId,
       
 25442   onSelectionChange,
       
 25443   data
       
 25444 }) {
       
 25445   const hasPossibleBulkAction = useHasAPossibleBulkAction(actions, item);
       
 25446   const isSelected = hasPossibleBulkAction && selection.includes(id);
       
 25447   const [isHovered, setIsHovered] = (0,external_wp_element_namespaceObject.useState)(false);
       
 25448   const handleMouseEnter = () => {
       
 25449     setIsHovered(true);
       
 25450   };
       
 25451   const handleMouseLeave = () => {
       
 25452     setIsHovered(false);
       
 25453   };
       
 25454 
       
 25455   // Will be set to true if `onTouchStart` fires. This happens before
       
 25456   // `onClick` and can be used to exclude touchscreen devices from certain
       
 25457   // behaviours.
       
 25458   const isTouchDevice = (0,external_wp_element_namespaceObject.useRef)(false);
       
 25459   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("tr", {
       
 25460     className: dist_clsx('dataviews-view-table__row', {
       
 25461       'is-selected': hasPossibleBulkAction && isSelected,
       
 25462       'is-hovered': isHovered,
       
 25463       'has-bulk-actions': hasPossibleBulkAction
       
 25464     }),
       
 25465     onMouseEnter: handleMouseEnter,
       
 25466     onMouseLeave: handleMouseLeave,
       
 25467     onTouchStart: () => {
       
 25468       isTouchDevice.current = true;
       
 25469     },
       
 25470     onClick: () => {
       
 25471       if (!hasPossibleBulkAction) {
       
 25472         return;
       
 25473       }
       
 25474       if (!isTouchDevice.current && document.getSelection()?.type !== 'Range') {
       
 25475         if (!isSelected) {
       
 25476           onSelectionChange(data.filter(_item => {
       
 25477             const itemId = getItemId?.(_item);
       
 25478             return itemId === id || selection.includes(itemId);
       
 25479           }));
       
 25480         } else {
       
 25481           onSelectionChange(data.filter(_item => {
       
 25482             const itemId = getItemId?.(_item);
       
 25483             return itemId !== id && selection.includes(itemId);
       
 25484           }));
       
 25485         }
       
 25486       }
       
 25487     },
       
 25488     children: [hasBulkActions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("td", {
       
 25489       className: "dataviews-view-table__checkbox-column",
       
 25490       style: {
       
 25491         width: '1%'
       
 25492       },
       
 25493       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25494         className: "dataviews-view-table__cell-content-wrapper",
       
 25495         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SingleSelectionCheckbox, {
       
 25496           item: item,
       
 25497           selection: selection,
       
 25498           onSelectionChange: onSelectionChange,
       
 25499           getItemId: getItemId,
       
 25500           data: data,
       
 25501           primaryField: primaryField,
       
 25502           disabled: !hasPossibleBulkAction
       
 25503         })
       
 25504       })
       
 25505     }), visibleFields.map(field => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("td", {
       
 25506       style: {
       
 25507         width: field.width || undefined,
       
 25508         minWidth: field.minWidth || undefined,
       
 25509         maxWidth: field.maxWidth || undefined
       
 25510       },
       
 25511       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25512         className: dist_clsx('dataviews-view-table__cell-content-wrapper', {
       
 25513           'dataviews-view-table__primary-field': primaryField?.id === field.id
       
 25514         }),
       
 25515         children: field.render({
       
 25516           item
       
 25517         })
       
 25518       })
       
 25519     }, field.id)), !!actions?.length &&
       
 25520     /*#__PURE__*/
       
 25521     // Disable reason: we are not making the element interactive,
       
 25522     // but preventing any click events from bubbling up to the
       
 25523     // table row. This allows us to add a click handler to the row
       
 25524     // itself (to toggle row selection) without erroneously
       
 25525     // intercepting click events from ItemActions.
       
 25526     /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
       
 25527     (0,external_ReactJSXRuntime_namespaceObject.jsx)("td", {
       
 25528       className: "dataviews-view-table__actions-column",
       
 25529       onClick: e => e.stopPropagation(),
       
 25530       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemActions, {
       
 25531         item: item,
       
 25532         actions: actions
       
 25533       })
       
 25534     })
       
 25535     /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */]
       
 25536   });
       
 25537 }
       
 25538 function ViewTable({
       
 25539   actions,
       
 25540   data,
       
 25541   fields,
       
 25542   getItemId,
       
 25543   isLoading = false,
       
 25544   onChangeView,
       
 25545   onSelectionChange,
       
 25546   selection,
       
 25547   setOpenedFilter,
       
 25548   view
       
 25549 }) {
       
 25550   const headerMenuRefs = (0,external_wp_element_namespaceObject.useRef)(new Map());
       
 25551   const headerMenuToFocusRef = (0,external_wp_element_namespaceObject.useRef)();
       
 25552   const [nextHeaderMenuToFocus, setNextHeaderMenuToFocus] = (0,external_wp_element_namespaceObject.useState)();
       
 25553   const hasBulkActions = useSomeItemHasAPossibleBulkAction(actions, data);
       
 25554   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 25555     if (headerMenuToFocusRef.current) {
       
 25556       headerMenuToFocusRef.current.focus();
       
 25557       headerMenuToFocusRef.current = undefined;
       
 25558     }
       
 25559   });
       
 25560   const tableNoticeId = (0,external_wp_element_namespaceObject.useId)();
       
 25561   if (nextHeaderMenuToFocus) {
       
 25562     // If we need to force focus, we short-circuit rendering here
       
 25563     // to prevent any additional work while we handle that.
       
 25564     // Clearing out the focus directive is necessary to make sure
       
 25565     // future renders don't cause unexpected focus jumps.
       
 25566     headerMenuToFocusRef.current = nextHeaderMenuToFocus;
       
 25567     setNextHeaderMenuToFocus(undefined);
       
 25568     return;
       
 25569   }
       
 25570   const onHide = field => {
       
 25571     const hidden = headerMenuRefs.current.get(field.id);
       
 25572     const fallback = hidden ? headerMenuRefs.current.get(hidden.fallback) : undefined;
       
 25573     setNextHeaderMenuToFocus(fallback?.node);
       
 25574   };
       
 25575   const visibleFields = fields.filter(field => !view.hiddenFields.includes(field.id) && ![view.layout.mediaField].includes(field.id));
       
 25576   const hasData = !!data?.length;
       
 25577   const primaryField = fields.find(field => field.id === view.layout.primaryField);
       
 25578   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 25579     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", {
       
 25580       className: "dataviews-view-table",
       
 25581       "aria-busy": isLoading,
       
 25582       "aria-describedby": tableNoticeId,
       
 25583       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("thead", {
       
 25584         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("tr", {
       
 25585           className: "dataviews-view-table__row",
       
 25586           children: [hasBulkActions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("th", {
       
 25587             className: "dataviews-view-table__checkbox-column",
       
 25588             style: {
       
 25589               width: '1%'
       
 25590             },
       
 25591             "data-field-id": "selection",
       
 25592             scope: "col",
       
 25593             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BulkSelectionCheckbox, {
       
 25594               selection: selection,
       
 25595               onSelectionChange: onSelectionChange,
       
 25596               data: data,
       
 25597               actions: actions,
       
 25598               getItemId: getItemId
       
 25599             })
       
 25600           }), visibleFields.map((field, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("th", {
       
 25601             style: {
       
 25602               width: field.width || undefined,
       
 25603               minWidth: field.minWidth || undefined,
       
 25604               maxWidth: field.maxWidth || undefined
       
 25605             },
       
 25606             "data-field-id": field.id,
       
 25607             "aria-sort": view.sort?.field === field.id ? sortValues[view.sort.direction] : undefined,
       
 25608             scope: "col",
       
 25609             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(HeaderMenu, {
       
 25610               ref: node => {
       
 25611                 if (node) {
       
 25612                   headerMenuRefs.current.set(field.id, {
       
 25613                     node,
       
 25614                     fallback: visibleFields[index > 0 ? index - 1 : 1]?.id
       
 25615                   });
       
 25616                 } else {
       
 25617                   headerMenuRefs.current.delete(field.id);
       
 25618                 }
       
 25619               },
       
 25620               field: field,
       
 25621               view: view,
       
 25622               onChangeView: onChangeView,
       
 25623               onHide: onHide,
       
 25624               setOpenedFilter: setOpenedFilter
       
 25625             })
       
 25626           }, field.id)), !!actions?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("th", {
       
 25627             "data-field-id": "actions",
       
 25628             className: "dataviews-view-table__actions-column",
       
 25629             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 25630               className: "dataviews-view-table-header",
       
 25631               children: (0,external_wp_i18n_namespaceObject.__)('Actions')
       
 25632             })
       
 25633           })]
       
 25634         })
       
 25635       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tbody", {
       
 25636         children: hasData && data.map((item, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TableRow, {
       
 25637           item: item,
       
 25638           hasBulkActions: hasBulkActions,
       
 25639           actions: actions,
       
 25640           id: getItemId(item) || index.toString(),
       
 25641           visibleFields: visibleFields,
       
 25642           primaryField: primaryField,
       
 25643           selection: selection,
       
 25644           getItemId: getItemId,
       
 25645           onSelectionChange: onSelectionChange,
       
 25646           data: data
       
 25647         }, getItemId(item)))
       
 25648       })]
       
 25649     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25650       className: dist_clsx({
       
 25651         'dataviews-loading': isLoading,
       
 25652         'dataviews-no-results': !hasData && !isLoading
       
 25653       }),
       
 25654       id: tableNoticeId,
       
 25655       children: !hasData && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 25656         children: isLoading ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)('No results')
       
 25657       })
       
 25658     })]
       
 25659   });
       
 25660 }
       
 25661 /* harmony default export */ const view_table = (ViewTable);
       
 25662 
       
 25663 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/view-grid.js
       
 25664 /**
       
 25665  * External dependencies
       
 25666  */
       
 25667 
       
 25668 
       
 25669 /**
       
 25670  * WordPress dependencies
       
 25671  */
       
 25672 
       
 25673 
       
 25674 
       
 25675 /**
       
 25676  * Internal dependencies
       
 25677  */
       
 25678 
       
 25679 
       
 25680 
       
 25681 
       
 25682 
       
 25683 
       
 25684 function GridItem({
       
 25685   selection,
       
 25686   data,
       
 25687   onSelectionChange,
       
 25688   getItemId,
       
 25689   item,
       
 25690   actions,
       
 25691   mediaField,
       
 25692   primaryField,
       
 25693   visibleFields,
       
 25694   badgeFields,
       
 25695   columnFields
       
 25696 }) {
       
 25697   const hasBulkAction = useHasAPossibleBulkAction(actions, item);
       
 25698   const id = getItemId(item);
       
 25699   const isSelected = selection.includes(id);
       
 25700   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 25701     spacing: 0,
       
 25702     className: dist_clsx('dataviews-view-grid__card', {
       
 25703       'is-selected': hasBulkAction && isSelected
       
 25704     }),
       
 25705     onClickCapture: event => {
       
 25706       if (event.ctrlKey || event.metaKey) {
       
 25707         event.stopPropagation();
       
 25708         event.preventDefault();
       
 25709         if (!hasBulkAction) {
       
 25710           return;
       
 25711         }
       
 25712         if (!isSelected) {
       
 25713           onSelectionChange(data.filter(_item => {
       
 25714             const itemId = getItemId?.(_item);
       
 25715             return itemId === id || selection.includes(itemId);
       
 25716           }));
       
 25717         } else {
       
 25718           onSelectionChange(data.filter(_item => {
       
 25719             const itemId = getItemId?.(_item);
       
 25720             return itemId !== id && selection.includes(itemId);
       
 25721           }));
       
 25722         }
       
 25723       }
       
 25724     },
       
 25725     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25726       className: "dataviews-view-grid__media",
       
 25727       children: mediaField?.render({
       
 25728         item
       
 25729       })
       
 25730     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 25731       justify: "space-between",
       
 25732       className: "dataviews-view-grid__title-actions",
       
 25733       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SingleSelectionCheckbox, {
       
 25734         item: item,
       
 25735         selection: selection,
       
 25736         onSelectionChange: onSelectionChange,
       
 25737         getItemId: getItemId,
       
 25738         data: data,
       
 25739         primaryField: primaryField,
       
 25740         disabled: !hasBulkAction
       
 25741       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 25742         className: "dataviews-view-grid__primary-field",
       
 25743         children: primaryField?.render({
       
 25744           item
       
 25745         })
       
 25746       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemActions, {
       
 25747         item: item,
       
 25748         actions: actions,
       
 25749         isCompact: true
       
 25750       })]
       
 25751     }), !!badgeFields?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 25752       className: "dataviews-view-grid__badge-fields",
       
 25753       spacing: 2,
       
 25754       wrap: true,
       
 25755       alignment: "top",
       
 25756       justify: "flex-start",
       
 25757       children: badgeFields.map(field => {
       
 25758         const renderedValue = field.render({
       
 25759           item
       
 25760         });
       
 25761         if (!renderedValue) {
       
 25762           return null;
       
 25763         }
       
 25764         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 25765           className: "dataviews-view-grid__field-value",
       
 25766           children: renderedValue
       
 25767         }, field.id);
       
 25768       })
       
 25769     }), !!visibleFields?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 25770       className: "dataviews-view-grid__fields",
       
 25771       spacing: 3,
       
 25772       children: visibleFields.map(field => {
       
 25773         const renderedValue = field.render({
       
 25774           item
       
 25775         });
       
 25776         if (!renderedValue) {
       
 25777           return null;
       
 25778         }
       
 25779         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
       
 25780           className: dist_clsx('dataviews-view-grid__field', columnFields?.includes(field.id) ? 'is-column' : 'is-row'),
       
 25781           gap: 1,
       
 25782           justify: "flex-start",
       
 25783           expanded: true,
       
 25784           style: {
       
 25785             height: 'auto'
       
 25786           },
       
 25787           direction: columnFields?.includes(field.id) ? 'column' : 'row',
       
 25788           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 25789             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 25790               className: "dataviews-view-grid__field-name",
       
 25791               children: field.header
       
 25792             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 25793               className: "dataviews-view-grid__field-value",
       
 25794               style: {
       
 25795                 maxHeight: 'none'
       
 25796               },
       
 25797               children: renderedValue
       
 25798             })]
       
 25799           })
       
 25800         }, field.id);
       
 25801       })
       
 25802     })]
       
 25803   }, id);
       
 25804 }
       
 25805 function ViewGrid({
       
 25806   actions,
       
 25807   data,
       
 25808   fields,
       
 25809   getItemId,
       
 25810   isLoading,
       
 25811   onSelectionChange,
       
 25812   selection,
       
 25813   view
       
 25814 }) {
       
 25815   const mediaField = fields.find(field => field.id === view.layout.mediaField);
       
 25816   const primaryField = fields.find(field => field.id === view.layout.primaryField);
       
 25817   const {
       
 25818     visibleFields,
       
 25819     badgeFields
       
 25820   } = fields.reduce((accumulator, field) => {
       
 25821     if (view.hiddenFields.includes(field.id) || [view.layout.mediaField, view.layout.primaryField].includes(field.id)) {
       
 25822       return accumulator;
       
 25823     }
       
 25824     // If the field is a badge field, add it to the badgeFields array
       
 25825     // otherwise add it to the rest visibleFields array.
       
 25826     const key = view.layout.badgeFields?.includes(field.id) ? 'badgeFields' : 'visibleFields';
       
 25827     accumulator[key].push(field);
       
 25828     return accumulator;
       
 25829   }, {
       
 25830     visibleFields: [],
       
 25831     badgeFields: []
       
 25832   });
       
 25833   const hasData = !!data?.length;
       
 25834   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 25835     children: [hasData && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalGrid, {
       
 25836       gap: 8,
       
 25837       columns: 2,
       
 25838       alignment: "top",
       
 25839       className: "dataviews-view-grid",
       
 25840       "aria-busy": isLoading,
       
 25841       children: data.map(item => {
       
 25842         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GridItem, {
       
 25843           selection: selection,
       
 25844           data: data,
       
 25845           onSelectionChange: onSelectionChange,
       
 25846           getItemId: getItemId,
       
 25847           item: item,
       
 25848           actions: actions,
       
 25849           mediaField: mediaField,
       
 25850           primaryField: primaryField,
       
 25851           visibleFields: visibleFields,
       
 25852           badgeFields: badgeFields,
       
 25853           columnFields: view.layout.columnFields
       
 25854         }, getItemId(item));
       
 25855       })
       
 25856     }), !hasData && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25857       className: dist_clsx({
       
 25858         'dataviews-loading': isLoading,
       
 25859         'dataviews-no-results': !isLoading
       
 25860       }),
       
 25861       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 25862         children: isLoading ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)('No results')
       
 25863       })
       
 25864     })]
       
 25865   });
       
 25866 }
       
 25867 
       
 25868 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/view-list.js
       
 25869 /**
       
 25870  * External dependencies
       
 25871  */
       
 25872 
       
 25873 // Import CompositeStore type, which is not exported from @wordpress/components.
       
 25874 // eslint-disable-next-line no-restricted-imports
       
 25875 
       
 25876 /**
       
 25877  * WordPress dependencies
       
 25878  */
       
 25879 
       
 25880 
       
 25881 
       
 25882 
       
 25883 
       
 25884 
       
 25885 /**
       
 25886  * Internal dependencies
       
 25887  */
       
 25888 
       
 25889 
       
 25890 
       
 25891 
       
 25892 const {
       
 25893   useCompositeStoreV2: view_list_useCompositeStore,
       
 25894   CompositeV2: view_list_Composite,
       
 25895   CompositeItemV2: view_list_CompositeItem,
       
 25896   CompositeRowV2: CompositeRow,
       
 25897   DropdownMenuV2: view_list_DropdownMenu
       
 25898 } = build_module_lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 25899 function ListItem({
       
 25900   actions,
       
 25901   id,
       
 25902   isSelected,
       
 25903   item,
       
 25904   mediaField,
       
 25905   onSelect,
       
 25906   primaryField,
       
 25907   store,
       
 25908   visibleFields
       
 25909 }) {
       
 25910   const itemRef = (0,external_wp_element_namespaceObject.useRef)(null);
       
 25911   const labelId = `${id}-label`;
       
 25912   const descriptionId = `${id}-description`;
       
 25913   const [isHovered, setIsHovered] = (0,external_wp_element_namespaceObject.useState)(false);
       
 25914   const handleMouseEnter = () => {
       
 25915     setIsHovered(true);
       
 25916   };
       
 25917   const handleMouseLeave = () => {
       
 25918     setIsHovered(false);
       
 25919   };
       
 25920   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 25921     if (isSelected) {
       
 25922       itemRef.current?.scrollIntoView({
       
 25923         behavior: 'auto',
       
 25924         block: 'nearest',
       
 25925         inline: 'nearest'
       
 25926       });
       
 25927     }
       
 25928   }, [isSelected]);
       
 25929   const {
       
 25930     primaryAction,
       
 25931     eligibleActions
       
 25932   } = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 25933     // If an action is eligible for all items, doesn't need
       
 25934     // to provide the `isEligible` function.
       
 25935     const _eligibleActions = actions.filter(action => !action.isEligible || action.isEligible(item));
       
 25936     const _primaryActions = _eligibleActions.filter(action => action.isPrimary && !!action.icon);
       
 25937     return {
       
 25938       primaryAction: _primaryActions?.[0],
       
 25939       eligibleActions: _eligibleActions
       
 25940     };
       
 25941   }, [actions, item]);
       
 25942   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 25943   const primaryActionLabel = primaryAction && (typeof primaryAction.label === 'string' ? primaryAction.label : primaryAction.label([item]));
       
 25944   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CompositeRow, {
       
 25945     ref: itemRef,
       
 25946     render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {}),
       
 25947     role: "row",
       
 25948     className: dist_clsx({
       
 25949       'is-selected': isSelected,
       
 25950       'is-hovered': isHovered
       
 25951     }),
       
 25952     onMouseEnter: handleMouseEnter,
       
 25953     onMouseLeave: handleMouseLeave,
       
 25954     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 25955       className: "dataviews-view-list__item-wrapper",
       
 25956       alignment: "center",
       
 25957       spacing: 0,
       
 25958       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25959         role: "gridcell",
       
 25960         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_list_CompositeItem, {
       
 25961           store: store,
       
 25962           render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {}),
       
 25963           role: "button",
       
 25964           id: id,
       
 25965           "aria-pressed": isSelected,
       
 25966           "aria-labelledby": labelId,
       
 25967           "aria-describedby": descriptionId,
       
 25968           className: "dataviews-view-list__item",
       
 25969           onClick: () => onSelect(item),
       
 25970           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 25971             spacing: 3,
       
 25972             justify: "start",
       
 25973             alignment: "flex-start",
       
 25974             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25975               className: "dataviews-view-list__media-wrapper",
       
 25976               children: mediaField?.render({
       
 25977                 item
       
 25978               }) || /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25979                 className: "dataviews-view-list__media-placeholder"
       
 25980               })
       
 25981             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 25982               spacing: 0,
       
 25983               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 25984                 className: "dataviews-view-list__primary-field",
       
 25985                 id: labelId,
       
 25986                 children: primaryField?.render({
       
 25987                   item
       
 25988                 })
       
 25989               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 25990                 className: "dataviews-view-list__fields",
       
 25991                 id: descriptionId,
       
 25992                 children: visibleFields.map(field => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 25993                   className: "dataviews-view-list__field",
       
 25994                   children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
       
 25995                     as: "span",
       
 25996                     className: "dataviews-view-list__field-label",
       
 25997                     children: field.header
       
 25998                   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 25999                     className: "dataviews-view-list__field-value",
       
 26000                     children: field.render({
       
 26001                       item
       
 26002                     })
       
 26003                   })]
       
 26004                 }, field.id))
       
 26005               })]
       
 26006             })]
       
 26007           })
       
 26008         })
       
 26009       }), eligibleActions?.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 26010         spacing: 1,
       
 26011         justify: "flex-end",
       
 26012         className: "dataviews-view-list__item-actions",
       
 26013         style: {
       
 26014           flexShrink: '0',
       
 26015           width: 'auto'
       
 26016         },
       
 26017         children: [primaryAction && 'RenderModal' in primaryAction && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 26018           role: "gridcell",
       
 26019           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_list_CompositeItem, {
       
 26020             store: store,
       
 26021             render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 26022               label: primaryActionLabel,
       
 26023               icon: primaryAction.icon,
       
 26024               isDestructive: primaryAction.isDestructive,
       
 26025               size: "compact",
       
 26026               onClick: () => setIsModalOpen(true)
       
 26027             }),
       
 26028             children: isModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionModal, {
       
 26029               action: primaryAction,
       
 26030               items: [item],
       
 26031               closeModal: () => setIsModalOpen(false)
       
 26032             })
       
 26033           })
       
 26034         }), primaryAction && !('RenderModal' in primaryAction) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 26035           role: "gridcell",
       
 26036           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_list_CompositeItem, {
       
 26037             store: store,
       
 26038             render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 26039               label: primaryActionLabel,
       
 26040               icon: primaryAction.icon,
       
 26041               isDestructive: primaryAction.isDestructive,
       
 26042               size: "compact",
       
 26043               onClick: () => primaryAction.callback([item])
       
 26044             })
       
 26045           })
       
 26046         }, primaryAction.id), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 26047           role: "gridcell",
       
 26048           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_list_DropdownMenu, {
       
 26049             trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_list_CompositeItem, {
       
 26050               store: store,
       
 26051               render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 26052                 size: "compact",
       
 26053                 icon: more_vertical,
       
 26054                 label: (0,external_wp_i18n_namespaceObject.__)('Actions'),
       
 26055                 __experimentalIsFocusable: true,
       
 26056                 disabled: !actions.length,
       
 26057                 onKeyDown: event => {
       
 26058                   if (event.key === 'ArrowDown') {
       
 26059                     // Prevent the default behaviour (open dropdown menu) and go down.
       
 26060                     event.preventDefault();
       
 26061                     store.move(store.down());
       
 26062                   }
       
 26063                   if (event.key === 'ArrowUp') {
       
 26064                     // Prevent the default behavior (open dropdown menu) and go up.
       
 26065                     event.preventDefault();
       
 26066                     store.move(store.up());
       
 26067                   }
       
 26068                 }
       
 26069               })
       
 26070             }),
       
 26071             placement: "bottom-end",
       
 26072             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionsDropdownMenuGroup, {
       
 26073               actions: eligibleActions,
       
 26074               item: item
       
 26075             })
       
 26076           })
       
 26077         })]
       
 26078       })]
       
 26079     })
       
 26080   });
       
 26081 }
       
 26082 function ViewList(props) {
       
 26083   const {
       
 26084     actions,
       
 26085     data,
       
 26086     fields,
       
 26087     getItemId,
       
 26088     isLoading,
       
 26089     onSelectionChange,
       
 26090     selection,
       
 26091     view
       
 26092   } = props;
       
 26093   const baseId = (0,external_wp_compose_namespaceObject.useInstanceId)(ViewList, 'view-list');
       
 26094   const selectedItem = data?.findLast(item => selection.includes(getItemId(item)));
       
 26095   const mediaField = fields.find(field => field.id === view.layout.mediaField);
       
 26096   const primaryField = fields.find(field => field.id === view.layout.primaryField);
       
 26097   const visibleFields = fields.filter(field => !view.hiddenFields.includes(field.id) && ![view.layout.primaryField, view.layout.mediaField].includes(field.id));
       
 26098   const onSelect = (0,external_wp_element_namespaceObject.useCallback)(item => onSelectionChange([item]), [onSelectionChange]);
       
 26099   const getItemDomId = (0,external_wp_element_namespaceObject.useCallback)(item => item ? `${baseId}-${getItemId(item)}` : undefined, [baseId, getItemId]);
       
 26100   const store = view_list_useCompositeStore({
       
 26101     defaultActiveId: getItemDomId(selectedItem)
       
 26102   });
       
 26103 
       
 26104   // Manage focused item, when the active one is removed from the list.
       
 26105   const isActiveIdInList = store.useState(state => state.items.some(item => item.id === state.activeId));
       
 26106   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 26107     if (!isActiveIdInList) {
       
 26108       // Prefer going down, except if there is no item below (last item), then go up (last item in list).
       
 26109       if (store.down()) {
       
 26110         store.move(store.down());
       
 26111       } else if (store.up()) {
       
 26112         store.move(store.up());
       
 26113       }
       
 26114     }
       
 26115   }, [isActiveIdInList]);
       
 26116   const hasData = data?.length;
       
 26117   if (!hasData) {
       
 26118     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 26119       className: dist_clsx({
       
 26120         'dataviews-loading': isLoading,
       
 26121         'dataviews-no-results': !hasData && !isLoading
       
 26122       }),
       
 26123       children: !hasData && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 26124         children: isLoading ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)('No results')
       
 26125       })
       
 26126     });
       
 26127   }
       
 26128   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_list_Composite, {
       
 26129     id: baseId,
       
 26130     render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {}),
       
 26131     className: "dataviews-view-list",
       
 26132     role: "grid",
       
 26133     store: store,
       
 26134     children: data.map(item => {
       
 26135       const id = getItemDomId(item);
       
 26136       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ListItem, {
       
 26137         id: id,
       
 26138         actions: actions,
       
 26139         item: item,
       
 26140         isSelected: item === selectedItem,
       
 26141         onSelect: onSelect,
       
 26142         mediaField: mediaField,
       
 26143         primaryField: primaryField,
       
 26144         store: store,
       
 26145         visibleFields: visibleFields
       
 26146       }, id);
       
 26147     })
       
 26148   });
       
 26149 }
       
 26150 
       
 26151 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/layouts.js
       
 26152 /**
       
 26153  * WordPress dependencies
       
 26154  */
       
 26155 
       
 26156 
       
 26157 
       
 26158 /**
       
 26159  * Internal dependencies
       
 26160  */
       
 26161 
       
 26162 
       
 26163 
       
 26164 
       
 26165 const VIEW_LAYOUTS = [{
       
 26166   type: constants_LAYOUT_TABLE,
       
 26167   label: (0,external_wp_i18n_namespaceObject.__)('Table'),
       
 26168   component: view_table,
       
 26169   icon: block_table
       
 26170 }, {
       
 26171   type: constants_LAYOUT_GRID,
       
 26172   label: (0,external_wp_i18n_namespaceObject.__)('Grid'),
       
 26173   component: ViewGrid,
       
 26174   icon: library_category
       
 26175 }, {
       
 26176   type: constants_LAYOUT_LIST,
       
 26177   label: (0,external_wp_i18n_namespaceObject.__)('List'),
       
 26178   component: ViewList,
       
 26179   icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_bullets_rtl : format_list_bullets
       
 26180 }];
       
 26181 
       
 26182 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/view-actions.js
       
 26183 /**
       
 26184  * External dependencies
       
 26185  */
       
 26186 
       
 26187 /**
       
 26188  * WordPress dependencies
       
 26189  */
       
 26190 
       
 26191 
       
 26192 
       
 26193 
       
 26194 
       
 26195 /**
       
 26196  * Internal dependencies
       
 26197  */
       
 26198 
       
 26199 
       
 26200 
       
 26201 
       
 26202 
       
 26203 const {
       
 26204   DropdownMenuV2: view_actions_DropdownMenu,
       
 26205   DropdownMenuGroupV2: view_actions_DropdownMenuGroup,
       
 26206   DropdownMenuItemV2: view_actions_DropdownMenuItem,
       
 26207   DropdownMenuRadioItemV2: view_actions_DropdownMenuRadioItem,
       
 26208   DropdownMenuCheckboxItemV2: DropdownMenuCheckboxItem,
       
 26209   DropdownMenuItemLabelV2: view_actions_DropdownMenuItemLabel
       
 26210 } = build_module_lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 26211 function ViewTypeMenu({
       
 26212   view,
       
 26213   onChangeView,
       
 26214   supportedLayouts
       
 26215 }) {
       
 26216   let _availableViews = VIEW_LAYOUTS;
       
 26217   if (supportedLayouts) {
       
 26218     _availableViews = _availableViews.filter(_view => supportedLayouts.includes(_view.type));
       
 26219   }
       
 26220   if (_availableViews.length === 1) {
       
 26221     return null;
       
 26222   }
       
 26223   const activeView = _availableViews.find(v => view.type === v.type);
       
 26224   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenu, {
       
 26225     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItem, {
       
 26226       suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 26227         "aria-hidden": "true",
       
 26228         children: activeView?.label
       
 26229       }),
       
 26230       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26231         children: (0,external_wp_i18n_namespaceObject.__)('Layout')
       
 26232       })
       
 26233     }),
       
 26234     children: _availableViews.map(availableView => {
       
 26235       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuRadioItem, {
       
 26236         value: availableView.type,
       
 26237         name: "view-actions-available-view",
       
 26238         checked: availableView.type === view.type,
       
 26239         hideOnClick: true,
       
 26240         onChange: e => {
       
 26241           switch (e.target.value) {
       
 26242             case 'list':
       
 26243             case 'grid':
       
 26244             case 'table':
       
 26245               return onChangeView({
       
 26246                 ...view,
       
 26247                 type: e.target.value,
       
 26248                 layout: {}
       
 26249               });
       
 26250           }
       
 26251           throw new Error('Invalid dataview');
       
 26252         },
       
 26253         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26254           children: availableView.label
       
 26255         })
       
 26256       }, availableView.type);
       
 26257     })
       
 26258   });
       
 26259 }
       
 26260 const PAGE_SIZE_VALUES = [10, 20, 50, 100];
       
 26261 function PageSizeMenu({
       
 26262   view,
       
 26263   onChangeView
       
 26264 }) {
       
 26265   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenu, {
       
 26266     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItem, {
       
 26267       suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 26268         "aria-hidden": "true",
       
 26269         children: view.perPage
       
 26270       }),
       
 26271       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26272         children: (0,external_wp_i18n_namespaceObject.__)('Items per page')
       
 26273       })
       
 26274     }),
       
 26275     children: PAGE_SIZE_VALUES.map(size => {
       
 26276       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuRadioItem, {
       
 26277         value: size,
       
 26278         name: "view-actions-page-size",
       
 26279         checked: view.perPage === size,
       
 26280         onChange: () => {
       
 26281           onChangeView({
       
 26282             ...view,
       
 26283             // `e.target.value` holds the same value as `size` but as a string,
       
 26284             // so we use `size` directly to avoid parsing to int.
       
 26285             perPage: size,
       
 26286             page: 1
       
 26287           });
       
 26288         },
       
 26289         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26290           children: size
       
 26291         })
       
 26292       }, size);
       
 26293     })
       
 26294   });
       
 26295 }
       
 26296 function FieldsVisibilityMenu({
       
 26297   view,
       
 26298   onChangeView,
       
 26299   fields
       
 26300 }) {
       
 26301   const hidableFields = fields.filter(field => field.enableHiding !== false && field.id !== view.layout.mediaField);
       
 26302   if (!hidableFields?.length) {
       
 26303     return null;
       
 26304   }
       
 26305   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenu, {
       
 26306     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItem, {
       
 26307       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26308         children: (0,external_wp_i18n_namespaceObject.__)('Fields')
       
 26309       })
       
 26310     }),
       
 26311     children: hidableFields?.map(field => {
       
 26312       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuCheckboxItem, {
       
 26313         value: field.id,
       
 26314         checked: !view.hiddenFields?.includes(field.id),
       
 26315         onChange: () => {
       
 26316           onChangeView({
       
 26317             ...view,
       
 26318             hiddenFields: view.hiddenFields?.includes(field.id) ? view.hiddenFields.filter(id => id !== field.id) : [...(view.hiddenFields || []), field.id]
       
 26319           });
       
 26320         },
       
 26321         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26322           children: field.header
       
 26323         })
       
 26324       }, field.id);
       
 26325     })
       
 26326   });
       
 26327 }
       
 26328 function SortMenu({
       
 26329   fields,
       
 26330   view,
       
 26331   onChangeView
       
 26332 }) {
       
 26333   const sortableFields = fields.filter(field => field.enableSorting !== false);
       
 26334   if (!sortableFields?.length) {
       
 26335     return null;
       
 26336   }
       
 26337   const currentSortedField = fields.find(field => field.id === view.sort?.field);
       
 26338   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenu, {
       
 26339     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItem, {
       
 26340       suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 26341         "aria-hidden": "true",
       
 26342         children: currentSortedField?.header
       
 26343       }),
       
 26344       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26345         children: (0,external_wp_i18n_namespaceObject.__)('Sort by')
       
 26346       })
       
 26347     }),
       
 26348     children: sortableFields?.map(field => {
       
 26349       const sortedDirection = view.sort?.direction;
       
 26350       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenu, {
       
 26351         trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItem, {
       
 26352           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26353             children: field.header
       
 26354           })
       
 26355         }),
       
 26356         style: {
       
 26357           minWidth: '220px'
       
 26358         },
       
 26359         children: SORTING_DIRECTIONS.map(direction => {
       
 26360           const isChecked = currentSortedField !== undefined && sortedDirection === direction && field.id === currentSortedField.id;
       
 26361           const value = `${field.id}-${direction}`;
       
 26362           return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuRadioItem, {
       
 26363             // All sorting radio items share the same name, so that
       
 26364             // selecting a sorting option automatically deselects the
       
 26365             // previously selected one, even if it is displayed in
       
 26366             // another submenu. The field and direction are passed via
       
 26367             // the `value` prop.
       
 26368             name: "view-actions-sorting",
       
 26369             value: value,
       
 26370             checked: isChecked,
       
 26371             onChange: () => {
       
 26372               onChangeView({
       
 26373                 ...view,
       
 26374                 sort: {
       
 26375                   field: field.id,
       
 26376                   direction
       
 26377                 }
       
 26378               });
       
 26379             },
       
 26380             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenuItemLabel, {
       
 26381               children: sortLabels[direction]
       
 26382             })
       
 26383           }, value);
       
 26384         })
       
 26385       }, field.id);
       
 26386     })
       
 26387   });
       
 26388 }
       
 26389 function _ViewActions({
       
 26390   fields,
       
 26391   view,
       
 26392   onChangeView,
       
 26393   supportedLayouts
       
 26394 }) {
       
 26395   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions_DropdownMenu, {
       
 26396     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 26397       size: "compact",
       
 26398       icon: library_settings,
       
 26399       label: (0,external_wp_i18n_namespaceObject.__)('View options')
       
 26400     }),
       
 26401     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(view_actions_DropdownMenuGroup, {
       
 26402       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ViewTypeMenu, {
       
 26403         view: view,
       
 26404         onChangeView: onChangeView,
       
 26405         supportedLayouts: supportedLayouts
       
 26406       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SortMenu, {
       
 26407         fields: fields,
       
 26408         view: view,
       
 26409         onChangeView: onChangeView
       
 26410       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FieldsVisibilityMenu, {
       
 26411         fields: fields,
       
 26412         view: view,
       
 26413         onChangeView: onChangeView
       
 26414       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PageSizeMenu, {
       
 26415         view: view,
       
 26416         onChangeView: onChangeView
       
 26417       })]
       
 26418     })
       
 26419   });
       
 26420 }
       
 26421 
       
 26422 // A type assertion is used here to keep the type argument.
       
 26423 const ViewActions = (0,external_wp_element_namespaceObject.memo)(_ViewActions);
       
 26424 /* harmony default export */ const view_actions = (ViewActions);
       
 26425 
       
 26426 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/3IEDWLST.js
       
 26427 "use client";
       
 26428 
       
 26429 // src/composite/utils.ts
       
 26430 
       
 26431 var NULL_ITEM = { id: null };
       
 26432 function flipItems(items, activeId, shouldInsertNullItem = false) {
       
 26433   const index = items.findIndex((item) => item.id === activeId);
       
 26434   return [
       
 26435     ...items.slice(index + 1),
       
 26436     ...shouldInsertNullItem ? [NULL_ITEM] : [],
       
 26437     ...items.slice(0, index)
       
 26438   ];
       
 26439 }
       
 26440 function findFirstEnabledItem(items, excludeId) {
       
 26441   return items.find((item) => {
       
 26442     if (excludeId) {
       
 26443       return !item.disabled && item.id !== excludeId;
       
 26444     }
       
 26445     return !item.disabled;
       
 26446   });
       
 26447 }
       
 26448 function getEnabledItem(store, id) {
       
 26449   if (!id)
       
 26450     return null;
       
 26451   return store.item(id) || null;
       
 26452 }
       
 26453 function groupItemsByRows(items) {
       
 26454   const rows = [];
       
 26455   for (const item of items) {
       
 26456     const row = rows.find((currentRow) => {
       
 26457       var _a;
       
 26458       return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
       
 26459     });
       
 26460     if (row) {
       
 26461       row.push(item);
       
 26462     } else {
       
 26463       rows.push([item]);
       
 26464     }
       
 26465   }
       
 26466   return rows;
       
 26467 }
       
 26468 function selectTextField(element, collapseToEnd = false) {
       
 26469   if (isTextField(element)) {
       
 26470     element.setSelectionRange(
       
 26471       collapseToEnd ? element.value.length : 0,
       
 26472       element.value.length
       
 26473     );
       
 26474   } else if (element.isContentEditable) {
       
 26475     const selection = getDocument(element).getSelection();
       
 26476     selection == null ? void 0 : selection.selectAllChildren(element);
       
 26477     if (collapseToEnd) {
       
 26478       selection == null ? void 0 : selection.collapseToEnd();
       
 26479     }
       
 26480   }
       
 26481 }
       
 26482 var FOCUS_SILENTLY = Symbol("FOCUS_SILENTLY");
       
 26483 function focusSilently(element) {
       
 26484   element[FOCUS_SILENTLY] = true;
       
 26485   element.focus({ preventScroll: true });
       
 26486 }
       
 26487 function silentlyFocused(element) {
       
 26488   const isSilentlyFocused = element[FOCUS_SILENTLY];
       
 26489   delete element[FOCUS_SILENTLY];
       
 26490   return isSilentlyFocused;
       
 26491 }
       
 26492 function isItem(store, element, exclude) {
       
 26493   if (!element)
       
 26494     return false;
       
 26495   if (element === exclude)
       
 26496     return false;
       
 26497   const item = store.item(element.id);
       
 26498   if (!item)
       
 26499     return false;
       
 26500   if (exclude && item.element === exclude)
       
 26501     return false;
       
 26502   return true;
       
 26503 }
       
 26504 
       
 26505 
       
 26506 
       
 26507 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/4R3V3JGP.js
       
 26508 "use client";
       
 26509 var __defProp = Object.defineProperty;
       
 26510 var __defProps = Object.defineProperties;
       
 26511 var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
       
 26512 var __getOwnPropSymbols = Object.getOwnPropertySymbols;
       
 26513 var __hasOwnProp = Object.prototype.hasOwnProperty;
       
 26514 var __propIsEnum = Object.prototype.propertyIsEnumerable;
       
 26515 var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
       
 26516 var _4R3V3JGP_spreadValues = (a, b) => {
       
 26517   for (var prop in b || (b = {}))
       
 26518     if (__hasOwnProp.call(b, prop))
       
 26519       __defNormalProp(a, prop, b[prop]);
       
 26520   if (__getOwnPropSymbols)
       
 26521     for (var prop of __getOwnPropSymbols(b)) {
       
 26522       if (__propIsEnum.call(b, prop))
       
 26523         __defNormalProp(a, prop, b[prop]);
       
 26524     }
       
 26525   return a;
       
 26526 };
       
 26527 var _4R3V3JGP_spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
       
 26528 var __objRest = (source, exclude) => {
       
 26529   var target = {};
       
 26530   for (var prop in source)
       
 26531     if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
       
 26532       target[prop] = source[prop];
       
 26533   if (source != null && __getOwnPropSymbols)
       
 26534     for (var prop of __getOwnPropSymbols(source)) {
       
 26535       if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
       
 26536         target[prop] = source[prop];
       
 26537     }
       
 26538   return target;
       
 26539 };
       
 26540 
       
 26541 
       
 26542 
       
 26543 // EXTERNAL MODULE: external "React"
       
 26544 var external_React_ = __webpack_require__(1609);
       
 26545 var external_React_namespaceObject = /*#__PURE__*/__webpack_require__.t(external_React_, 2);
       
 26546 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/4R3V3JGP.js
       
 26547 "use client";
       
 26548 var _4R3V3JGP_defProp = Object.defineProperty;
       
 26549 var _4R3V3JGP_defProps = Object.defineProperties;
       
 26550 var _4R3V3JGP_getOwnPropDescs = Object.getOwnPropertyDescriptors;
       
 26551 var _4R3V3JGP_getOwnPropSymbols = Object.getOwnPropertySymbols;
       
 26552 var _4R3V3JGP_hasOwnProp = Object.prototype.hasOwnProperty;
       
 26553 var _4R3V3JGP_propIsEnum = Object.prototype.propertyIsEnumerable;
       
 26554 var _4R3V3JGP_defNormalProp = (obj, key, value) => key in obj ? _4R3V3JGP_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
       
 26555 var _chunks_4R3V3JGP_spreadValues = (a, b) => {
       
 26556   for (var prop in b || (b = {}))
       
 26557     if (_4R3V3JGP_hasOwnProp.call(b, prop))
       
 26558       _4R3V3JGP_defNormalProp(a, prop, b[prop]);
       
 26559   if (_4R3V3JGP_getOwnPropSymbols)
       
 26560     for (var prop of _4R3V3JGP_getOwnPropSymbols(b)) {
       
 26561       if (_4R3V3JGP_propIsEnum.call(b, prop))
       
 26562         _4R3V3JGP_defNormalProp(a, prop, b[prop]);
       
 26563     }
       
 26564   return a;
       
 26565 };
       
 26566 var _chunks_4R3V3JGP_spreadProps = (a, b) => _4R3V3JGP_defProps(a, _4R3V3JGP_getOwnPropDescs(b));
       
 26567 var _4R3V3JGP_objRest = (source, exclude) => {
       
 26568   var target = {};
       
 26569   for (var prop in source)
       
 26570     if (_4R3V3JGP_hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
       
 26571       target[prop] = source[prop];
       
 26572   if (source != null && _4R3V3JGP_getOwnPropSymbols)
       
 26573     for (var prop of _4R3V3JGP_getOwnPropSymbols(source)) {
       
 26574       if (exclude.indexOf(prop) < 0 && _4R3V3JGP_propIsEnum.call(source, prop))
       
 26575         target[prop] = source[prop];
       
 26576     }
       
 26577   return target;
       
 26578 };
       
 26579 
       
 26580 
       
 26581 
       
 26582 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/Y3OOHFCN.js
       
 26583 "use client";
       
 26584 
       
 26585 
       
 26586 // src/utils/misc.ts
       
 26587 function Y3OOHFCN_noop(..._) {
       
 26588 }
       
 26589 function shallowEqual(a, b) {
       
 26590   if (a === b)
       
 26591     return true;
       
 26592   if (!a)
       
 26593     return false;
       
 26594   if (!b)
       
 26595     return false;
       
 26596   if (typeof a !== "object")
       
 26597     return false;
       
 26598   if (typeof b !== "object")
       
 26599     return false;
       
 26600   const aKeys = Object.keys(a);
       
 26601   const bKeys = Object.keys(b);
       
 26602   const { length } = aKeys;
       
 26603   if (bKeys.length !== length)
       
 26604     return false;
       
 26605   for (const key of aKeys) {
       
 26606     if (a[key] !== b[key]) {
       
 26607       return false;
       
 26608     }
       
 26609   }
       
 26610   return true;
       
 26611 }
       
 26612 function Y3OOHFCN_applyState(argument, currentValue) {
       
 26613   if (isUpdater(argument)) {
       
 26614     const value = isLazyValue(currentValue) ? currentValue() : currentValue;
       
 26615     return argument(value);
       
 26616   }
       
 26617   return argument;
       
 26618 }
       
 26619 function isUpdater(argument) {
       
 26620   return typeof argument === "function";
       
 26621 }
       
 26622 function isLazyValue(value) {
       
 26623   return typeof value === "function";
       
 26624 }
       
 26625 function isObject(arg) {
       
 26626   return typeof arg === "object" && arg != null;
       
 26627 }
       
 26628 function isEmpty(arg) {
       
 26629   if (Array.isArray(arg))
       
 26630     return !arg.length;
       
 26631   if (isObject(arg))
       
 26632     return !Object.keys(arg).length;
       
 26633   if (arg == null)
       
 26634     return true;
       
 26635   if (arg === "")
       
 26636     return true;
       
 26637   return false;
       
 26638 }
       
 26639 function isInteger(arg) {
       
 26640   if (typeof arg === "number") {
       
 26641     return Math.floor(arg) === arg;
       
 26642   }
       
 26643   return String(Math.floor(Number(arg))) === arg;
       
 26644 }
       
 26645 function Y3OOHFCN_hasOwnProperty(object, prop) {
       
 26646   if (typeof Object.hasOwn === "function") {
       
 26647     return Object.hasOwn(object, prop);
       
 26648   }
       
 26649   return Object.prototype.hasOwnProperty.call(object, prop);
       
 26650 }
       
 26651 function chain(...fns) {
       
 26652   return (...args) => {
       
 26653     for (const fn of fns) {
       
 26654       if (typeof fn === "function") {
       
 26655         fn(...args);
       
 26656       }
       
 26657     }
       
 26658   };
       
 26659 }
       
 26660 function cx(...args) {
       
 26661   return args.filter(Boolean).join(" ") || void 0;
       
 26662 }
       
 26663 function normalizeString(str) {
       
 26664   return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
       
 26665 }
       
 26666 function omit(object, keys) {
       
 26667   const result = _chunks_4R3V3JGP_spreadValues({}, object);
       
 26668   for (const key of keys) {
       
 26669     if (Y3OOHFCN_hasOwnProperty(result, key)) {
       
 26670       delete result[key];
       
 26671     }
       
 26672   }
       
 26673   return result;
       
 26674 }
       
 26675 function pick(object, paths) {
       
 26676   const result = {};
       
 26677   for (const key of paths) {
       
 26678     if (Y3OOHFCN_hasOwnProperty(object, key)) {
       
 26679       result[key] = object[key];
       
 26680     }
       
 26681   }
       
 26682   return result;
       
 26683 }
       
 26684 function identity(value) {
       
 26685   return value;
       
 26686 }
       
 26687 function beforePaint(cb = Y3OOHFCN_noop) {
       
 26688   const raf = requestAnimationFrame(cb);
       
 26689   return () => cancelAnimationFrame(raf);
       
 26690 }
       
 26691 function afterPaint(cb = Y3OOHFCN_noop) {
       
 26692   let raf = requestAnimationFrame(() => {
       
 26693     raf = requestAnimationFrame(cb);
       
 26694   });
       
 26695   return () => cancelAnimationFrame(raf);
       
 26696 }
       
 26697 function invariant(condition, message) {
       
 26698   if (condition)
       
 26699     return;
       
 26700   if (typeof message !== "string")
       
 26701     throw new Error("Invariant failed");
       
 26702   throw new Error(message);
       
 26703 }
       
 26704 function getKeys(obj) {
       
 26705   return Object.keys(obj);
       
 26706 }
       
 26707 function isFalsyBooleanCallback(booleanOrCallback, ...args) {
       
 26708   const result = typeof booleanOrCallback === "function" ? booleanOrCallback(...args) : booleanOrCallback;
       
 26709   if (result == null)
       
 26710     return false;
       
 26711   return !result;
       
 26712 }
       
 26713 function disabledFromProps(props) {
       
 26714   return props.disabled || props["aria-disabled"] === true || props["aria-disabled"] === "true";
       
 26715 }
       
 26716 function defaultValue(...values) {
       
 26717   for (const value of values) {
       
 26718     if (value !== void 0)
       
 26719       return value;
       
 26720   }
       
 26721   return void 0;
       
 26722 }
       
 26723 
       
 26724 
       
 26725 
       
 26726 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/XM66DUTO.js
       
 26727 "use client";
       
 26728 
       
 26729 
       
 26730 // src/utils/misc.ts
       
 26731 
       
 26732 
       
 26733 function setRef(ref, value) {
       
 26734   if (typeof ref === "function") {
       
 26735     ref(value);
       
 26736   } else if (ref) {
       
 26737     ref.current = value;
       
 26738   }
       
 26739 }
       
 26740 function isValidElementWithRef(element) {
       
 26741   if (!element)
       
 26742     return false;
       
 26743   if (!(0,external_React_.isValidElement)(element))
       
 26744     return false;
       
 26745   if (!("ref" in element))
       
 26746     return false;
       
 26747   return true;
       
 26748 }
       
 26749 function getRefProperty(element) {
       
 26750   if (!isValidElementWithRef(element))
       
 26751     return null;
       
 26752   return element.ref;
       
 26753 }
       
 26754 function mergeProps(base, overrides) {
       
 26755   const props = _4R3V3JGP_spreadValues({}, base);
       
 26756   for (const key in overrides) {
       
 26757     if (!Y3OOHFCN_hasOwnProperty(overrides, key))
       
 26758       continue;
       
 26759     if (key === "className") {
       
 26760       const prop = "className";
       
 26761       props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop];
       
 26762       continue;
       
 26763     }
       
 26764     if (key === "style") {
       
 26765       const prop = "style";
       
 26766       props[prop] = base[prop] ? _4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({}, base[prop]), overrides[prop]) : overrides[prop];
       
 26767       continue;
       
 26768     }
       
 26769     const overrideValue = overrides[key];
       
 26770     if (typeof overrideValue === "function" && key.startsWith("on")) {
       
 26771       const baseValue = base[key];
       
 26772       if (typeof baseValue === "function") {
       
 26773         props[key] = (...args) => {
       
 26774           overrideValue(...args);
       
 26775           baseValue(...args);
       
 26776         };
       
 26777         continue;
       
 26778       }
       
 26779     }
       
 26780     props[key] = overrideValue;
       
 26781   }
       
 26782   return props;
       
 26783 }
       
 26784 
       
 26785 
       
 26786 
       
 26787 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/DLOEKDPY.js
       
 26788 "use client";
       
 26789 
       
 26790 // src/utils/dom.ts
       
 26791 var DLOEKDPY_canUseDOM = checkIsBrowser();
       
 26792 function checkIsBrowser() {
       
 26793   var _a;
       
 26794   return typeof window !== "undefined" && !!((_a = window.document) == null ? void 0 : _a.createElement);
       
 26795 }
       
 26796 function DLOEKDPY_getDocument(node) {
       
 26797   return node ? node.ownerDocument || node : document;
       
 26798 }
       
 26799 function getWindow(node) {
       
 26800   return DLOEKDPY_getDocument(node).defaultView || window;
       
 26801 }
       
 26802 function DLOEKDPY_getActiveElement(node, activeDescendant = false) {
       
 26803   const { activeElement } = DLOEKDPY_getDocument(node);
       
 26804   if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
       
 26805     return null;
       
 26806   }
       
 26807   if (DLOEKDPY_isFrame(activeElement) && activeElement.contentDocument) {
       
 26808     return DLOEKDPY_getActiveElement(
       
 26809       activeElement.contentDocument.body,
       
 26810       activeDescendant
       
 26811     );
       
 26812   }
       
 26813   if (activeDescendant) {
       
 26814     const id = activeElement.getAttribute("aria-activedescendant");
       
 26815     if (id) {
       
 26816       const element = DLOEKDPY_getDocument(activeElement).getElementById(id);
       
 26817       if (element) {
       
 26818         return element;
       
 26819       }
       
 26820     }
       
 26821   }
       
 26822   return activeElement;
       
 26823 }
       
 26824 function contains(parent, child) {
       
 26825   return parent === child || parent.contains(child);
       
 26826 }
       
 26827 function DLOEKDPY_isFrame(element) {
       
 26828   return element.tagName === "IFRAME";
       
 26829 }
       
 26830 function isButton(element) {
       
 26831   const tagName = element.tagName.toLowerCase();
       
 26832   if (tagName === "button")
       
 26833     return true;
       
 26834   if (tagName === "input" && element.type) {
       
 26835     return buttonInputTypes.indexOf(element.type) !== -1;
       
 26836   }
       
 26837   return false;
       
 26838 }
       
 26839 var buttonInputTypes = [
       
 26840   "button",
       
 26841   "color",
       
 26842   "file",
       
 26843   "image",
       
 26844   "reset",
       
 26845   "submit"
       
 26846 ];
       
 26847 function matches(element, selectors) {
       
 26848   if ("matches" in element) {
       
 26849     return element.matches(selectors);
       
 26850   }
       
 26851   if ("msMatchesSelector" in element) {
       
 26852     return element.msMatchesSelector(selectors);
       
 26853   }
       
 26854   return element.webkitMatchesSelector(selectors);
       
 26855 }
       
 26856 function isVisible(element) {
       
 26857   const htmlElement = element;
       
 26858   return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;
       
 26859 }
       
 26860 function DLOEKDPY_closest(element, selectors) {
       
 26861   if ("closest" in element)
       
 26862     return element.closest(selectors);
       
 26863   do {
       
 26864     if (matches(element, selectors))
       
 26865       return element;
       
 26866     element = element.parentElement || element.parentNode;
       
 26867   } while (element !== null && element.nodeType === 1);
       
 26868   return null;
       
 26869 }
       
 26870 function DLOEKDPY_isTextField(element) {
       
 26871   try {
       
 26872     const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
       
 26873     const isTextArea = element.tagName === "TEXTAREA";
       
 26874     return isTextInput || isTextArea || false;
       
 26875   } catch (error) {
       
 26876     return false;
       
 26877   }
       
 26878 }
       
 26879 function getPopupRole(element, fallback) {
       
 26880   const allowedPopupRoles = ["dialog", "menu", "listbox", "tree", "grid"];
       
 26881   const role = element == null ? void 0 : element.getAttribute("role");
       
 26882   if (role && allowedPopupRoles.indexOf(role) !== -1) {
       
 26883     return role;
       
 26884   }
       
 26885   return fallback;
       
 26886 }
       
 26887 function getPopupItemRole(element, fallback) {
       
 26888   var _a;
       
 26889   const itemRoleByPopupRole = {
       
 26890     menu: "menuitem",
       
 26891     listbox: "option",
       
 26892     tree: "treeitem",
       
 26893     grid: "gridcell"
       
 26894   };
       
 26895   const popupRole = getPopupRole(element);
       
 26896   if (!popupRole)
       
 26897     return fallback;
       
 26898   const key = popupRole;
       
 26899   return (_a = itemRoleByPopupRole[key]) != null ? _a : fallback;
       
 26900 }
       
 26901 function getTextboxSelection(element) {
       
 26902   let start = 0;
       
 26903   let end = 0;
       
 26904   if (DLOEKDPY_isTextField(element)) {
       
 26905     start = element.selectionStart || 0;
       
 26906     end = element.selectionEnd || 0;
       
 26907   } else if (element.isContentEditable) {
       
 26908     const selection = DLOEKDPY_getDocument(element).getSelection();
       
 26909     if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && contains(element, selection.anchorNode) && selection.focusNode && contains(element, selection.focusNode)) {
       
 26910       const range = selection.getRangeAt(0);
       
 26911       const nextRange = range.cloneRange();
       
 26912       nextRange.selectNodeContents(element);
       
 26913       nextRange.setEnd(range.startContainer, range.startOffset);
       
 26914       start = nextRange.toString().length;
       
 26915       nextRange.setEnd(range.endContainer, range.endOffset);
       
 26916       end = nextRange.toString().length;
       
 26917     }
       
 26918   }
       
 26919   return { start, end };
       
 26920 }
       
 26921 function scrollIntoViewIfNeeded(element, arg) {
       
 26922   if (isPartiallyHidden(element) && "scrollIntoView" in element) {
       
 26923     element.scrollIntoView(arg);
       
 26924   }
       
 26925 }
       
 26926 function getScrollingElement(element) {
       
 26927   if (!element)
       
 26928     return null;
       
 26929   if (element.clientHeight && element.scrollHeight > element.clientHeight) {
       
 26930     const { overflowY } = getComputedStyle(element);
       
 26931     const isScrollable = overflowY !== "visible" && overflowY !== "hidden";
       
 26932     if (isScrollable)
       
 26933       return element;
       
 26934   } else if (element.clientWidth && element.scrollWidth > element.clientWidth) {
       
 26935     const { overflowX } = getComputedStyle(element);
       
 26936     const isScrollable = overflowX !== "visible" && overflowX !== "hidden";
       
 26937     if (isScrollable)
       
 26938       return element;
       
 26939   }
       
 26940   return getScrollingElement(element.parentElement) || document.scrollingElement || document.body;
       
 26941 }
       
 26942 function isPartiallyHidden(element) {
       
 26943   const elementRect = element.getBoundingClientRect();
       
 26944   const scroller = getScrollingElement(element);
       
 26945   if (!scroller)
       
 26946     return false;
       
 26947   const scrollerRect = scroller.getBoundingClientRect();
       
 26948   const isHTML = scroller.tagName === "HTML";
       
 26949   const scrollerTop = isHTML ? scrollerRect.top + scroller.scrollTop : scrollerRect.top;
       
 26950   const scrollerBottom = isHTML ? scroller.clientHeight : scrollerRect.bottom;
       
 26951   const scrollerLeft = isHTML ? scrollerRect.left + scroller.scrollLeft : scrollerRect.left;
       
 26952   const scrollerRight = isHTML ? scroller.clientWidth : scrollerRect.right;
       
 26953   const top = elementRect.top < scrollerTop;
       
 26954   const left = elementRect.left < scrollerLeft;
       
 26955   const bottom = elementRect.bottom > scrollerBottom;
       
 26956   const right = elementRect.right > scrollerRight;
       
 26957   return top || left || bottom || right;
       
 26958 }
       
 26959 function setSelectionRange(element, ...args) {
       
 26960   if (/text|search|password|tel|url/i.test(element.type)) {
       
 26961     element.setSelectionRange(...args);
       
 26962   }
       
 26963 }
       
 26964 
       
 26965 
       
 26966 
       
 26967 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/MHPO2BXA.js
       
 26968 "use client";
       
 26969 
       
 26970 
       
 26971 // src/utils/platform.ts
       
 26972 function isTouchDevice() {
       
 26973   return DLOEKDPY_canUseDOM && !!navigator.maxTouchPoints;
       
 26974 }
       
 26975 function isApple() {
       
 26976   if (!DLOEKDPY_canUseDOM)
       
 26977     return false;
       
 26978   return /mac|iphone|ipad|ipod/i.test(navigator.platform);
       
 26979 }
       
 26980 function isSafari() {
       
 26981   return DLOEKDPY_canUseDOM && isApple() && /apple/i.test(navigator.vendor);
       
 26982 }
       
 26983 function isFirefox() {
       
 26984   return DLOEKDPY_canUseDOM && /firefox\//i.test(navigator.userAgent);
       
 26985 }
       
 26986 function isMac() {
       
 26987   return canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
       
 26988 }
       
 26989 
       
 26990 
       
 26991 
       
 26992 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/utils/events.js
       
 26993 "use client";
       
 26994 
       
 26995 
       
 26996 
       
 26997 
       
 26998 // src/utils/events.ts
       
 26999 function isPortalEvent(event) {
       
 27000   return Boolean(
       
 27001     event.currentTarget && !contains(event.currentTarget, event.target)
       
 27002   );
       
 27003 }
       
 27004 function isSelfTarget(event) {
       
 27005   return event.target === event.currentTarget;
       
 27006 }
       
 27007 function isOpeningInNewTab(event) {
       
 27008   const element = event.currentTarget;
       
 27009   if (!element)
       
 27010     return false;
       
 27011   const isAppleDevice = isApple();
       
 27012   if (isAppleDevice && !event.metaKey)
       
 27013     return false;
       
 27014   if (!isAppleDevice && !event.ctrlKey)
       
 27015     return false;
       
 27016   const tagName = element.tagName.toLowerCase();
       
 27017   if (tagName === "a")
       
 27018     return true;
       
 27019   if (tagName === "button" && element.type === "submit")
       
 27020     return true;
       
 27021   if (tagName === "input" && element.type === "submit")
       
 27022     return true;
       
 27023   return false;
       
 27024 }
       
 27025 function isDownloading(event) {
       
 27026   const element = event.currentTarget;
       
 27027   if (!element)
       
 27028     return false;
       
 27029   const tagName = element.tagName.toLowerCase();
       
 27030   if (!event.altKey)
       
 27031     return false;
       
 27032   if (tagName === "a")
       
 27033     return true;
       
 27034   if (tagName === "button" && element.type === "submit")
       
 27035     return true;
       
 27036   if (tagName === "input" && element.type === "submit")
       
 27037     return true;
       
 27038   return false;
       
 27039 }
       
 27040 function fireEvent(element, type, eventInit) {
       
 27041   const event = new Event(type, eventInit);
       
 27042   return element.dispatchEvent(event);
       
 27043 }
       
 27044 function fireBlurEvent(element, eventInit) {
       
 27045   const event = new FocusEvent("blur", eventInit);
       
 27046   const defaultAllowed = element.dispatchEvent(event);
       
 27047   const bubbleInit = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, eventInit), { bubbles: true });
       
 27048   element.dispatchEvent(new FocusEvent("focusout", bubbleInit));
       
 27049   return defaultAllowed;
       
 27050 }
       
 27051 function fireFocusEvent(element, eventInit) {
       
 27052   const event = new FocusEvent("focus", eventInit);
       
 27053   const defaultAllowed = element.dispatchEvent(event);
       
 27054   const bubbleInit = __spreadProps(__spreadValues({}, eventInit), { bubbles: true });
       
 27055   element.dispatchEvent(new FocusEvent("focusin", bubbleInit));
       
 27056   return defaultAllowed;
       
 27057 }
       
 27058 function fireKeyboardEvent(element, type, eventInit) {
       
 27059   const event = new KeyboardEvent(type, eventInit);
       
 27060   return element.dispatchEvent(event);
       
 27061 }
       
 27062 function fireClickEvent(element, eventInit) {
       
 27063   const event = new MouseEvent("click", eventInit);
       
 27064   return element.dispatchEvent(event);
       
 27065 }
       
 27066 function isFocusEventOutside(event, container) {
       
 27067   const containerElement = container || event.currentTarget;
       
 27068   const relatedTarget = event.relatedTarget;
       
 27069   return !relatedTarget || !contains(containerElement, relatedTarget);
       
 27070 }
       
 27071 function queueBeforeEvent(element, type, callback) {
       
 27072   const raf = requestAnimationFrame(() => {
       
 27073     element.removeEventListener(type, callImmediately, true);
       
 27074     callback();
       
 27075   });
       
 27076   const callImmediately = () => {
       
 27077     cancelAnimationFrame(raf);
       
 27078     callback();
       
 27079   };
       
 27080   element.addEventListener(type, callImmediately, {
       
 27081     once: true,
       
 27082     capture: true
       
 27083   });
       
 27084   return raf;
       
 27085 }
       
 27086 function addGlobalEventListener(type, listener, options, scope = window) {
       
 27087   const children = [];
       
 27088   try {
       
 27089     scope.document.addEventListener(type, listener, options);
       
 27090     for (const frame of Array.from(scope.frames)) {
       
 27091       children.push(addGlobalEventListener(type, listener, options, frame));
       
 27092     }
       
 27093   } catch (e) {
       
 27094   }
       
 27095   const removeEventListener = () => {
       
 27096     try {
       
 27097       scope.document.removeEventListener(type, listener, options);
       
 27098     } catch (e) {
       
 27099     }
       
 27100     children.forEach((remove) => remove());
       
 27101   };
       
 27102   return removeEventListener;
       
 27103 }
       
 27104 
       
 27105 
       
 27106 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6O5OEQGF.js
       
 27107 "use client";
       
 27108 
       
 27109 
       
 27110 
       
 27111 // src/utils/hooks.ts
       
 27112 
       
 27113 
       
 27114 
       
 27115 
       
 27116 
       
 27117 var _React = _4R3V3JGP_spreadValues({}, external_React_namespaceObject);
       
 27118 var useReactId = _React.useId;
       
 27119 var useReactDeferredValue = _React.useDeferredValue;
       
 27120 var useReactInsertionEffect = _React.useInsertionEffect;
       
 27121 var useSafeLayoutEffect = DLOEKDPY_canUseDOM ? external_React_.useLayoutEffect : external_React_.useEffect;
       
 27122 function useInitialValue(value) {
       
 27123   const [initialValue] = useState(value);
       
 27124   return initialValue;
       
 27125 }
       
 27126 function useLazyValue(init) {
       
 27127   const ref = useRef();
       
 27128   if (ref.current === void 0) {
       
 27129     ref.current = init();
       
 27130   }
       
 27131   return ref.current;
       
 27132 }
       
 27133 function useLiveRef(value) {
       
 27134   const ref = (0,external_React_.useRef)(value);
       
 27135   useSafeLayoutEffect(() => {
       
 27136     ref.current = value;
       
 27137   });
       
 27138   return ref;
       
 27139 }
       
 27140 function usePreviousValue(value) {
       
 27141   const [previousValue, setPreviousValue] = useState(value);
       
 27142   if (value !== previousValue) {
       
 27143     setPreviousValue(value);
       
 27144   }
       
 27145   return previousValue;
       
 27146 }
       
 27147 function useEvent(callback) {
       
 27148   const ref = (0,external_React_.useRef)(() => {
       
 27149     throw new Error("Cannot call an event handler while rendering.");
       
 27150   });
       
 27151   if (useReactInsertionEffect) {
       
 27152     useReactInsertionEffect(() => {
       
 27153       ref.current = callback;
       
 27154     });
       
 27155   } else {
       
 27156     ref.current = callback;
       
 27157   }
       
 27158   return (0,external_React_.useCallback)((...args) => {
       
 27159     var _a;
       
 27160     return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);
 12183   }, []);
 27161   }, []);
 12184   const blockContext = (0,external_wp_element_namespaceObject.useMemo)(() => ({ ...(page === null || page === void 0 ? void 0 : page.context),
 27162 }
 12185     queryContext: [(page === null || page === void 0 ? void 0 : page.context.queryContext) || {
 27163 function useMergeRefs(...refs) {
 12186       page: 1
 27164   return (0,external_React_.useMemo)(() => {
 12187     }, newQueryContext => setPage({ ...page,
 27165     if (!refs.some(Boolean))
 12188       context: { ...(page === null || page === void 0 ? void 0 : page.context),
 27166       return;
 12189         queryContext: { ...(page === null || page === void 0 ? void 0 : page.context.queryContext),
 27167     return (value) => {
 12190           ...newQueryContext
 27168       refs.forEach((ref) => setRef(ref, value));
       
 27169     };
       
 27170   }, refs);
       
 27171 }
       
 27172 function useRefId(ref, deps) {
       
 27173   const [id, setId] = useState(void 0);
       
 27174   useSafeLayoutEffect(() => {
       
 27175     var _a;
       
 27176     setId((_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.id);
       
 27177   }, deps);
       
 27178   return id;
       
 27179 }
       
 27180 function useId(defaultId) {
       
 27181   if (useReactId) {
       
 27182     const reactId = useReactId();
       
 27183     if (defaultId)
       
 27184       return defaultId;
       
 27185     return reactId;
       
 27186   }
       
 27187   const [id, setId] = (0,external_React_.useState)(defaultId);
       
 27188   useSafeLayoutEffect(() => {
       
 27189     if (defaultId || id)
       
 27190       return;
       
 27191     const random = Math.random().toString(36).substr(2, 6);
       
 27192     setId(`id-${random}`);
       
 27193   }, [defaultId, id]);
       
 27194   return defaultId || id;
       
 27195 }
       
 27196 function useDeferredValue(value) {
       
 27197   if (useReactDeferredValue) {
       
 27198     return useReactDeferredValue(value);
       
 27199   }
       
 27200   const [deferredValue, setDeferredValue] = useState(value);
       
 27201   useEffect(() => {
       
 27202     const raf = requestAnimationFrame(() => setDeferredValue(value));
       
 27203     return () => cancelAnimationFrame(raf);
       
 27204   }, [value]);
       
 27205   return deferredValue;
       
 27206 }
       
 27207 function useTagName(refOrElement, type) {
       
 27208   const stringOrUndefined = (type2) => {
       
 27209     if (typeof type2 !== "string")
       
 27210       return;
       
 27211     return type2;
       
 27212   };
       
 27213   const [tagName, setTagName] = (0,external_React_.useState)(() => stringOrUndefined(type));
       
 27214   useSafeLayoutEffect(() => {
       
 27215     const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
       
 27216     setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type));
       
 27217   }, [refOrElement, type]);
       
 27218   return tagName;
       
 27219 }
       
 27220 function useAttribute(refOrElement, attributeName, defaultValue) {
       
 27221   const [attribute, setAttribute] = (0,external_React_.useState)(defaultValue);
       
 27222   useSafeLayoutEffect(() => {
       
 27223     const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
       
 27224     const value = element == null ? void 0 : element.getAttribute(attributeName);
       
 27225     if (value == null)
       
 27226       return;
       
 27227     setAttribute(value);
       
 27228   }, [refOrElement, attributeName]);
       
 27229   return attribute;
       
 27230 }
       
 27231 function useUpdateEffect(effect, deps) {
       
 27232   const mounted = (0,external_React_.useRef)(false);
       
 27233   (0,external_React_.useEffect)(() => {
       
 27234     if (mounted.current) {
       
 27235       return effect();
       
 27236     }
       
 27237     mounted.current = true;
       
 27238   }, deps);
       
 27239   (0,external_React_.useEffect)(
       
 27240     () => () => {
       
 27241       mounted.current = false;
       
 27242     },
       
 27243     []
       
 27244   );
       
 27245 }
       
 27246 function useUpdateLayoutEffect(effect, deps) {
       
 27247   const mounted = (0,external_React_.useRef)(false);
       
 27248   useSafeLayoutEffect(() => {
       
 27249     if (mounted.current) {
       
 27250       return effect();
       
 27251     }
       
 27252     mounted.current = true;
       
 27253   }, deps);
       
 27254   useSafeLayoutEffect(
       
 27255     () => () => {
       
 27256       mounted.current = false;
       
 27257     },
       
 27258     []
       
 27259   );
       
 27260 }
       
 27261 function useControlledState(defaultState, state, setState) {
       
 27262   const [localState, setLocalState] = useState(defaultState);
       
 27263   const nextState = state !== void 0 ? state : localState;
       
 27264   const stateRef = useLiveRef(state);
       
 27265   const setStateRef = useLiveRef(setState);
       
 27266   const nextStateRef = useLiveRef(nextState);
       
 27267   const setNextState = useCallback((prevValue) => {
       
 27268     const setStateProp = setStateRef.current;
       
 27269     if (setStateProp) {
       
 27270       if (isSetNextState(setStateProp)) {
       
 27271         setStateProp(prevValue);
       
 27272       } else {
       
 27273         const nextValue = applyState(prevValue, nextStateRef.current);
       
 27274         nextStateRef.current = nextValue;
       
 27275         setStateProp(nextValue);
       
 27276       }
       
 27277     }
       
 27278     if (stateRef.current === void 0) {
       
 27279       setLocalState(prevValue);
       
 27280     }
       
 27281   }, []);
       
 27282   defineSetNextState(setNextState);
       
 27283   return [nextState, setNextState];
       
 27284 }
       
 27285 var SET_NEXT_STATE = Symbol("setNextState");
       
 27286 function isSetNextState(arg) {
       
 27287   return arg[SET_NEXT_STATE] === true;
       
 27288 }
       
 27289 function defineSetNextState(arg) {
       
 27290   if (!isSetNextState(arg)) {
       
 27291     Object.defineProperty(arg, SET_NEXT_STATE, { value: true });
       
 27292   }
       
 27293 }
       
 27294 function useForceUpdate() {
       
 27295   return (0,external_React_.useReducer)(() => [], []);
       
 27296 }
       
 27297 function useBooleanEvent(booleanOrCallback) {
       
 27298   return useEvent(
       
 27299     typeof booleanOrCallback === "function" ? booleanOrCallback : () => booleanOrCallback
       
 27300   );
       
 27301 }
       
 27302 function useWrapElement(props, callback, deps = []) {
       
 27303   const wrapElement = (0,external_React_.useCallback)(
       
 27304     (element) => {
       
 27305       if (props.wrapElement) {
       
 27306         element = props.wrapElement(element);
       
 27307       }
       
 27308       return callback(element);
       
 27309     },
       
 27310     [...deps, props.wrapElement]
       
 27311   );
       
 27312   return _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { wrapElement });
       
 27313 }
       
 27314 function usePortalRef(portalProp = false, portalRefProp) {
       
 27315   const [portalNode, setPortalNode] = useState(null);
       
 27316   const portalRef = useMergeRefs(setPortalNode, portalRefProp);
       
 27317   const domReady = !portalProp || portalNode;
       
 27318   return { portalRef, portalNode, domReady };
       
 27319 }
       
 27320 function useMetadataProps(props, key, value) {
       
 27321   const parent = props.onLoadedMetadataCapture;
       
 27322   const onLoadedMetadataCapture = (0,external_React_.useMemo)(() => {
       
 27323     return Object.assign(() => {
       
 27324     }, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, parent), { [key]: value }));
       
 27325   }, [parent, key, value]);
       
 27326   return [parent == null ? void 0 : parent[key], { onLoadedMetadataCapture }];
       
 27327 }
       
 27328 function useIsMouseMoving() {
       
 27329   (0,external_React_.useEffect)(() => {
       
 27330     addGlobalEventListener("mousemove", setMouseMoving, true);
       
 27331     addGlobalEventListener("mousedown", resetMouseMoving, true);
       
 27332     addGlobalEventListener("mouseup", resetMouseMoving, true);
       
 27333     addGlobalEventListener("keydown", resetMouseMoving, true);
       
 27334     addGlobalEventListener("scroll", resetMouseMoving, true);
       
 27335   }, []);
       
 27336   const isMouseMoving = useEvent(() => mouseMoving);
       
 27337   return isMouseMoving;
       
 27338 }
       
 27339 var mouseMoving = false;
       
 27340 var previousScreenX = 0;
       
 27341 var previousScreenY = 0;
       
 27342 function hasMouseMovement(event) {
       
 27343   const movementX = event.movementX || event.screenX - previousScreenX;
       
 27344   const movementY = event.movementY || event.screenY - previousScreenY;
       
 27345   previousScreenX = event.screenX;
       
 27346   previousScreenY = event.screenY;
       
 27347   return movementX || movementY || "production" === "test";
       
 27348 }
       
 27349 function setMouseMoving(event) {
       
 27350   if (!hasMouseMovement(event))
       
 27351     return;
       
 27352   mouseMoving = true;
       
 27353 }
       
 27354 function resetMouseMoving() {
       
 27355   mouseMoving = false;
       
 27356 }
       
 27357 
       
 27358 
       
 27359 
       
 27360 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/3ORBWXWF.js
       
 27361 "use client";
       
 27362 
       
 27363 
       
 27364 
       
 27365 
       
 27366 // src/utils/system.tsx
       
 27367 
       
 27368 
       
 27369 
       
 27370 function isRenderProp(children) {
       
 27371   return typeof children === "function";
       
 27372 }
       
 27373 function forwardRef2(render) {
       
 27374   const Role = React.forwardRef((props, ref) => render(__spreadProps(__spreadValues({}, props), { ref })));
       
 27375   Role.displayName = render.displayName || render.name;
       
 27376   return Role;
       
 27377 }
       
 27378 function memo2(Component, propsAreEqual) {
       
 27379   const Role = React.memo(Component, propsAreEqual);
       
 27380   Role.displayName = Component.displayName || Component.name;
       
 27381   return Role;
       
 27382 }
       
 27383 function createComponent(render) {
       
 27384   const Role = (props, ref) => render(_4R3V3JGP_spreadValues({ ref }, props));
       
 27385   return external_React_.forwardRef(Role);
       
 27386 }
       
 27387 function createMemoComponent(render) {
       
 27388   const Role = createComponent(render);
       
 27389   return external_React_.memo(Role);
       
 27390 }
       
 27391 function createElement(Type, props) {
       
 27392   const _a = props, { as: As, wrapElement, render } = _a, rest = __objRest(_a, ["as", "wrapElement", "render"]);
       
 27393   let element;
       
 27394   const mergedRef = useMergeRefs(props.ref, getRefProperty(render));
       
 27395   if (false) {}
       
 27396   if (As && typeof As !== "string") {
       
 27397     element = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(As, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, rest), { render }));
       
 27398   } else if (external_React_.isValidElement(render)) {
       
 27399     const renderProps = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, render.props), { ref: mergedRef });
       
 27400     element = external_React_.cloneElement(render, mergeProps(rest, renderProps));
       
 27401   } else if (render) {
       
 27402     element = render(rest);
       
 27403   } else if (isRenderProp(props.children)) {
       
 27404     if (false) {}
       
 27405     const _b = rest, { children } = _b, otherProps = __objRest(_b, ["children"]);
       
 27406     element = props.children(otherProps);
       
 27407   } else if (As) {
       
 27408     element = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(As, _4R3V3JGP_spreadValues({}, rest));
       
 27409   } else {
       
 27410     element = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Type, _4R3V3JGP_spreadValues({}, rest));
       
 27411   }
       
 27412   if (wrapElement) {
       
 27413     return wrapElement(element);
       
 27414   }
       
 27415   return element;
       
 27416 }
       
 27417 function createHook(useProps) {
       
 27418   const useRole = (props = {}) => {
       
 27419     const htmlProps = useProps(props);
       
 27420     const copy = {};
       
 27421     for (const prop in htmlProps) {
       
 27422       if (Y3OOHFCN_hasOwnProperty(htmlProps, prop) && htmlProps[prop] !== void 0) {
       
 27423         copy[prop] = htmlProps[prop];
       
 27424       }
       
 27425     }
       
 27426     return copy;
       
 27427   };
       
 27428   return useRole;
       
 27429 }
       
 27430 function createStoreContext(providers = [], scopedProviders = []) {
       
 27431   const context = external_React_.createContext(void 0);
       
 27432   const scopedContext = external_React_.createContext(void 0);
       
 27433   const useContext2 = () => external_React_.useContext(context);
       
 27434   const useScopedContext = (onlyScoped = false) => {
       
 27435     const scoped = external_React_.useContext(scopedContext);
       
 27436     const store = useContext2();
       
 27437     if (onlyScoped)
       
 27438       return scoped;
       
 27439     return scoped || store;
       
 27440   };
       
 27441   const useProviderContext = () => {
       
 27442     const scoped = external_React_.useContext(scopedContext);
       
 27443     const store = useContext2();
       
 27444     if (scoped && scoped === store)
       
 27445       return;
       
 27446     return store;
       
 27447   };
       
 27448   const ContextProvider = (props) => {
       
 27449     return providers.reduceRight(
       
 27450       (children, Provider) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Provider, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { children })),
       
 27451       /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(context.Provider, _4R3V3JGP_spreadValues({}, props))
       
 27452     );
       
 27453   };
       
 27454   const ScopedContextProvider = (props) => {
       
 27455     return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ContextProvider, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { children: scopedProviders.reduceRight(
       
 27456       (children, Provider) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Provider, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { children })),
       
 27457       /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(scopedContext.Provider, _4R3V3JGP_spreadValues({}, props))
       
 27458     ) }));
       
 27459   };
       
 27460   return {
       
 27461     context,
       
 27462     scopedContext,
       
 27463     useContext: useContext2,
       
 27464     useScopedContext,
       
 27465     useProviderContext,
       
 27466     ContextProvider,
       
 27467     ScopedContextProvider
       
 27468   };
       
 27469 }
       
 27470 
       
 27471 
       
 27472 
       
 27473 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/4UUKJZ4V.js
       
 27474 "use client";
       
 27475 
       
 27476 
       
 27477 // src/collection/collection-context.tsx
       
 27478 var ctx = createStoreContext();
       
 27479 var useCollectionContext = ctx.useContext;
       
 27480 var useCollectionScopedContext = ctx.useScopedContext;
       
 27481 var useCollectionProviderContext = ctx.useProviderContext;
       
 27482 var CollectionContextProvider = ctx.ContextProvider;
       
 27483 var CollectionScopedContextProvider = ctx.ScopedContextProvider;
       
 27484 
       
 27485 
       
 27486 
       
 27487 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/IB7YUKH5.js
       
 27488 "use client";
       
 27489 
       
 27490 
       
 27491 
       
 27492 // src/composite/composite-context.tsx
       
 27493 
       
 27494 var IB7YUKH5_ctx = createStoreContext(
       
 27495   [CollectionContextProvider],
       
 27496   [CollectionScopedContextProvider]
       
 27497 );
       
 27498 var useCompositeContext = IB7YUKH5_ctx.useContext;
       
 27499 var useCompositeScopedContext = IB7YUKH5_ctx.useScopedContext;
       
 27500 var useCompositeProviderContext = IB7YUKH5_ctx.useProviderContext;
       
 27501 var CompositeContextProvider = IB7YUKH5_ctx.ContextProvider;
       
 27502 var CompositeScopedContextProvider = IB7YUKH5_ctx.ScopedContextProvider;
       
 27503 var CompositeItemContext = (0,external_React_.createContext)(
       
 27504   void 0
       
 27505 );
       
 27506 var CompositeRowContext = (0,external_React_.createContext)(
       
 27507   void 0
       
 27508 );
       
 27509 
       
 27510 
       
 27511 
       
 27512 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/346FK57L.js
       
 27513 "use client";
       
 27514 
       
 27515 
       
 27516 
       
 27517 
       
 27518 
       
 27519 
       
 27520 // src/composite/composite-typeahead.ts
       
 27521 
       
 27522 
       
 27523 
       
 27524 
       
 27525 var chars = "";
       
 27526 function clearChars() {
       
 27527   chars = "";
       
 27528 }
       
 27529 function isValidTypeaheadEvent(event) {
       
 27530   const target = event.target;
       
 27531   if (target && DLOEKDPY_isTextField(target))
       
 27532     return false;
       
 27533   if (event.key === " " && chars.length)
       
 27534     return true;
       
 27535   return event.key.length === 1 && !event.ctrlKey && !event.altKey && !event.metaKey && /^[\p{Letter}\p{Number}]$/u.test(event.key);
       
 27536 }
       
 27537 function isSelfTargetOrItem(event, items) {
       
 27538   if (isSelfTarget(event))
       
 27539     return true;
       
 27540   const target = event.target;
       
 27541   if (!target)
       
 27542     return false;
       
 27543   const isItem = items.some((item) => item.element === target);
       
 27544   return isItem;
       
 27545 }
       
 27546 function getEnabledItems(items) {
       
 27547   return items.filter((item) => !item.disabled);
       
 27548 }
       
 27549 function itemTextStartsWith(item, text) {
       
 27550   var _a;
       
 27551   const itemText = ((_a = item.element) == null ? void 0 : _a.textContent) || item.children;
       
 27552   if (!itemText)
       
 27553     return false;
       
 27554   return normalizeString(itemText).trim().toLowerCase().startsWith(text.toLowerCase());
       
 27555 }
       
 27556 function getSameInitialItems(items, char, activeId) {
       
 27557   if (!activeId)
       
 27558     return items;
       
 27559   const activeItem = items.find((item) => item.id === activeId);
       
 27560   if (!activeItem)
       
 27561     return items;
       
 27562   if (!itemTextStartsWith(activeItem, char))
       
 27563     return items;
       
 27564   if (chars !== char && itemTextStartsWith(activeItem, chars))
       
 27565     return items;
       
 27566   chars = char;
       
 27567   return flipItems(
       
 27568     items.filter((item) => itemTextStartsWith(item, chars)),
       
 27569     activeId
       
 27570   ).filter((item) => item.id !== activeId);
       
 27571 }
       
 27572 var useCompositeTypeahead = createHook(
       
 27573   (_a) => {
       
 27574     var _b = _a, { store, typeahead = true } = _b, props = __objRest(_b, ["store", "typeahead"]);
       
 27575     const context = useCompositeContext();
       
 27576     store = store || context;
       
 27577     invariant(
       
 27578       store,
       
 27579        false && 0
       
 27580     );
       
 27581     const onKeyDownCaptureProp = props.onKeyDownCapture;
       
 27582     const cleanupTimeoutRef = (0,external_React_.useRef)(0);
       
 27583     const onKeyDownCapture = useEvent(
       
 27584       (event) => {
       
 27585         onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);
       
 27586         if (event.defaultPrevented)
       
 27587           return;
       
 27588         if (!typeahead)
       
 27589           return;
       
 27590         if (!store)
       
 27591           return;
       
 27592         const { items, activeId } = store.getState();
       
 27593         if (!isValidTypeaheadEvent(event))
       
 27594           return clearChars();
       
 27595         let enabledItems = getEnabledItems(items);
       
 27596         if (!isSelfTargetOrItem(event, enabledItems))
       
 27597           return clearChars();
       
 27598         event.preventDefault();
       
 27599         window.clearTimeout(cleanupTimeoutRef.current);
       
 27600         cleanupTimeoutRef.current = window.setTimeout(() => {
       
 27601           chars = "";
       
 27602         }, 500);
       
 27603         const char = event.key.toLowerCase();
       
 27604         chars += char;
       
 27605         enabledItems = getSameInitialItems(enabledItems, char, activeId);
       
 27606         const item = enabledItems.find(
       
 27607           (item2) => itemTextStartsWith(item2, chars)
       
 27608         );
       
 27609         if (item) {
       
 27610           store.move(item.id);
       
 27611         } else {
       
 27612           clearChars();
       
 27613         }
       
 27614       }
       
 27615     );
       
 27616     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), {
       
 27617       onKeyDownCapture
       
 27618     });
       
 27619     return props;
       
 27620   }
       
 27621 );
       
 27622 var CompositeTypeahead = createComponent(
       
 27623   (props) => {
       
 27624     const htmlProps = useCompositeTypeahead(props);
       
 27625     return createElement("div", htmlProps);
       
 27626   }
       
 27627 );
       
 27628 if (false) {}
       
 27629 
       
 27630 
       
 27631 
       
 27632 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/utils/focus.js
       
 27633 "use client";
       
 27634 
       
 27635 
       
 27636 
       
 27637 // src/utils/focus.ts
       
 27638 var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
       
 27639 function hasNegativeTabIndex(element) {
       
 27640   const tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10);
       
 27641   return tabIndex < 0;
       
 27642 }
       
 27643 function isFocusable(element) {
       
 27644   if (!matches(element, selector))
       
 27645     return false;
       
 27646   if (!isVisible(element))
       
 27647     return false;
       
 27648   if (DLOEKDPY_closest(element, "[inert]"))
       
 27649     return false;
       
 27650   return true;
       
 27651 }
       
 27652 function isTabbable(element) {
       
 27653   if (!isFocusable(element))
       
 27654     return false;
       
 27655   if (hasNegativeTabIndex(element))
       
 27656     return false;
       
 27657   if (!("form" in element))
       
 27658     return true;
       
 27659   if (!element.form)
       
 27660     return true;
       
 27661   if (element.checked)
       
 27662     return true;
       
 27663   if (element.type !== "radio")
       
 27664     return true;
       
 27665   const radioGroup = element.form.elements.namedItem(element.name);
       
 27666   if (!radioGroup)
       
 27667     return true;
       
 27668   if (!("length" in radioGroup))
       
 27669     return true;
       
 27670   const activeElement = getActiveElement(element);
       
 27671   if (!activeElement)
       
 27672     return true;
       
 27673   if (activeElement === element)
       
 27674     return true;
       
 27675   if (!("form" in activeElement))
       
 27676     return true;
       
 27677   if (activeElement.form !== element.form)
       
 27678     return true;
       
 27679   if (activeElement.name !== element.name)
       
 27680     return true;
       
 27681   return false;
       
 27682 }
       
 27683 function getAllFocusableIn(container, includeContainer) {
       
 27684   const elements = Array.from(
       
 27685     container.querySelectorAll(selector)
       
 27686   );
       
 27687   if (includeContainer) {
       
 27688     elements.unshift(container);
       
 27689   }
       
 27690   const focusableElements = elements.filter(isFocusable);
       
 27691   focusableElements.forEach((element, i) => {
       
 27692     if (isFrame(element) && element.contentDocument) {
       
 27693       const frameBody = element.contentDocument.body;
       
 27694       focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));
       
 27695     }
       
 27696   });
       
 27697   return focusableElements;
       
 27698 }
       
 27699 function getAllFocusable(includeBody) {
       
 27700   return getAllFocusableIn(document.body, includeBody);
       
 27701 }
       
 27702 function getFirstFocusableIn(container, includeContainer) {
       
 27703   const [first] = getAllFocusableIn(container, includeContainer);
       
 27704   return first || null;
       
 27705 }
       
 27706 function getFirstFocusable(includeBody) {
       
 27707   return getFirstFocusableIn(document.body, includeBody);
       
 27708 }
       
 27709 function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
       
 27710   const elements = Array.from(
       
 27711     container.querySelectorAll(selector)
       
 27712   );
       
 27713   const tabbableElements = elements.filter(isTabbable);
       
 27714   if (includeContainer && isTabbable(container)) {
       
 27715     tabbableElements.unshift(container);
       
 27716   }
       
 27717   tabbableElements.forEach((element, i) => {
       
 27718     if (isFrame(element) && element.contentDocument) {
       
 27719       const frameBody = element.contentDocument.body;
       
 27720       const allFrameTabbable = getAllTabbableIn(
       
 27721         frameBody,
       
 27722         false,
       
 27723         fallbackToFocusable
       
 27724       );
       
 27725       tabbableElements.splice(i, 1, ...allFrameTabbable);
       
 27726     }
       
 27727   });
       
 27728   if (!tabbableElements.length && fallbackToFocusable) {
       
 27729     return elements;
       
 27730   }
       
 27731   return tabbableElements;
       
 27732 }
       
 27733 function getAllTabbable(fallbackToFocusable) {
       
 27734   return getAllTabbableIn(document.body, false, fallbackToFocusable);
       
 27735 }
       
 27736 function getFirstTabbableIn(container, includeContainer, fallbackToFocusable) {
       
 27737   const [first] = getAllTabbableIn(
       
 27738     container,
       
 27739     includeContainer,
       
 27740     fallbackToFocusable
       
 27741   );
       
 27742   return first || null;
       
 27743 }
       
 27744 function getFirstTabbable(fallbackToFocusable) {
       
 27745   return getFirstTabbableIn(document.body, false, fallbackToFocusable);
       
 27746 }
       
 27747 function getLastTabbableIn(container, includeContainer, fallbackToFocusable) {
       
 27748   const allTabbable = getAllTabbableIn(
       
 27749     container,
       
 27750     includeContainer,
       
 27751     fallbackToFocusable
       
 27752   );
       
 27753   return allTabbable[allTabbable.length - 1] || null;
       
 27754 }
       
 27755 function getLastTabbable(fallbackToFocusable) {
       
 27756   return getLastTabbableIn(document.body, false, fallbackToFocusable);
       
 27757 }
       
 27758 function getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {
       
 27759   const activeElement = getActiveElement(container);
       
 27760   const allFocusable = getAllFocusableIn(container, includeContainer);
       
 27761   const activeIndex = allFocusable.indexOf(activeElement);
       
 27762   const nextFocusableElements = allFocusable.slice(activeIndex + 1);
       
 27763   return nextFocusableElements.find(isTabbable) || (fallbackToFirst ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? nextFocusableElements[0] : null) || null;
       
 27764 }
       
 27765 function getNextTabbable(fallbackToFirst, fallbackToFocusable) {
       
 27766   return getNextTabbableIn(
       
 27767     document.body,
       
 27768     false,
       
 27769     fallbackToFirst,
       
 27770     fallbackToFocusable
       
 27771   );
       
 27772 }
       
 27773 function getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {
       
 27774   const activeElement = getActiveElement(container);
       
 27775   const allFocusable = getAllFocusableIn(container, includeContainer).reverse();
       
 27776   const activeIndex = allFocusable.indexOf(activeElement);
       
 27777   const previousFocusableElements = allFocusable.slice(activeIndex + 1);
       
 27778   return previousFocusableElements.find(isTabbable) || (fallbackToLast ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? previousFocusableElements[0] : null) || null;
       
 27779 }
       
 27780 function getPreviousTabbable(fallbackToFirst, fallbackToFocusable) {
       
 27781   return getPreviousTabbableIn(
       
 27782     document.body,
       
 27783     false,
       
 27784     fallbackToFirst,
       
 27785     fallbackToFocusable
       
 27786   );
       
 27787 }
       
 27788 function getClosestFocusable(element) {
       
 27789   while (element && !isFocusable(element)) {
       
 27790     element = closest(element, selector);
       
 27791   }
       
 27792   return element || null;
       
 27793 }
       
 27794 function hasFocus(element) {
       
 27795   const activeElement = DLOEKDPY_getActiveElement(element);
       
 27796   if (!activeElement)
       
 27797     return false;
       
 27798   if (activeElement === element)
       
 27799     return true;
       
 27800   const activeDescendant = activeElement.getAttribute("aria-activedescendant");
       
 27801   if (!activeDescendant)
       
 27802     return false;
       
 27803   return activeDescendant === element.id;
       
 27804 }
       
 27805 function hasFocusWithin(element) {
       
 27806   const activeElement = DLOEKDPY_getActiveElement(element);
       
 27807   if (!activeElement)
       
 27808     return false;
       
 27809   if (contains(element, activeElement))
       
 27810     return true;
       
 27811   const activeDescendant = activeElement.getAttribute("aria-activedescendant");
       
 27812   if (!activeDescendant)
       
 27813     return false;
       
 27814   if (!("id" in element))
       
 27815     return false;
       
 27816   if (activeDescendant === element.id)
       
 27817     return true;
       
 27818   return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);
       
 27819 }
       
 27820 function focusIfNeeded(element) {
       
 27821   if (!hasFocusWithin(element) && isFocusable(element)) {
       
 27822     element.focus();
       
 27823   }
       
 27824 }
       
 27825 function disableFocus(element) {
       
 27826   var _a;
       
 27827   const currentTabindex = (_a = element.getAttribute("tabindex")) != null ? _a : "";
       
 27828   element.setAttribute("data-tabindex", currentTabindex);
       
 27829   element.setAttribute("tabindex", "-1");
       
 27830 }
       
 27831 function disableFocusIn(container, includeContainer) {
       
 27832   const tabbableElements = getAllTabbableIn(container, includeContainer);
       
 27833   tabbableElements.forEach(disableFocus);
       
 27834 }
       
 27835 function restoreFocusIn(container) {
       
 27836   const elements = container.querySelectorAll("[data-tabindex]");
       
 27837   const restoreTabIndex = (element) => {
       
 27838     const tabindex = element.getAttribute("data-tabindex");
       
 27839     element.removeAttribute("data-tabindex");
       
 27840     if (tabindex) {
       
 27841       element.setAttribute("tabindex", tabindex);
       
 27842     } else {
       
 27843       element.removeAttribute("tabindex");
       
 27844     }
       
 27845   };
       
 27846   if (container.hasAttribute("data-tabindex")) {
       
 27847     restoreTabIndex(container);
       
 27848   }
       
 27849   elements.forEach(restoreTabIndex);
       
 27850 }
       
 27851 function focusIntoView(element, options) {
       
 27852   if (!("scrollIntoView" in element)) {
       
 27853     element.focus();
       
 27854   } else {
       
 27855     element.focus({ preventScroll: true });
       
 27856     element.scrollIntoView(_chunks_4R3V3JGP_spreadValues({ block: "nearest", inline: "nearest" }, options));
       
 27857   }
       
 27858 }
       
 27859 
       
 27860 
       
 27861 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/G6ONQ5EH.js
       
 27862 "use client";
       
 27863 
       
 27864 
       
 27865 
       
 27866 
       
 27867 
       
 27868 // src/composite/composite-hover.ts
       
 27869 
       
 27870 
       
 27871 
       
 27872 
       
 27873 function getMouseDestination(event) {
       
 27874   const relatedTarget = event.relatedTarget;
       
 27875   if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) {
       
 27876     return relatedTarget;
       
 27877   }
       
 27878   return null;
       
 27879 }
       
 27880 function hoveringInside(event) {
       
 27881   const nextElement = getMouseDestination(event);
       
 27882   if (!nextElement)
       
 27883     return false;
       
 27884   return contains(event.currentTarget, nextElement);
       
 27885 }
       
 27886 var symbol = Symbol("composite-hover");
       
 27887 function movingToAnotherItem(event) {
       
 27888   let dest = getMouseDestination(event);
       
 27889   if (!dest)
       
 27890     return false;
       
 27891   do {
       
 27892     if (Y3OOHFCN_hasOwnProperty(dest, symbol) && dest[symbol])
       
 27893       return true;
       
 27894     dest = dest.parentElement;
       
 27895   } while (dest);
       
 27896   return false;
       
 27897 }
       
 27898 var useCompositeHover = createHook(
       
 27899   (_a) => {
       
 27900     var _b = _a, {
       
 27901       store,
       
 27902       focusOnHover = true,
       
 27903       blurOnHoverEnd = !!focusOnHover
       
 27904     } = _b, props = __objRest(_b, [
       
 27905       "store",
       
 27906       "focusOnHover",
       
 27907       "blurOnHoverEnd"
       
 27908     ]);
       
 27909     const context = useCompositeContext();
       
 27910     store = store || context;
       
 27911     invariant(
       
 27912       store,
       
 27913        false && 0
       
 27914     );
       
 27915     const isMouseMoving = useIsMouseMoving();
       
 27916     const onMouseMoveProp = props.onMouseMove;
       
 27917     const focusOnHoverProp = useBooleanEvent(focusOnHover);
       
 27918     const onMouseMove = useEvent((event) => {
       
 27919       onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);
       
 27920       if (event.defaultPrevented)
       
 27921         return;
       
 27922       if (!isMouseMoving())
       
 27923         return;
       
 27924       if (!focusOnHoverProp(event))
       
 27925         return;
       
 27926       if (!hasFocusWithin(event.currentTarget)) {
       
 27927         const baseElement = store == null ? void 0 : store.getState().baseElement;
       
 27928         if (baseElement && !hasFocus(baseElement)) {
       
 27929           baseElement.focus();
       
 27930         }
       
 27931       }
       
 27932       store == null ? void 0 : store.setActiveId(event.currentTarget.id);
       
 27933     });
       
 27934     const onMouseLeaveProp = props.onMouseLeave;
       
 27935     const blurOnHoverEndProp = useBooleanEvent(blurOnHoverEnd);
       
 27936     const onMouseLeave = useEvent((event) => {
       
 27937       var _a2;
       
 27938       onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);
       
 27939       if (event.defaultPrevented)
       
 27940         return;
       
 27941       if (!isMouseMoving())
       
 27942         return;
       
 27943       if (hoveringInside(event))
       
 27944         return;
       
 27945       if (movingToAnotherItem(event))
       
 27946         return;
       
 27947       if (!focusOnHoverProp(event))
       
 27948         return;
       
 27949       if (!blurOnHoverEndProp(event))
       
 27950         return;
       
 27951       store == null ? void 0 : store.setActiveId(null);
       
 27952       (_a2 = store == null ? void 0 : store.getState().baseElement) == null ? void 0 : _a2.focus();
       
 27953     });
       
 27954     const ref = (0,external_React_.useCallback)((element) => {
       
 27955       if (!element)
       
 27956         return;
       
 27957       element[symbol] = true;
       
 27958     }, []);
       
 27959     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), {
       
 27960       ref: useMergeRefs(ref, props.ref),
       
 27961       onMouseMove,
       
 27962       onMouseLeave
       
 27963     });
       
 27964     return props;
       
 27965   }
       
 27966 );
       
 27967 var CompositeHover = createMemoComponent(
       
 27968   (props) => {
       
 27969     const htmlProps = useCompositeHover(props);
       
 27970     return createElement("div", htmlProps);
       
 27971   }
       
 27972 );
       
 27973 if (false) {}
       
 27974 
       
 27975 
       
 27976 
       
 27977 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/EAHJFCU4.js
       
 27978 "use client";
       
 27979 
       
 27980 
       
 27981 
       
 27982 // src/utils/store.ts
       
 27983 function getInternal(store, key) {
       
 27984   const internals = store.__unstableInternals;
       
 27985   invariant(internals, "Invalid store");
       
 27986   return internals[key];
       
 27987 }
       
 27988 function createStore(initialState, ...stores) {
       
 27989   let state = initialState;
       
 27990   let prevStateBatch = state;
       
 27991   let lastUpdate = Symbol();
       
 27992   let destroy = Y3OOHFCN_noop;
       
 27993   const instances = /* @__PURE__ */ new Set();
       
 27994   const updatedKeys = /* @__PURE__ */ new Set();
       
 27995   const setups = /* @__PURE__ */ new Set();
       
 27996   const listeners = /* @__PURE__ */ new Set();
       
 27997   const batchListeners = /* @__PURE__ */ new Set();
       
 27998   const disposables = /* @__PURE__ */ new WeakMap();
       
 27999   const listenerKeys = /* @__PURE__ */ new WeakMap();
       
 28000   const storeSetup = (callback) => {
       
 28001     setups.add(callback);
       
 28002     return () => setups.delete(callback);
       
 28003   };
       
 28004   const storeInit = () => {
       
 28005     const initialized = instances.size;
       
 28006     const instance = Symbol();
       
 28007     instances.add(instance);
       
 28008     const maybeDestroy = () => {
       
 28009       instances.delete(instance);
       
 28010       if (instances.size)
       
 28011         return;
       
 28012       destroy();
       
 28013     };
       
 28014     if (initialized)
       
 28015       return maybeDestroy;
       
 28016     const desyncs = getKeys(state).map(
       
 28017       (key) => chain(
       
 28018         ...stores.map((store) => {
       
 28019           var _a;
       
 28020           const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);
       
 28021           if (!storeState)
       
 28022             return;
       
 28023           if (!Y3OOHFCN_hasOwnProperty(storeState, key))
       
 28024             return;
       
 28025           return sync(store, [key], (state2) => {
       
 28026             setState(
       
 28027               key,
       
 28028               state2[key],
       
 28029               // @ts-expect-error - Not public API. This is just to prevent
       
 28030               // infinite loops.
       
 28031               true
       
 28032             );
       
 28033           });
       
 28034         })
       
 28035       )
       
 28036     );
       
 28037     const teardowns = [];
       
 28038     setups.forEach((setup2) => teardowns.push(setup2()));
       
 28039     const cleanups = stores.map(init);
       
 28040     destroy = chain(...desyncs, ...teardowns, ...cleanups);
       
 28041     return maybeDestroy;
       
 28042   };
       
 28043   const sub = (keys, listener, set = listeners) => {
       
 28044     set.add(listener);
       
 28045     listenerKeys.set(listener, keys);
       
 28046     return () => {
       
 28047       var _a;
       
 28048       (_a = disposables.get(listener)) == null ? void 0 : _a();
       
 28049       disposables.delete(listener);
       
 28050       listenerKeys.delete(listener);
       
 28051       set.delete(listener);
       
 28052     };
       
 28053   };
       
 28054   const storeSubscribe = (keys, listener) => sub(keys, listener);
       
 28055   const storeSync = (keys, listener) => {
       
 28056     disposables.set(listener, listener(state, state));
       
 28057     return sub(keys, listener);
       
 28058   };
       
 28059   const storeBatch = (keys, listener) => {
       
 28060     disposables.set(listener, listener(state, prevStateBatch));
       
 28061     return sub(keys, listener, batchListeners);
       
 28062   };
       
 28063   const storePick = (keys) => createStore(pick(state, keys), finalStore);
       
 28064   const storeOmit = (keys) => createStore(omit(state, keys), finalStore);
       
 28065   const getState = () => state;
       
 28066   const setState = (key, value, fromStores = false) => {
       
 28067     if (!Y3OOHFCN_hasOwnProperty(state, key))
       
 28068       return;
       
 28069     const nextValue = Y3OOHFCN_applyState(value, state[key]);
       
 28070     if (nextValue === state[key])
       
 28071       return;
       
 28072     if (!fromStores) {
       
 28073       stores.forEach((store) => {
       
 28074         var _a;
       
 28075         (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue);
       
 28076       });
       
 28077     }
       
 28078     const prevState = state;
       
 28079     state = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, state), { [key]: nextValue });
       
 28080     const thisUpdate = Symbol();
       
 28081     lastUpdate = thisUpdate;
       
 28082     updatedKeys.add(key);
       
 28083     const run = (listener, prev, uKeys) => {
       
 28084       var _a;
       
 28085       const keys = listenerKeys.get(listener);
       
 28086       const updated = (k) => uKeys ? uKeys.has(k) : k === key;
       
 28087       if (!keys || keys.some(updated)) {
       
 28088         (_a = disposables.get(listener)) == null ? void 0 : _a();
       
 28089         disposables.set(listener, listener(state, prev));
       
 28090       }
       
 28091     };
       
 28092     listeners.forEach((listener) => {
       
 28093       run(listener, prevState);
       
 28094     });
       
 28095     queueMicrotask(() => {
       
 28096       if (lastUpdate !== thisUpdate)
       
 28097         return;
       
 28098       const snapshot = state;
       
 28099       batchListeners.forEach((listener) => {
       
 28100         run(listener, prevStateBatch, updatedKeys);
       
 28101       });
       
 28102       prevStateBatch = snapshot;
       
 28103       updatedKeys.clear();
       
 28104     });
       
 28105   };
       
 28106   const finalStore = {
       
 28107     getState,
       
 28108     setState,
       
 28109     __unstableInternals: {
       
 28110       setup: storeSetup,
       
 28111       init: storeInit,
       
 28112       subscribe: storeSubscribe,
       
 28113       sync: storeSync,
       
 28114       batch: storeBatch,
       
 28115       pick: storePick,
       
 28116       omit: storeOmit
       
 28117     }
       
 28118   };
       
 28119   return finalStore;
       
 28120 }
       
 28121 function setup(store, ...args) {
       
 28122   if (!store)
       
 28123     return;
       
 28124   return getInternal(store, "setup")(...args);
       
 28125 }
       
 28126 function init(store, ...args) {
       
 28127   if (!store)
       
 28128     return;
       
 28129   return getInternal(store, "init")(...args);
       
 28130 }
       
 28131 function subscribe(store, ...args) {
       
 28132   if (!store)
       
 28133     return;
       
 28134   return getInternal(store, "subscribe")(...args);
       
 28135 }
       
 28136 function sync(store, ...args) {
       
 28137   if (!store)
       
 28138     return;
       
 28139   return getInternal(store, "sync")(...args);
       
 28140 }
       
 28141 function batch(store, ...args) {
       
 28142   if (!store)
       
 28143     return;
       
 28144   return getInternal(store, "batch")(...args);
       
 28145 }
       
 28146 function omit2(store, ...args) {
       
 28147   if (!store)
       
 28148     return;
       
 28149   return getInternal(store, "omit")(...args);
       
 28150 }
       
 28151 function pick2(store, ...args) {
       
 28152   if (!store)
       
 28153     return;
       
 28154   return getInternal(store, "pick")(...args);
       
 28155 }
       
 28156 function mergeStore(...stores) {
       
 28157   const initialState = stores.reduce((state, store2) => {
       
 28158     var _a;
       
 28159     const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);
       
 28160     if (!nextState)
       
 28161       return state;
       
 28162     return _chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, state), nextState);
       
 28163   }, {});
       
 28164   const store = createStore(initialState, ...stores);
       
 28165   return store;
       
 28166 }
       
 28167 function throwOnConflictingProps(props, store) {
       
 28168   if (true)
       
 28169     return;
       
 28170   if (!store)
       
 28171     return;
       
 28172   const defaultKeys = Object.entries(props).filter(([key, value]) => key.startsWith("default") && value !== void 0).map(([key]) => {
       
 28173     var _a;
       
 28174     const stateKey = key.replace("default", "");
       
 28175     return `${((_a = stateKey[0]) == null ? void 0 : _a.toLowerCase()) || ""}${stateKey.slice(1)}`;
       
 28176   });
       
 28177   if (!defaultKeys.length)
       
 28178     return;
       
 28179   const storeState = store.getState();
       
 28180   const conflictingProps = defaultKeys.filter(
       
 28181     (key) => Y3OOHFCN_hasOwnProperty(storeState, key)
       
 28182   );
       
 28183   if (!conflictingProps.length)
       
 28184     return;
       
 28185   throw new Error(
       
 28186     `Passing a store prop in conjunction with a default state is not supported.
       
 28187 
       
 28188 const store = useSelectStore();
       
 28189 <SelectProvider store={store} defaultValue="Apple" />
       
 28190                 ^             ^
       
 28191 
       
 28192 Instead, pass the default state to the topmost store:
       
 28193 
       
 28194 const store = useSelectStore({ defaultValue: "Apple" });
       
 28195 <SelectProvider store={store} />
       
 28196 
       
 28197 See https://github.com/ariakit/ariakit/pull/2745 for more details.
       
 28198 
       
 28199 If there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit
       
 28200 `
       
 28201   );
       
 28202 }
       
 28203 
       
 28204 
       
 28205 
       
 28206 // EXTERNAL MODULE: ./node_modules/use-sync-external-store/shim/index.js
       
 28207 var shim = __webpack_require__(422);
       
 28208 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/EKQEJRUF.js
       
 28209 "use client";
       
 28210 
       
 28211 
       
 28212 
       
 28213 // src/utils/store.tsx
       
 28214 
       
 28215 
       
 28216 
       
 28217 
       
 28218 var { useSyncExternalStore } = shim;
       
 28219 var noopSubscribe = () => () => {
       
 28220 };
       
 28221 function useStoreState(store, keyOrSelector = identity) {
       
 28222   const storeSubscribe = external_React_.useCallback(
       
 28223     (callback) => {
       
 28224       if (!store)
       
 28225         return noopSubscribe();
       
 28226       return subscribe(store, null, callback);
       
 28227     },
       
 28228     [store]
       
 28229   );
       
 28230   const getSnapshot = () => {
       
 28231     const key = typeof keyOrSelector === "string" ? keyOrSelector : null;
       
 28232     const selector = typeof keyOrSelector === "function" ? keyOrSelector : null;
       
 28233     const state = store == null ? void 0 : store.getState();
       
 28234     if (selector)
       
 28235       return selector(state);
       
 28236     if (!state)
       
 28237       return;
       
 28238     if (!key)
       
 28239       return;
       
 28240     if (!Y3OOHFCN_hasOwnProperty(state, key))
       
 28241       return;
       
 28242     return state[key];
       
 28243   };
       
 28244   return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);
       
 28245 }
       
 28246 function useStoreProps(store, props, key, setKey) {
       
 28247   const value = Y3OOHFCN_hasOwnProperty(props, key) ? props[key] : void 0;
       
 28248   const setValue = setKey ? props[setKey] : void 0;
       
 28249   const propsRef = useLiveRef({ value, setValue });
       
 28250   useSafeLayoutEffect(() => {
       
 28251     return sync(store, [key], (state, prev) => {
       
 28252       const { value: value2, setValue: setValue2 } = propsRef.current;
       
 28253       if (!setValue2)
       
 28254         return;
       
 28255       if (state[key] === prev[key])
       
 28256         return;
       
 28257       if (state[key] === value2)
       
 28258         return;
       
 28259       setValue2(state[key]);
       
 28260     });
       
 28261   }, [store, key]);
       
 28262   useSafeLayoutEffect(() => {
       
 28263     if (value === void 0)
       
 28264       return;
       
 28265     store.setState(key, value);
       
 28266     return batch(store, [key], () => {
       
 28267       if (value === void 0)
       
 28268         return;
       
 28269       store.setState(key, value);
       
 28270     });
       
 28271   });
       
 28272 }
       
 28273 function EKQEJRUF_useStore(createStore, props) {
       
 28274   const [store, setStore] = external_React_.useState(() => createStore(props));
       
 28275   useSafeLayoutEffect(() => init(store), [store]);
       
 28276   const useState2 = external_React_.useCallback(
       
 28277     (keyOrSelector) => useStoreState(store, keyOrSelector),
       
 28278     [store]
       
 28279   );
       
 28280   const memoizedStore = external_React_.useMemo(
       
 28281     () => _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, store), { useState: useState2 }),
       
 28282     [store, useState2]
       
 28283   );
       
 28284   const updateStore = useEvent(() => {
       
 28285     setStore((store2) => createStore(_4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({}, props), store2.getState())));
       
 28286   });
       
 28287   return [memoizedStore, updateStore];
       
 28288 }
       
 28289 
       
 28290 
       
 28291 
       
 28292 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/Y6GYTNQ2.js
       
 28293 "use client";
       
 28294 
       
 28295 
       
 28296 
       
 28297 // src/collection/collection-store.ts
       
 28298 
       
 28299 function useCollectionStoreProps(store, update, props) {
       
 28300   useUpdateEffect(update, [props.store]);
       
 28301   useStoreProps(store, props, "items", "setItems");
       
 28302   return store;
       
 28303 }
       
 28304 function useCollectionStore(props = {}) {
       
 28305   const [store, update] = useStore(Core.createCollectionStore, props);
       
 28306   return useCollectionStoreProps(store, update, props);
       
 28307 }
       
 28308 
       
 28309 
       
 28310 
       
 28311 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/7GBW5FLS.js
       
 28312 "use client";
       
 28313 
       
 28314 
       
 28315 
       
 28316 // src/composite/composite-store.ts
       
 28317 
       
 28318 function useCompositeStoreProps(store, update, props) {
       
 28319   store = useCollectionStoreProps(store, update, props);
       
 28320   useStoreProps(store, props, "activeId", "setActiveId");
       
 28321   useStoreProps(store, props, "includesBaseElement");
       
 28322   useStoreProps(store, props, "virtualFocus");
       
 28323   useStoreProps(store, props, "orientation");
       
 28324   useStoreProps(store, props, "rtl");
       
 28325   useStoreProps(store, props, "focusLoop");
       
 28326   useStoreProps(store, props, "focusWrap");
       
 28327   useStoreProps(store, props, "focusShift");
       
 28328   return store;
       
 28329 }
       
 28330 function _7GBW5FLS_useCompositeStore(props = {}) {
       
 28331   const [store, update] = useStore(Core.createCompositeStore, props);
       
 28332   return useCompositeStoreProps(store, update, props);
       
 28333 }
       
 28334 
       
 28335 
       
 28336 
       
 28337 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/SFCBA2JZ.js
       
 28338 "use client";
       
 28339 
       
 28340 
       
 28341 
       
 28342 // src/disclosure/disclosure-store.ts
       
 28343 
       
 28344 function useDisclosureStoreProps(store, update, props) {
       
 28345   useUpdateEffect(update, [props.store, props.disclosure]);
       
 28346   useStoreProps(store, props, "open", "setOpen");
       
 28347   useStoreProps(store, props, "mounted", "setMounted");
       
 28348   useStoreProps(store, props, "animated");
       
 28349   return store;
       
 28350 }
       
 28351 function useDisclosureStore(props = {}) {
       
 28352   const [store, update] = useStore(Core.createDisclosureStore, props);
       
 28353   return useDisclosureStoreProps(store, update, props);
       
 28354 }
       
 28355 
       
 28356 
       
 28357 
       
 28358 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/ZSELSBRM.js
       
 28359 "use client";
       
 28360 
       
 28361 
       
 28362 
       
 28363 // src/dialog/dialog-store.ts
       
 28364 
       
 28365 function useDialogStoreProps(store, update, props) {
       
 28366   return useDisclosureStoreProps(store, update, props);
       
 28367 }
       
 28368 function useDialogStore(props = {}) {
       
 28369   const [store, update] = useStore(Core.createDialogStore, props);
       
 28370   return useDialogStoreProps(store, update, props);
       
 28371 }
       
 28372 
       
 28373 
       
 28374 
       
 28375 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/MG4P3223.js
       
 28376 "use client";
       
 28377 
       
 28378 
       
 28379 
       
 28380 
       
 28381 // src/popover/popover-store.ts
       
 28382 
       
 28383 function usePopoverStoreProps(store, update, props) {
       
 28384   useUpdateEffect(update, [props.popover]);
       
 28385   store = useDialogStoreProps(store, update, props);
       
 28386   useStoreProps(store, props, "placement");
       
 28387   return store;
       
 28388 }
       
 28389 function usePopoverStore(props = {}) {
       
 28390   const [store, update] = useStore(Core.createPopoverStore, props);
       
 28391   return usePopoverStoreProps(store, update, props);
       
 28392 }
       
 28393 
       
 28394 
       
 28395 
       
 28396 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/Z5IGYIPT.js
       
 28397 "use client";
       
 28398 
       
 28399 
       
 28400 
       
 28401 
       
 28402 // src/disclosure/disclosure-store.ts
       
 28403 function createDisclosureStore(props = {}) {
       
 28404   const store = mergeStore(
       
 28405     props.store,
       
 28406     omit2(props.disclosure, ["contentElement", "disclosureElement"])
       
 28407   );
       
 28408   throwOnConflictingProps(props, store);
       
 28409   const syncState = store == null ? void 0 : store.getState();
       
 28410   const open = defaultValue(
       
 28411     props.open,
       
 28412     syncState == null ? void 0 : syncState.open,
       
 28413     props.defaultOpen,
       
 28414     false
       
 28415   );
       
 28416   const animated = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false);
       
 28417   const initialState = {
       
 28418     open,
       
 28419     animated,
       
 28420     animating: !!animated && open,
       
 28421     mounted: open,
       
 28422     contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null),
       
 28423     disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null)
       
 28424   };
       
 28425   const disclosure = createStore(initialState, store);
       
 28426   setup(
       
 28427     disclosure,
       
 28428     () => sync(disclosure, ["animated", "animating"], (state) => {
       
 28429       if (state.animated)
       
 28430         return;
       
 28431       disclosure.setState("animating", false);
       
 28432     })
       
 28433   );
       
 28434   setup(
       
 28435     disclosure,
       
 28436     () => subscribe(disclosure, ["open"], () => {
       
 28437       if (!disclosure.getState().animated)
       
 28438         return;
       
 28439       disclosure.setState("animating", true);
       
 28440     })
       
 28441   );
       
 28442   setup(
       
 28443     disclosure,
       
 28444     () => sync(disclosure, ["open", "animating"], (state) => {
       
 28445       disclosure.setState("mounted", state.open || state.animating);
       
 28446     })
       
 28447   );
       
 28448   return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, disclosure), {
       
 28449     setOpen: (value) => disclosure.setState("open", value),
       
 28450     show: () => disclosure.setState("open", true),
       
 28451     hide: () => disclosure.setState("open", false),
       
 28452     toggle: () => disclosure.setState("open", (open2) => !open2),
       
 28453     stopAnimation: () => disclosure.setState("animating", false),
       
 28454     setContentElement: (value) => disclosure.setState("contentElement", value),
       
 28455     setDisclosureElement: (value) => disclosure.setState("disclosureElement", value)
       
 28456   });
       
 28457 }
       
 28458 
       
 28459 
       
 28460 
       
 28461 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/SX2XFD6A.js
       
 28462 "use client";
       
 28463 
       
 28464 
       
 28465 // src/dialog/dialog-store.ts
       
 28466 function createDialogStore(props = {}) {
       
 28467   return createDisclosureStore(props);
       
 28468 }
       
 28469 
       
 28470 
       
 28471 
       
 28472 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/AF6IUUFN.js
       
 28473 "use client";
       
 28474 
       
 28475 
       
 28476 
       
 28477 
       
 28478 
       
 28479 // src/popover/popover-store.ts
       
 28480 function createPopoverStore(_a = {}) {
       
 28481   var _b = _a, {
       
 28482     popover: otherPopover
       
 28483   } = _b, props = _4R3V3JGP_objRest(_b, [
       
 28484     "popover"
       
 28485   ]);
       
 28486   const store = mergeStore(
       
 28487     props.store,
       
 28488     omit2(otherPopover, [
       
 28489       "arrowElement",
       
 28490       "anchorElement",
       
 28491       "contentElement",
       
 28492       "popoverElement",
       
 28493       "disclosureElement"
       
 28494     ])
       
 28495   );
       
 28496   throwOnConflictingProps(props, store);
       
 28497   const syncState = store == null ? void 0 : store.getState();
       
 28498   const dialog = createDialogStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), { store }));
       
 28499   const placement = defaultValue(
       
 28500     props.placement,
       
 28501     syncState == null ? void 0 : syncState.placement,
       
 28502     "bottom"
       
 28503   );
       
 28504   const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, dialog.getState()), {
       
 28505     placement,
       
 28506     currentPlacement: placement,
       
 28507     anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),
       
 28508     popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),
       
 28509     arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),
       
 28510     rendered: Symbol("rendered")
       
 28511   });
       
 28512   const popover = createStore(initialState, dialog, store);
       
 28513   return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, dialog), popover), {
       
 28514     setAnchorElement: (element) => popover.setState("anchorElement", element),
       
 28515     setPopoverElement: (element) => popover.setState("popoverElement", element),
       
 28516     setArrowElement: (element) => popover.setState("arrowElement", element),
       
 28517     render: () => popover.setState("rendered", Symbol("rendered"))
       
 28518   });
       
 28519 }
       
 28520 
       
 28521 
       
 28522 
       
 28523 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/22K762VQ.js
       
 28524 "use client";
       
 28525 
       
 28526 
       
 28527 
       
 28528 
       
 28529 
       
 28530 // src/collection/collection-store.ts
       
 28531 function isElementPreceding(a, b) {
       
 28532   return Boolean(
       
 28533     b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING
       
 28534   );
       
 28535 }
       
 28536 function sortBasedOnDOMPosition(items) {
       
 28537   const pairs = items.map((item, index) => [index, item]);
       
 28538   let isOrderDifferent = false;
       
 28539   pairs.sort(([indexA, a], [indexB, b]) => {
       
 28540     const elementA = a.element;
       
 28541     const elementB = b.element;
       
 28542     if (elementA === elementB)
       
 28543       return 0;
       
 28544     if (!elementA || !elementB)
       
 28545       return 0;
       
 28546     if (isElementPreceding(elementA, elementB)) {
       
 28547       if (indexA > indexB) {
       
 28548         isOrderDifferent = true;
       
 28549       }
       
 28550       return -1;
       
 28551     }
       
 28552     if (indexA < indexB) {
       
 28553       isOrderDifferent = true;
       
 28554     }
       
 28555     return 1;
       
 28556   });
       
 28557   if (isOrderDifferent) {
       
 28558     return pairs.map(([_, item]) => item);
       
 28559   }
       
 28560   return items;
       
 28561 }
       
 28562 function getCommonParent(items) {
       
 28563   var _a;
       
 28564   const firstItem = items.find((item) => !!item.element);
       
 28565   const lastItem = [...items].reverse().find((item) => !!item.element);
       
 28566   let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;
       
 28567   while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {
       
 28568     const parent = parentElement;
       
 28569     if (lastItem && parent.contains(lastItem.element)) {
       
 28570       return parentElement;
       
 28571     }
       
 28572     parentElement = parentElement.parentElement;
       
 28573   }
       
 28574   return DLOEKDPY_getDocument(parentElement).body;
       
 28575 }
       
 28576 function getPrivateStore(store) {
       
 28577   return store == null ? void 0 : store.__unstablePrivateStore;
       
 28578 }
       
 28579 function createCollectionStore(props = {}) {
       
 28580   var _a;
       
 28581   throwOnConflictingProps(props, props.store);
       
 28582   const syncState = (_a = props.store) == null ? void 0 : _a.getState();
       
 28583   const items = defaultValue(
       
 28584     props.items,
       
 28585     syncState == null ? void 0 : syncState.items,
       
 28586     props.defaultItems,
       
 28587     []
       
 28588   );
       
 28589   const itemsMap = new Map(items.map((item) => [item.id, item]));
       
 28590   const initialState = {
       
 28591     items,
       
 28592     renderedItems: defaultValue(syncState == null ? void 0 : syncState.renderedItems, [])
       
 28593   };
       
 28594   const syncPrivateStore = getPrivateStore(props.store);
       
 28595   const privateStore = createStore(
       
 28596     { items, renderedItems: initialState.renderedItems },
       
 28597     syncPrivateStore
       
 28598   );
       
 28599   const collection = createStore(initialState, props.store);
       
 28600   const sortItems = (renderedItems) => {
       
 28601     const sortedItems = sortBasedOnDOMPosition(renderedItems);
       
 28602     privateStore.setState("renderedItems", sortedItems);
       
 28603     collection.setState("renderedItems", sortedItems);
       
 28604   };
       
 28605   setup(collection, () => init(privateStore));
       
 28606   setup(privateStore, () => {
       
 28607     return batch(privateStore, ["items"], (state) => {
       
 28608       collection.setState("items", state.items);
       
 28609     });
       
 28610   });
       
 28611   setup(privateStore, () => {
       
 28612     return batch(privateStore, ["renderedItems"], (state) => {
       
 28613       let firstRun = true;
       
 28614       let raf = requestAnimationFrame(() => {
       
 28615         const { renderedItems } = collection.getState();
       
 28616         if (state.renderedItems === renderedItems)
       
 28617           return;
       
 28618         sortItems(state.renderedItems);
       
 28619       });
       
 28620       if (typeof IntersectionObserver !== "function") {
       
 28621         return () => cancelAnimationFrame(raf);
       
 28622       }
       
 28623       const ioCallback = () => {
       
 28624         if (firstRun) {
       
 28625           firstRun = false;
       
 28626           return;
       
 28627         }
       
 28628         cancelAnimationFrame(raf);
       
 28629         raf = requestAnimationFrame(() => sortItems(state.renderedItems));
       
 28630       };
       
 28631       const root = getCommonParent(state.renderedItems);
       
 28632       const observer = new IntersectionObserver(ioCallback, { root });
       
 28633       for (const item of state.renderedItems) {
       
 28634         if (!item.element)
       
 28635           continue;
       
 28636         observer.observe(item.element);
       
 28637       }
       
 28638       return () => {
       
 28639         cancelAnimationFrame(raf);
       
 28640         observer.disconnect();
       
 28641       };
       
 28642     });
       
 28643   });
       
 28644   const mergeItem = (item, setItems, canDeleteFromMap = false) => {
       
 28645     let prevItem;
       
 28646     setItems((items2) => {
       
 28647       const index = items2.findIndex(({ id }) => id === item.id);
       
 28648       const nextItems = items2.slice();
       
 28649       if (index !== -1) {
       
 28650         prevItem = items2[index];
       
 28651         const nextItem = _chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, prevItem), item);
       
 28652         nextItems[index] = nextItem;
       
 28653         itemsMap.set(item.id, nextItem);
       
 28654       } else {
       
 28655         nextItems.push(item);
       
 28656         itemsMap.set(item.id, item);
       
 28657       }
       
 28658       return nextItems;
       
 28659     });
       
 28660     const unmergeItem = () => {
       
 28661       setItems((items2) => {
       
 28662         if (!prevItem) {
       
 28663           if (canDeleteFromMap) {
       
 28664             itemsMap.delete(item.id);
       
 28665           }
       
 28666           return items2.filter(({ id }) => id !== item.id);
       
 28667         }
       
 28668         const index = items2.findIndex(({ id }) => id === item.id);
       
 28669         if (index === -1)
       
 28670           return items2;
       
 28671         const nextItems = items2.slice();
       
 28672         nextItems[index] = prevItem;
       
 28673         itemsMap.set(item.id, prevItem);
       
 28674         return nextItems;
       
 28675       });
       
 28676     };
       
 28677     return unmergeItem;
       
 28678   };
       
 28679   const registerItem = (item) => mergeItem(
       
 28680     item,
       
 28681     (getItems) => privateStore.setState("items", getItems),
       
 28682     true
       
 28683   );
       
 28684   return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, collection), {
       
 28685     registerItem,
       
 28686     renderItem: (item) => chain(
       
 28687       registerItem(item),
       
 28688       mergeItem(
       
 28689         item,
       
 28690         (getItems) => privateStore.setState("renderedItems", getItems)
       
 28691       )
       
 28692     ),
       
 28693     item: (id) => {
       
 28694       if (!id)
       
 28695         return null;
       
 28696       let item = itemsMap.get(id);
       
 28697       if (!item) {
       
 28698         const { items: items2 } = collection.getState();
       
 28699         item = items2.find((item2) => item2.id === id);
       
 28700         if (item) {
       
 28701           itemsMap.set(id, item);
       
 28702         }
       
 28703       }
       
 28704       return item || null;
       
 28705     },
       
 28706     // @ts-expect-error Internal
       
 28707     __unstablePrivateStore: privateStore
       
 28708   });
       
 28709 }
       
 28710 
       
 28711 
       
 28712 
       
 28713 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js
       
 28714 "use client";
       
 28715 
       
 28716 // src/utils/array.ts
       
 28717 function toArray(arg) {
       
 28718   if (Array.isArray(arg)) {
       
 28719     return arg;
       
 28720   }
       
 28721   return typeof arg !== "undefined" ? [arg] : [];
       
 28722 }
       
 28723 function addItemToArray(array, item, index = -1) {
       
 28724   if (!(index in array)) {
       
 28725     return [...array, item];
       
 28726   }
       
 28727   return [...array.slice(0, index), item, ...array.slice(index)];
       
 28728 }
       
 28729 function flatten2DArray(array) {
       
 28730   const flattened = [];
       
 28731   for (const row of array) {
       
 28732     flattened.push(...row);
       
 28733   }
       
 28734   return flattened;
       
 28735 }
       
 28736 function reverseArray(array) {
       
 28737   return array.slice().reverse();
       
 28738 }
       
 28739 
       
 28740 
       
 28741 
       
 28742 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/IERTEJ3A.js
       
 28743 "use client";
       
 28744 
       
 28745 
       
 28746 
       
 28747 
       
 28748 
       
 28749 
       
 28750 // src/composite/composite-store.ts
       
 28751 var IERTEJ3A_NULL_ITEM = { id: null };
       
 28752 function IERTEJ3A_findFirstEnabledItem(items, excludeId) {
       
 28753   return items.find((item) => {
       
 28754     if (excludeId) {
       
 28755       return !item.disabled && item.id !== excludeId;
       
 28756     }
       
 28757     return !item.disabled;
       
 28758   });
       
 28759 }
       
 28760 function IERTEJ3A_getEnabledItems(items, excludeId) {
       
 28761   return items.filter((item) => {
       
 28762     if (excludeId) {
       
 28763       return !item.disabled && item.id !== excludeId;
       
 28764     }
       
 28765     return !item.disabled;
       
 28766   });
       
 28767 }
       
 28768 function getOppositeOrientation(orientation) {
       
 28769   if (orientation === "vertical")
       
 28770     return "horizontal";
       
 28771   if (orientation === "horizontal")
       
 28772     return "vertical";
       
 28773   return;
       
 28774 }
       
 28775 function getItemsInRow(items, rowId) {
       
 28776   return items.filter((item) => item.rowId === rowId);
       
 28777 }
       
 28778 function IERTEJ3A_flipItems(items, activeId, shouldInsertNullItem = false) {
       
 28779   const index = items.findIndex((item) => item.id === activeId);
       
 28780   return [
       
 28781     ...items.slice(index + 1),
       
 28782     ...shouldInsertNullItem ? [IERTEJ3A_NULL_ITEM] : [],
       
 28783     ...items.slice(0, index)
       
 28784   ];
       
 28785 }
       
 28786 function IERTEJ3A_groupItemsByRows(items) {
       
 28787   const rows = [];
       
 28788   for (const item of items) {
       
 28789     const row = rows.find((currentRow) => {
       
 28790       var _a;
       
 28791       return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
       
 28792     });
       
 28793     if (row) {
       
 28794       row.push(item);
       
 28795     } else {
       
 28796       rows.push([item]);
       
 28797     }
       
 28798   }
       
 28799   return rows;
       
 28800 }
       
 28801 function getMaxRowLength(array) {
       
 28802   let maxLength = 0;
       
 28803   for (const { length } of array) {
       
 28804     if (length > maxLength) {
       
 28805       maxLength = length;
       
 28806     }
       
 28807   }
       
 28808   return maxLength;
       
 28809 }
       
 28810 function createEmptyItem(rowId) {
       
 28811   return {
       
 28812     id: "__EMPTY_ITEM__",
       
 28813     disabled: true,
       
 28814     rowId
       
 28815   };
       
 28816 }
       
 28817 function normalizeRows(rows, activeId, focusShift) {
       
 28818   const maxLength = getMaxRowLength(rows);
       
 28819   for (const row of rows) {
       
 28820     for (let i = 0; i < maxLength; i += 1) {
       
 28821       const item = row[i];
       
 28822       if (!item || focusShift && item.disabled) {
       
 28823         const isFirst = i === 0;
       
 28824         const previousItem = isFirst && focusShift ? IERTEJ3A_findFirstEnabledItem(row) : row[i - 1];
       
 28825         row[i] = previousItem && activeId !== previousItem.id && focusShift ? previousItem : createEmptyItem(previousItem == null ? void 0 : previousItem.rowId);
       
 28826       }
       
 28827     }
       
 28828   }
       
 28829   return rows;
       
 28830 }
       
 28831 function verticalizeItems(items) {
       
 28832   const rows = IERTEJ3A_groupItemsByRows(items);
       
 28833   const maxLength = getMaxRowLength(rows);
       
 28834   const verticalized = [];
       
 28835   for (let i = 0; i < maxLength; i += 1) {
       
 28836     for (const row of rows) {
       
 28837       const item = row[i];
       
 28838       if (item) {
       
 28839         verticalized.push(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, item), {
       
 28840           // If there's no rowId, it means that it's not a grid composite, but
       
 28841           // a single row instead. So, instead of verticalizing it, that is,
       
 28842           // assigning a different rowId based on the column index, we keep it
       
 28843           // undefined so they will be part of the same row. This is useful
       
 28844           // when using up/down on one-dimensional composites.
       
 28845           rowId: item.rowId ? `${i}` : void 0
       
 28846         }));
       
 28847       }
       
 28848     }
       
 28849   }
       
 28850   return verticalized;
       
 28851 }
       
 28852 function createCompositeStore(props = {}) {
       
 28853   var _a;
       
 28854   const syncState = (_a = props.store) == null ? void 0 : _a.getState();
       
 28855   const collection = createCollectionStore(props);
       
 28856   const activeId = defaultValue(
       
 28857     props.activeId,
       
 28858     syncState == null ? void 0 : syncState.activeId,
       
 28859     props.defaultActiveId
       
 28860   );
       
 28861   const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, collection.getState()), {
       
 28862     activeId,
       
 28863     baseElement: defaultValue(syncState == null ? void 0 : syncState.baseElement, null),
       
 28864     includesBaseElement: defaultValue(
       
 28865       props.includesBaseElement,
       
 28866       syncState == null ? void 0 : syncState.includesBaseElement,
       
 28867       activeId === null
       
 28868     ),
       
 28869     moves: defaultValue(syncState == null ? void 0 : syncState.moves, 0),
       
 28870     orientation: defaultValue(
       
 28871       props.orientation,
       
 28872       syncState == null ? void 0 : syncState.orientation,
       
 28873       "both"
       
 28874     ),
       
 28875     rtl: defaultValue(props.rtl, syncState == null ? void 0 : syncState.rtl, false),
       
 28876     virtualFocus: defaultValue(
       
 28877       props.virtualFocus,
       
 28878       syncState == null ? void 0 : syncState.virtualFocus,
       
 28879       false
       
 28880     ),
       
 28881     focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
       
 28882     focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
       
 28883     focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
       
 28884   });
       
 28885   const composite = createStore(initialState, collection, props.store);
       
 28886   setup(
       
 28887     composite,
       
 28888     () => sync(composite, ["renderedItems", "activeId"], (state) => {
       
 28889       composite.setState("activeId", (activeId2) => {
       
 28890         var _a2;
       
 28891         if (activeId2 !== void 0)
       
 28892           return activeId2;
       
 28893         return (_a2 = IERTEJ3A_findFirstEnabledItem(state.renderedItems)) == null ? void 0 : _a2.id;
       
 28894       });
       
 28895     })
       
 28896   );
       
 28897   const getNextId = (items, orientation, hasNullItem, skip) => {
       
 28898     var _a2, _b;
       
 28899     const { activeId: activeId2, rtl, focusLoop, focusWrap, includesBaseElement } = composite.getState();
       
 28900     const isHorizontal = orientation !== "vertical";
       
 28901     const isRTL = rtl && isHorizontal;
       
 28902     const allItems = isRTL ? reverseArray(items) : items;
       
 28903     if (activeId2 == null) {
       
 28904       return (_a2 = IERTEJ3A_findFirstEnabledItem(allItems)) == null ? void 0 : _a2.id;
       
 28905     }
       
 28906     const activeItem = allItems.find((item) => item.id === activeId2);
       
 28907     if (!activeItem) {
       
 28908       return (_b = IERTEJ3A_findFirstEnabledItem(allItems)) == null ? void 0 : _b.id;
       
 28909     }
       
 28910     const isGrid = !!activeItem.rowId;
       
 28911     const activeIndex = allItems.indexOf(activeItem);
       
 28912     const nextItems = allItems.slice(activeIndex + 1);
       
 28913     const nextItemsInRow = getItemsInRow(nextItems, activeItem.rowId);
       
 28914     if (skip !== void 0) {
       
 28915       const nextEnabledItemsInRow = IERTEJ3A_getEnabledItems(nextItemsInRow, activeId2);
       
 28916       const nextItem2 = nextEnabledItemsInRow.slice(skip)[0] || // If we can't find an item, just return the last one.
       
 28917       nextEnabledItemsInRow[nextEnabledItemsInRow.length - 1];
       
 28918       return nextItem2 == null ? void 0 : nextItem2.id;
       
 28919     }
       
 28920     const oppositeOrientation = getOppositeOrientation(
       
 28921       // If it's a grid and orientation is not set, it's a next/previous call,
       
 28922       // which is inherently horizontal. up/down will call next with orientation
       
 28923       // set to vertical by default (see below on up/down methods).
       
 28924       isGrid ? orientation || "horizontal" : orientation
       
 28925     );
       
 28926     const canLoop = focusLoop && focusLoop !== oppositeOrientation;
       
 28927     const canWrap = isGrid && focusWrap && focusWrap !== oppositeOrientation;
       
 28928     hasNullItem = hasNullItem || !isGrid && canLoop && includesBaseElement;
       
 28929     if (canLoop) {
       
 28930       const loopItems = canWrap && !hasNullItem ? allItems : getItemsInRow(allItems, activeItem.rowId);
       
 28931       const sortedItems = IERTEJ3A_flipItems(loopItems, activeId2, hasNullItem);
       
 28932       const nextItem2 = IERTEJ3A_findFirstEnabledItem(sortedItems, activeId2);
       
 28933       return nextItem2 == null ? void 0 : nextItem2.id;
       
 28934     }
       
 28935     if (canWrap) {
       
 28936       const nextItem2 = IERTEJ3A_findFirstEnabledItem(
       
 28937         // We can use nextItems, which contains all the next items, including
       
 28938         // items from other rows, to wrap between rows. However, if there is a
       
 28939         // null item (the composite container), we'll only use the next items in
       
 28940         // the row. So moving next from the last item will focus on the
       
 28941         // composite container. On grid composites, horizontal navigation never
       
 28942         // focuses on the composite container, only vertical.
       
 28943         hasNullItem ? nextItemsInRow : nextItems,
       
 28944         activeId2
       
 28945       );
       
 28946       const nextId = hasNullItem ? (nextItem2 == null ? void 0 : nextItem2.id) || null : nextItem2 == null ? void 0 : nextItem2.id;
       
 28947       return nextId;
       
 28948     }
       
 28949     const nextItem = IERTEJ3A_findFirstEnabledItem(nextItemsInRow, activeId2);
       
 28950     if (!nextItem && hasNullItem) {
       
 28951       return null;
       
 28952     }
       
 28953     return nextItem == null ? void 0 : nextItem.id;
       
 28954   };
       
 28955   return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, collection), composite), {
       
 28956     setBaseElement: (element) => composite.setState("baseElement", element),
       
 28957     setActiveId: (id) => composite.setState("activeId", id),
       
 28958     move: (id) => {
       
 28959       if (id === void 0)
       
 28960         return;
       
 28961       composite.setState("activeId", id);
       
 28962       composite.setState("moves", (moves) => moves + 1);
       
 28963     },
       
 28964     first: () => {
       
 28965       var _a2;
       
 28966       return (_a2 = IERTEJ3A_findFirstEnabledItem(composite.getState().renderedItems)) == null ? void 0 : _a2.id;
       
 28967     },
       
 28968     last: () => {
       
 28969       var _a2;
       
 28970       return (_a2 = IERTEJ3A_findFirstEnabledItem(reverseArray(composite.getState().renderedItems))) == null ? void 0 : _a2.id;
       
 28971     },
       
 28972     next: (skip) => {
       
 28973       const { renderedItems, orientation } = composite.getState();
       
 28974       return getNextId(renderedItems, orientation, false, skip);
       
 28975     },
       
 28976     previous: (skip) => {
       
 28977       var _a2;
       
 28978       const { renderedItems, orientation, includesBaseElement } = composite.getState();
       
 28979       const isGrid = !!((_a2 = IERTEJ3A_findFirstEnabledItem(renderedItems)) == null ? void 0 : _a2.rowId);
       
 28980       const hasNullItem = !isGrid && includesBaseElement;
       
 28981       return getNextId(
       
 28982         reverseArray(renderedItems),
       
 28983         orientation,
       
 28984         hasNullItem,
       
 28985         skip
       
 28986       );
       
 28987     },
       
 28988     down: (skip) => {
       
 28989       const {
       
 28990         activeId: activeId2,
       
 28991         renderedItems,
       
 28992         focusShift,
       
 28993         focusLoop,
       
 28994         includesBaseElement
       
 28995       } = composite.getState();
       
 28996       const shouldShift = focusShift && !skip;
       
 28997       const verticalItems = verticalizeItems(
       
 28998         flatten2DArray(
       
 28999           normalizeRows(IERTEJ3A_groupItemsByRows(renderedItems), activeId2, shouldShift)
       
 29000         )
       
 29001       );
       
 29002       const canLoop = focusLoop && focusLoop !== "horizontal";
       
 29003       const hasNullItem = canLoop && includesBaseElement;
       
 29004       return getNextId(verticalItems, "vertical", hasNullItem, skip);
       
 29005     },
       
 29006     up: (skip) => {
       
 29007       const { activeId: activeId2, renderedItems, focusShift, includesBaseElement } = composite.getState();
       
 29008       const shouldShift = focusShift && !skip;
       
 29009       const verticalItems = verticalizeItems(
       
 29010         reverseArray(
       
 29011           flatten2DArray(
       
 29012             normalizeRows(
       
 29013               IERTEJ3A_groupItemsByRows(renderedItems),
       
 29014               activeId2,
       
 29015               shouldShift
       
 29016             )
       
 29017           )
       
 29018         )
       
 29019       );
       
 29020       const hasNullItem = includesBaseElement;
       
 29021       return getNextId(verticalItems, "vertical", hasNullItem, skip);
       
 29022     }
       
 29023   });
       
 29024 }
       
 29025 
       
 29026 
       
 29027 
       
 29028 ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/combobox/combobox-store.js
       
 29029 "use client";
       
 29030 
       
 29031 
       
 29032 
       
 29033 
       
 29034 
       
 29035 
       
 29036 
       
 29037 
       
 29038 
       
 29039 
       
 29040 
       
 29041 
       
 29042 // src/combobox/combobox-store.ts
       
 29043 var isSafariOnMobile = isSafari() && isTouchDevice();
       
 29044 function createComboboxStore(props = {}) {
       
 29045   var _a;
       
 29046   throwOnConflictingProps(props, props.store);
       
 29047   const syncState = (_a = props.store) == null ? void 0 : _a.getState();
       
 29048   const activeId = defaultValue(
       
 29049     props.activeId,
       
 29050     syncState == null ? void 0 : syncState.activeId,
       
 29051     props.defaultActiveId,
       
 29052     null
       
 29053   );
       
 29054   const composite = createCompositeStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), {
       
 29055     activeId,
       
 29056     includesBaseElement: defaultValue(
       
 29057       props.includesBaseElement,
       
 29058       syncState == null ? void 0 : syncState.includesBaseElement,
       
 29059       true
       
 29060     ),
       
 29061     orientation: defaultValue(
       
 29062       props.orientation,
       
 29063       syncState == null ? void 0 : syncState.orientation,
       
 29064       "vertical"
       
 29065     ),
       
 29066     focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),
       
 29067     focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),
       
 29068     virtualFocus: defaultValue(
       
 29069       props.virtualFocus,
       
 29070       syncState == null ? void 0 : syncState.virtualFocus,
       
 29071       !isSafariOnMobile
       
 29072     )
       
 29073   }));
       
 29074   const popover = createPopoverStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), {
       
 29075     placement: defaultValue(
       
 29076       props.placement,
       
 29077       syncState == null ? void 0 : syncState.placement,
       
 29078       "bottom-start"
       
 29079     )
       
 29080   }));
       
 29081   const value = defaultValue(
       
 29082     props.value,
       
 29083     syncState == null ? void 0 : syncState.value,
       
 29084     props.defaultValue,
       
 29085     ""
       
 29086   );
       
 29087   const selectedValue = defaultValue(
       
 29088     props.selectedValue,
       
 29089     syncState == null ? void 0 : syncState.selectedValue,
       
 29090     props.defaultSelectedValue,
       
 29091     ""
       
 29092   );
       
 29093   const multiSelectable = Array.isArray(selectedValue);
       
 29094   const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, composite.getState()), popover.getState()), {
       
 29095     value,
       
 29096     selectedValue,
       
 29097     resetValueOnSelect: defaultValue(
       
 29098       props.resetValueOnSelect,
       
 29099       syncState == null ? void 0 : syncState.resetValueOnSelect,
       
 29100       multiSelectable
       
 29101     ),
       
 29102     resetValueOnHide: defaultValue(
       
 29103       props.resetValueOnHide,
       
 29104       syncState == null ? void 0 : syncState.resetValueOnHide,
       
 29105       multiSelectable
       
 29106     ),
       
 29107     activeValue: syncState == null ? void 0 : syncState.activeValue
       
 29108   });
       
 29109   const combobox = createStore(initialState, composite, popover, props.store);
       
 29110   setup(
       
 29111     combobox,
       
 29112     () => sync(combobox, ["resetValueOnHide", "mounted"], (state) => {
       
 29113       if (!state.resetValueOnHide)
       
 29114         return;
       
 29115       if (state.mounted)
       
 29116         return;
       
 29117       combobox.setState("value", value);
       
 29118     })
       
 29119   );
       
 29120   setup(
       
 29121     combobox,
       
 29122     () => sync(combobox, ["resetValueOnSelect", "selectedValue"], (state) => {
       
 29123       if (!state.resetValueOnSelect)
       
 29124         return;
       
 29125       combobox.setState("value", value);
       
 29126     })
       
 29127   );
       
 29128   setup(
       
 29129     combobox,
       
 29130     () => batch(combobox, ["mounted"], (state) => {
       
 29131       if (state.mounted)
       
 29132         return;
       
 29133       combobox.setState("activeId", activeId);
       
 29134       combobox.setState("moves", 0);
       
 29135     })
       
 29136   );
       
 29137   setup(
       
 29138     combobox,
       
 29139     () => sync(combobox, ["moves", "activeId"], (state, prevState) => {
       
 29140       if (state.moves === prevState.moves) {
       
 29141         combobox.setState("activeValue", void 0);
       
 29142       }
       
 29143     })
       
 29144   );
       
 29145   setup(
       
 29146     combobox,
       
 29147     () => batch(combobox, ["moves", "renderedItems"], (state, prev) => {
       
 29148       if (state.moves === prev.moves)
       
 29149         return;
       
 29150       const { activeId: activeId2 } = combobox.getState();
       
 29151       const activeItem = composite.item(activeId2);
       
 29152       combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
       
 29153     })
       
 29154   );
       
 29155   return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, popover), composite), combobox), {
       
 29156     setValue: (value2) => combobox.setState("value", value2),
       
 29157     setSelectedValue: (selectedValue2) => combobox.setState("selectedValue", selectedValue2)
       
 29158   });
       
 29159 }
       
 29160 
       
 29161 
       
 29162 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/ZKJ2WLF7.js
       
 29163 "use client";
       
 29164 
       
 29165 
       
 29166 
       
 29167 
       
 29168 // src/combobox/combobox-store.ts
       
 29169 
       
 29170 function useComboboxStoreProps(store, update, props) {
       
 29171   store = usePopoverStoreProps(store, update, props);
       
 29172   store = useCompositeStoreProps(store, update, props);
       
 29173   useStoreProps(store, props, "value", "setValue");
       
 29174   useStoreProps(store, props, "selectedValue", "setSelectedValue");
       
 29175   useStoreProps(store, props, "resetValueOnHide");
       
 29176   useStoreProps(store, props, "resetValueOnSelect");
       
 29177   return store;
       
 29178 }
       
 29179 function useComboboxStore(props = {}) {
       
 29180   const [store, update] = EKQEJRUF_useStore(createComboboxStore, props);
       
 29181   return useComboboxStoreProps(store, update, props);
       
 29182 }
       
 29183 
       
 29184 
       
 29185 
       
 29186 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/OAYFXAQ2.js
       
 29187 "use client";
       
 29188 
       
 29189 
       
 29190 // src/disclosure/disclosure-context.tsx
       
 29191 var OAYFXAQ2_ctx = createStoreContext();
       
 29192 var useDisclosureContext = OAYFXAQ2_ctx.useContext;
       
 29193 var useDisclosureScopedContext = OAYFXAQ2_ctx.useScopedContext;
       
 29194 var useDisclosureProviderContext = OAYFXAQ2_ctx.useProviderContext;
       
 29195 var DisclosureContextProvider = OAYFXAQ2_ctx.ContextProvider;
       
 29196 var DisclosureScopedContextProvider = OAYFXAQ2_ctx.ScopedContextProvider;
       
 29197 
       
 29198 
       
 29199 
       
 29200 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/G6BJYYBK.js
       
 29201 "use client";
       
 29202 
       
 29203 
       
 29204 
       
 29205 // src/dialog/dialog-context.tsx
       
 29206 
       
 29207 var G6BJYYBK_ctx = createStoreContext(
       
 29208   [DisclosureContextProvider],
       
 29209   [DisclosureScopedContextProvider]
       
 29210 );
       
 29211 var useDialogContext = G6BJYYBK_ctx.useContext;
       
 29212 var useDialogScopedContext = G6BJYYBK_ctx.useScopedContext;
       
 29213 var useDialogProviderContext = G6BJYYBK_ctx.useProviderContext;
       
 29214 var DialogContextProvider = G6BJYYBK_ctx.ContextProvider;
       
 29215 var DialogScopedContextProvider = G6BJYYBK_ctx.ScopedContextProvider;
       
 29216 var DialogHeadingContext = (0,external_React_.createContext)(void 0);
       
 29217 var DialogDescriptionContext = (0,external_React_.createContext)(void 0);
       
 29218 
       
 29219 
       
 29220 
       
 29221 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/7H5KSHHF.js
       
 29222 "use client";
       
 29223 
       
 29224 
       
 29225 
       
 29226 // src/popover/popover-context.tsx
       
 29227 var _7H5KSHHF_ctx = createStoreContext(
       
 29228   [DialogContextProvider],
       
 29229   [DialogScopedContextProvider]
       
 29230 );
       
 29231 var usePopoverContext = _7H5KSHHF_ctx.useContext;
       
 29232 var usePopoverScopedContext = _7H5KSHHF_ctx.useScopedContext;
       
 29233 var usePopoverProviderContext = _7H5KSHHF_ctx.useProviderContext;
       
 29234 var PopoverContextProvider = _7H5KSHHF_ctx.ContextProvider;
       
 29235 var PopoverScopedContextProvider = _7H5KSHHF_ctx.ScopedContextProvider;
       
 29236 
       
 29237 
       
 29238 
       
 29239 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/W76OTZCC.js
       
 29240 "use client";
       
 29241 
       
 29242 
       
 29243 
       
 29244 
       
 29245 // src/combobox/combobox-context.tsx
       
 29246 
       
 29247 var W76OTZCC_ctx = createStoreContext(
       
 29248   [PopoverContextProvider, CompositeContextProvider],
       
 29249   [PopoverScopedContextProvider, CompositeScopedContextProvider]
       
 29250 );
       
 29251 var useComboboxContext = W76OTZCC_ctx.useContext;
       
 29252 var useComboboxScopedContext = W76OTZCC_ctx.useScopedContext;
       
 29253 var useComboboxProviderContext = W76OTZCC_ctx.useProviderContext;
       
 29254 var ComboboxContextProvider = W76OTZCC_ctx.ContextProvider;
       
 29255 var ComboboxScopedContextProvider = W76OTZCC_ctx.ScopedContextProvider;
       
 29256 var ComboboxItemValueContext = (0,external_React_.createContext)(
       
 29257   void 0
       
 29258 );
       
 29259 var ComboboxItemCheckedContext = (0,external_React_.createContext)(false);
       
 29260 
       
 29261 
       
 29262 
       
 29263 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/combobox/combobox-provider.js
       
 29264 "use client";
       
 29265 
       
 29266 
       
 29267 
       
 29268 
       
 29269 
       
 29270 
       
 29271 
       
 29272 
       
 29273 
       
 29274 
       
 29275 
       
 29276 
       
 29277 
       
 29278 
       
 29279 
       
 29280 
       
 29281 
       
 29282 
       
 29283 // src/combobox/combobox-provider.tsx
       
 29284 
       
 29285 function ComboboxProvider(props = {}) {
       
 29286   const store = useComboboxStore(props);
       
 29287   return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ComboboxContextProvider, { value: store, children: props.children });
       
 29288 }
       
 29289 
       
 29290 
       
 29291 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/combobox/combobox-label.js
       
 29292 "use client";
       
 29293 
       
 29294 
       
 29295 
       
 29296 
       
 29297 
       
 29298 
       
 29299 
       
 29300 
       
 29301 
       
 29302 
       
 29303 
       
 29304 // src/combobox/combobox-label.ts
       
 29305 
       
 29306 var useComboboxLabel = createHook(
       
 29307   (_a) => {
       
 29308     var _b = _a, { store } = _b, props = __objRest(_b, ["store"]);
       
 29309     const context = useComboboxProviderContext();
       
 29310     store = store || context;
       
 29311     invariant(
       
 29312       store,
       
 29313        false && 0
       
 29314     );
       
 29315     const comboboxId = store.useState((state) => {
       
 29316       var _a2;
       
 29317       return (_a2 = state.baseElement) == null ? void 0 : _a2.id;
       
 29318     });
       
 29319     props = _4R3V3JGP_spreadValues({
       
 29320       htmlFor: comboboxId
       
 29321     }, props);
       
 29322     return props;
       
 29323   }
       
 29324 );
       
 29325 var ComboboxLabel = createMemoComponent(
       
 29326   (props) => {
       
 29327     const htmlProps = useComboboxLabel(props);
       
 29328     return createElement("label", htmlProps);
       
 29329   }
       
 29330 );
       
 29331 if (false) {}
       
 29332 
       
 29333 
       
 29334 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/JCH6MLL2.js
       
 29335 "use client";
       
 29336 
       
 29337 
       
 29338 
       
 29339 
       
 29340 
       
 29341 // src/popover/popover-anchor.ts
       
 29342 var usePopoverAnchor = createHook(
       
 29343   (_a) => {
       
 29344     var _b = _a, { store } = _b, props = __objRest(_b, ["store"]);
       
 29345     const context = usePopoverProviderContext();
       
 29346     store = store || context;
       
 29347     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), {
       
 29348       ref: useMergeRefs(store == null ? void 0 : store.setAnchorElement, props.ref)
       
 29349     });
       
 29350     return props;
       
 29351   }
       
 29352 );
       
 29353 var PopoverAnchor = createComponent((props) => {
       
 29354   const htmlProps = usePopoverAnchor(props);
       
 29355   return createElement("div", htmlProps);
       
 29356 });
       
 29357 if (false) {}
       
 29358 
       
 29359 
       
 29360 
       
 29361 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/SHA3WOPI.js
       
 29362 "use client";
       
 29363 
       
 29364 // src/focusable/focusable-context.ts
       
 29365 
       
 29366 var FocusableContext = (0,external_React_.createContext)(true);
       
 29367 
       
 29368 
       
 29369 
       
 29370 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/KK7H3W2B.js
       
 29371 "use client";
       
 29372 
       
 29373 
       
 29374 
       
 29375 
       
 29376 
       
 29377 // src/focusable/focusable.ts
       
 29378 
       
 29379 
       
 29380 
       
 29381 
       
 29382 
       
 29383 
       
 29384 var isSafariBrowser = isSafari();
       
 29385 var alwaysFocusVisibleInputTypes = [
       
 29386   "text",
       
 29387   "search",
       
 29388   "url",
       
 29389   "tel",
       
 29390   "email",
       
 29391   "password",
       
 29392   "number",
       
 29393   "date",
       
 29394   "month",
       
 29395   "week",
       
 29396   "time",
       
 29397   "datetime",
       
 29398   "datetime-local"
       
 29399 ];
       
 29400 function isAlwaysFocusVisible(element) {
       
 29401   const { tagName, readOnly, type } = element;
       
 29402   if (tagName === "TEXTAREA" && !readOnly)
       
 29403     return true;
       
 29404   if (tagName === "SELECT" && !readOnly)
       
 29405     return true;
       
 29406   if (tagName === "INPUT" && !readOnly) {
       
 29407     return alwaysFocusVisibleInputTypes.includes(type);
       
 29408   }
       
 29409   if (element.isContentEditable)
       
 29410     return true;
       
 29411   return false;
       
 29412 }
       
 29413 function isAlwaysFocusVisibleDelayed(element) {
       
 29414   const role = element.getAttribute("role");
       
 29415   if (role !== "combobox")
       
 29416     return false;
       
 29417   return !!element.dataset.name;
       
 29418 }
       
 29419 function getLabels(element) {
       
 29420   if ("labels" in element) {
       
 29421     return element.labels;
       
 29422   }
       
 29423   return null;
       
 29424 }
       
 29425 function isNativeCheckboxOrRadio(element) {
       
 29426   const tagName = element.tagName.toLowerCase();
       
 29427   if (tagName === "input" && element.type) {
       
 29428     return element.type === "radio" || element.type === "checkbox";
       
 29429   }
       
 29430   return false;
       
 29431 }
       
 29432 function isNativeTabbable(tagName) {
       
 29433   if (!tagName)
       
 29434     return true;
       
 29435   return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea" || tagName === "a";
       
 29436 }
       
 29437 function supportsDisabledAttribute(tagName) {
       
 29438   if (!tagName)
       
 29439     return true;
       
 29440   return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea";
       
 29441 }
       
 29442 function getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) {
       
 29443   if (!focusable) {
       
 29444     return tabIndexProp;
       
 29445   }
       
 29446   if (trulyDisabled) {
       
 29447     if (nativeTabbable && !supportsDisabled) {
       
 29448       return -1;
       
 29449     }
       
 29450     return;
       
 29451   }
       
 29452   if (nativeTabbable) {
       
 29453     return tabIndexProp;
       
 29454   }
       
 29455   return tabIndexProp || 0;
       
 29456 }
       
 29457 function useDisableEvent(onEvent, disabled) {
       
 29458   return useEvent((event) => {
       
 29459     onEvent == null ? void 0 : onEvent(event);
       
 29460     if (event.defaultPrevented)
       
 29461       return;
       
 29462     if (disabled) {
       
 29463       event.stopPropagation();
       
 29464       event.preventDefault();
       
 29465     }
       
 29466   });
       
 29467 }
       
 29468 var isKeyboardModality = true;
       
 29469 function onGlobalMouseDown(event) {
       
 29470   const target = event.target;
       
 29471   if (target && "hasAttribute" in target) {
       
 29472     if (!target.hasAttribute("data-focus-visible")) {
       
 29473       isKeyboardModality = false;
       
 29474     }
       
 29475   }
       
 29476 }
       
 29477 function onGlobalKeyDown(event) {
       
 29478   if (event.metaKey)
       
 29479     return;
       
 29480   if (event.ctrlKey)
       
 29481     return;
       
 29482   if (event.altKey)
       
 29483     return;
       
 29484   isKeyboardModality = true;
       
 29485 }
       
 29486 var useFocusable = createHook(
       
 29487   (_a) => {
       
 29488     var _b = _a, {
       
 29489       focusable = true,
       
 29490       accessibleWhenDisabled,
       
 29491       autoFocus,
       
 29492       onFocusVisible
       
 29493     } = _b, props = __objRest(_b, [
       
 29494       "focusable",
       
 29495       "accessibleWhenDisabled",
       
 29496       "autoFocus",
       
 29497       "onFocusVisible"
       
 29498     ]);
       
 29499     const ref = (0,external_React_.useRef)(null);
       
 29500     (0,external_React_.useEffect)(() => {
       
 29501       if (!focusable)
       
 29502         return;
       
 29503       addGlobalEventListener("mousedown", onGlobalMouseDown, true);
       
 29504       addGlobalEventListener("keydown", onGlobalKeyDown, true);
       
 29505     }, [focusable]);
       
 29506     if (isSafariBrowser) {
       
 29507       (0,external_React_.useEffect)(() => {
       
 29508         if (!focusable)
       
 29509           return;
       
 29510         const element = ref.current;
       
 29511         if (!element)
       
 29512           return;
       
 29513         if (!isNativeCheckboxOrRadio(element))
       
 29514           return;
       
 29515         const labels = getLabels(element);
       
 29516         if (!labels)
       
 29517           return;
       
 29518         const onMouseUp = () => queueMicrotask(() => element.focus());
       
 29519         labels.forEach((label) => label.addEventListener("mouseup", onMouseUp));
       
 29520         return () => {
       
 29521           labels.forEach(
       
 29522             (label) => label.removeEventListener("mouseup", onMouseUp)
       
 29523           );
       
 29524         };
       
 29525       }, [focusable]);
       
 29526     }
       
 29527     const disabled = focusable && disabledFromProps(props);
       
 29528     const trulyDisabled = !!disabled && !accessibleWhenDisabled;
       
 29529     const [focusVisible, setFocusVisible] = (0,external_React_.useState)(false);
       
 29530     (0,external_React_.useEffect)(() => {
       
 29531       if (!focusable)
       
 29532         return;
       
 29533       if (trulyDisabled && focusVisible) {
       
 29534         setFocusVisible(false);
       
 29535       }
       
 29536     }, [focusable, trulyDisabled, focusVisible]);
       
 29537     (0,external_React_.useEffect)(() => {
       
 29538       if (!focusable)
       
 29539         return;
       
 29540       if (!focusVisible)
       
 29541         return;
       
 29542       const element = ref.current;
       
 29543       if (!element)
       
 29544         return;
       
 29545       if (typeof IntersectionObserver === "undefined")
       
 29546         return;
       
 29547       const observer = new IntersectionObserver(() => {
       
 29548         if (!isFocusable(element)) {
       
 29549           setFocusVisible(false);
       
 29550         }
       
 29551       });
       
 29552       observer.observe(element);
       
 29553       return () => observer.disconnect();
       
 29554     }, [focusable, focusVisible]);
       
 29555     const onKeyPressCapture = useDisableEvent(
       
 29556       props.onKeyPressCapture,
       
 29557       disabled
       
 29558     );
       
 29559     const onMouseDownCapture = useDisableEvent(
       
 29560       props.onMouseDownCapture,
       
 29561       disabled
       
 29562     );
       
 29563     const onClickCapture = useDisableEvent(props.onClickCapture, disabled);
       
 29564     const onMouseDownProp = props.onMouseDown;
       
 29565     const onMouseDown = useEvent((event) => {
       
 29566       onMouseDownProp == null ? void 0 : onMouseDownProp(event);
       
 29567       if (event.defaultPrevented)
       
 29568         return;
       
 29569       if (!focusable)
       
 29570         return;
       
 29571       const element = event.currentTarget;
       
 29572       if (!isSafariBrowser)
       
 29573         return;
       
 29574       if (isPortalEvent(event))
       
 29575         return;
       
 29576       if (!isButton(element) && !isNativeCheckboxOrRadio(element))
       
 29577         return;
       
 29578       let receivedFocus = false;
       
 29579       const onFocus = () => {
       
 29580         receivedFocus = true;
       
 29581       };
       
 29582       const options = { capture: true, once: true };
       
 29583       element.addEventListener("focusin", onFocus, options);
       
 29584       queueBeforeEvent(element, "mouseup", () => {
       
 29585         element.removeEventListener("focusin", onFocus, true);
       
 29586         if (receivedFocus)
       
 29587           return;
       
 29588         focusIfNeeded(element);
       
 29589       });
       
 29590     });
       
 29591     const handleFocusVisible = (event, currentTarget) => {
       
 29592       if (currentTarget) {
       
 29593         event.currentTarget = currentTarget;
       
 29594       }
       
 29595       if (!focusable)
       
 29596         return;
       
 29597       const element = event.currentTarget;
       
 29598       if (!element)
       
 29599         return;
       
 29600       if (!hasFocus(element))
       
 29601         return;
       
 29602       onFocusVisible == null ? void 0 : onFocusVisible(event);
       
 29603       if (event.defaultPrevented)
       
 29604         return;
       
 29605       setFocusVisible(true);
       
 29606     };
       
 29607     const onKeyDownCaptureProp = props.onKeyDownCapture;
       
 29608     const onKeyDownCapture = useEvent(
       
 29609       (event) => {
       
 29610         onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);
       
 29611         if (event.defaultPrevented)
       
 29612           return;
       
 29613         if (!focusable)
       
 29614           return;
       
 29615         if (focusVisible)
       
 29616           return;
       
 29617         if (event.metaKey)
       
 29618           return;
       
 29619         if (event.altKey)
       
 29620           return;
       
 29621         if (event.ctrlKey)
       
 29622           return;
       
 29623         if (!isSelfTarget(event))
       
 29624           return;
       
 29625         const element = event.currentTarget;
       
 29626         queueMicrotask(() => handleFocusVisible(event, element));
       
 29627       }
       
 29628     );
       
 29629     const onFocusCaptureProp = props.onFocusCapture;
       
 29630     const onFocusCapture = useEvent((event) => {
       
 29631       onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
       
 29632       if (event.defaultPrevented)
       
 29633         return;
       
 29634       if (!focusable)
       
 29635         return;
       
 29636       if (!isSelfTarget(event)) {
       
 29637         setFocusVisible(false);
       
 29638         return;
       
 29639       }
       
 29640       const element = event.currentTarget;
       
 29641       const applyFocusVisible = () => handleFocusVisible(event, element);
       
 29642       if (isKeyboardModality || isAlwaysFocusVisible(event.target)) {
       
 29643         queueMicrotask(applyFocusVisible);
       
 29644       } else if (isAlwaysFocusVisibleDelayed(event.target)) {
       
 29645         queueBeforeEvent(event.target, "focusout", applyFocusVisible);
       
 29646       } else {
       
 29647         setFocusVisible(false);
       
 29648       }
       
 29649     });
       
 29650     const onBlurProp = props.onBlur;
       
 29651     const onBlur = useEvent((event) => {
       
 29652       onBlurProp == null ? void 0 : onBlurProp(event);
       
 29653       if (!focusable)
       
 29654         return;
       
 29655       if (!isFocusEventOutside(event))
       
 29656         return;
       
 29657       setFocusVisible(false);
       
 29658     });
       
 29659     const autoFocusOnShow = (0,external_React_.useContext)(FocusableContext);
       
 29660     const autoFocusRef = useEvent((element) => {
       
 29661       if (!focusable)
       
 29662         return;
       
 29663       if (!autoFocus)
       
 29664         return;
       
 29665       if (!element)
       
 29666         return;
       
 29667       if (!autoFocusOnShow)
       
 29668         return;
       
 29669       queueMicrotask(() => {
       
 29670         if (hasFocus(element))
       
 29671           return;
       
 29672         if (!isFocusable(element))
       
 29673           return;
       
 29674         element.focus();
       
 29675       });
       
 29676     });
       
 29677     const tagName = useTagName(ref, props.as);
       
 29678     const nativeTabbable = focusable && isNativeTabbable(tagName);
       
 29679     const supportsDisabled = focusable && supportsDisabledAttribute(tagName);
       
 29680     const style = trulyDisabled ? _4R3V3JGP_spreadValues({ pointerEvents: "none" }, props.style) : props.style;
       
 29681     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 29682       "data-focus-visible": focusable && focusVisible ? "" : void 0,
       
 29683       "data-autofocus": autoFocus ? true : void 0,
       
 29684       "aria-disabled": disabled ? true : void 0
       
 29685     }, props), {
       
 29686       ref: useMergeRefs(ref, autoFocusRef, props.ref),
       
 29687       style,
       
 29688       tabIndex: getTabIndex(
       
 29689         focusable,
       
 29690         trulyDisabled,
       
 29691         nativeTabbable,
       
 29692         supportsDisabled,
       
 29693         props.tabIndex
       
 29694       ),
       
 29695       disabled: supportsDisabled && trulyDisabled ? true : void 0,
       
 29696       // TODO: Test Focusable contentEditable.
       
 29697       contentEditable: disabled ? void 0 : props.contentEditable,
       
 29698       onKeyPressCapture,
       
 29699       onClickCapture,
       
 29700       onMouseDownCapture,
       
 29701       onMouseDown,
       
 29702       onKeyDownCapture,
       
 29703       onFocusCapture,
       
 29704       onBlur
       
 29705     });
       
 29706     return props;
       
 29707   }
       
 29708 );
       
 29709 var Focusable = createComponent((props) => {
       
 29710   props = useFocusable(props);
       
 29711   return createElement("div", props);
       
 29712 });
       
 29713 if (false) {}
       
 29714 
       
 29715 
       
 29716 
       
 29717 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/7QTPYGNZ.js
       
 29718 "use client";
       
 29719 
       
 29720 
       
 29721 
       
 29722 
       
 29723 
       
 29724 
       
 29725 
       
 29726 // src/composite/composite.tsx
       
 29727 
       
 29728 
       
 29729 
       
 29730 
       
 29731 
       
 29732 
       
 29733 
       
 29734 function isGrid(items) {
       
 29735   return items.some((item) => !!item.rowId);
       
 29736 }
       
 29737 function isPrintableKey(event) {
       
 29738   const target = event.target;
       
 29739   if (target && !DLOEKDPY_isTextField(target))
       
 29740     return false;
       
 29741   return event.key.length === 1 && !event.ctrlKey && !event.metaKey;
       
 29742 }
       
 29743 function isModifierKey(event) {
       
 29744   return event.key === "Shift" || event.key === "Control" || event.key === "Alt" || event.key === "Meta";
       
 29745 }
       
 29746 function useKeyboardEventProxy(store, onKeyboardEvent, previousElementRef) {
       
 29747   return useEvent((event) => {
       
 29748     var _a;
       
 29749     onKeyboardEvent == null ? void 0 : onKeyboardEvent(event);
       
 29750     if (event.defaultPrevented)
       
 29751       return;
       
 29752     if (event.isPropagationStopped())
       
 29753       return;
       
 29754     if (!isSelfTarget(event))
       
 29755       return;
       
 29756     if (isModifierKey(event))
       
 29757       return;
       
 29758     if (isPrintableKey(event))
       
 29759       return;
       
 29760     const state = store.getState();
       
 29761     const activeElement = (_a = getEnabledItem(store, state.activeId)) == null ? void 0 : _a.element;
       
 29762     if (!activeElement)
       
 29763       return;
       
 29764     const _b = event, { view } = _b, eventInit = __objRest(_b, ["view"]);
       
 29765     const previousElement = previousElementRef == null ? void 0 : previousElementRef.current;
       
 29766     if (activeElement !== previousElement) {
       
 29767       activeElement.focus();
       
 29768     }
       
 29769     if (!fireKeyboardEvent(activeElement, event.type, eventInit)) {
       
 29770       event.preventDefault();
       
 29771     }
       
 29772     if (event.currentTarget.contains(activeElement)) {
       
 29773       event.stopPropagation();
       
 29774     }
       
 29775   });
       
 29776 }
       
 29777 function findFirstEnabledItemInTheLastRow(items) {
       
 29778   return findFirstEnabledItem(
       
 29779     flatten2DArray(reverseArray(groupItemsByRows(items)))
       
 29780   );
       
 29781 }
       
 29782 function useScheduleFocus(store) {
       
 29783   const [scheduled, setScheduled] = (0,external_React_.useState)(false);
       
 29784   const schedule = (0,external_React_.useCallback)(() => setScheduled(true), []);
       
 29785   const activeItem = store.useState(
       
 29786     (state) => getEnabledItem(store, state.activeId)
       
 29787   );
       
 29788   (0,external_React_.useEffect)(() => {
       
 29789     const activeElement = activeItem == null ? void 0 : activeItem.element;
       
 29790     if (!scheduled)
       
 29791       return;
       
 29792     if (!activeElement)
       
 29793       return;
       
 29794     setScheduled(false);
       
 29795     activeElement.focus({ preventScroll: true });
       
 29796   }, [activeItem, scheduled]);
       
 29797   return schedule;
       
 29798 }
       
 29799 var useComposite = createHook(
       
 29800   (_a) => {
       
 29801     var _b = _a, {
       
 29802       store,
       
 29803       composite = true,
       
 29804       focusOnMove = composite,
       
 29805       moveOnKeyPress = true
       
 29806     } = _b, props = __objRest(_b, [
       
 29807       "store",
       
 29808       "composite",
       
 29809       "focusOnMove",
       
 29810       "moveOnKeyPress"
       
 29811     ]);
       
 29812     const context = useCompositeProviderContext();
       
 29813     store = store || context;
       
 29814     invariant(
       
 29815       store,
       
 29816        false && 0
       
 29817     );
       
 29818     const previousElementRef = (0,external_React_.useRef)(null);
       
 29819     const scheduleFocus = useScheduleFocus(store);
       
 29820     const moves = store.useState("moves");
       
 29821     (0,external_React_.useEffect)(() => {
       
 29822       var _a2;
       
 29823       if (!store)
       
 29824         return;
       
 29825       if (!moves)
       
 29826         return;
       
 29827       if (!composite)
       
 29828         return;
       
 29829       if (!focusOnMove)
       
 29830         return;
       
 29831       const { activeId: activeId2 } = store.getState();
       
 29832       const itemElement = (_a2 = getEnabledItem(store, activeId2)) == null ? void 0 : _a2.element;
       
 29833       if (!itemElement)
       
 29834         return;
       
 29835       focusIntoView(itemElement);
       
 29836     }, [store, moves, composite, focusOnMove]);
       
 29837     useSafeLayoutEffect(() => {
       
 29838       if (!store)
       
 29839         return;
       
 29840       if (!moves)
       
 29841         return;
       
 29842       if (!composite)
       
 29843         return;
       
 29844       const { baseElement, activeId: activeId2 } = store.getState();
       
 29845       const isSelfAcive = activeId2 === null;
       
 29846       if (!isSelfAcive)
       
 29847         return;
       
 29848       if (!baseElement)
       
 29849         return;
       
 29850       const previousElement = previousElementRef.current;
       
 29851       previousElementRef.current = null;
       
 29852       if (previousElement) {
       
 29853         fireBlurEvent(previousElement, { relatedTarget: baseElement });
       
 29854       }
       
 29855       if (!hasFocus(baseElement)) {
       
 29856         baseElement.focus();
       
 29857       }
       
 29858     }, [store, moves, composite]);
       
 29859     const activeId = store.useState("activeId");
       
 29860     const virtualFocus = store.useState("virtualFocus");
       
 29861     useSafeLayoutEffect(() => {
       
 29862       var _a2;
       
 29863       if (!store)
       
 29864         return;
       
 29865       if (!composite)
       
 29866         return;
       
 29867       if (!virtualFocus)
       
 29868         return;
       
 29869       const previousElement = previousElementRef.current;
       
 29870       previousElementRef.current = null;
       
 29871       if (!previousElement)
       
 29872         return;
       
 29873       const activeElement = (_a2 = getEnabledItem(store, activeId)) == null ? void 0 : _a2.element;
       
 29874       const relatedTarget = activeElement || DLOEKDPY_getActiveElement(previousElement);
       
 29875       if (relatedTarget === previousElement)
       
 29876         return;
       
 29877       fireBlurEvent(previousElement, { relatedTarget });
       
 29878     }, [store, activeId, virtualFocus, composite]);
       
 29879     const onKeyDownCapture = useKeyboardEventProxy(
       
 29880       store,
       
 29881       props.onKeyDownCapture,
       
 29882       previousElementRef
       
 29883     );
       
 29884     const onKeyUpCapture = useKeyboardEventProxy(
       
 29885       store,
       
 29886       props.onKeyUpCapture,
       
 29887       previousElementRef
       
 29888     );
       
 29889     const onFocusCaptureProp = props.onFocusCapture;
       
 29890     const onFocusCapture = useEvent((event) => {
       
 29891       onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
       
 29892       if (event.defaultPrevented)
       
 29893         return;
       
 29894       if (!store)
       
 29895         return;
       
 29896       const { virtualFocus: virtualFocus2 } = store.getState();
       
 29897       if (!virtualFocus2)
       
 29898         return;
       
 29899       const previousActiveElement = event.relatedTarget;
       
 29900       const isSilentlyFocused = silentlyFocused(event.currentTarget);
       
 29901       if (isSelfTarget(event) && isSilentlyFocused) {
       
 29902         event.stopPropagation();
       
 29903         previousElementRef.current = previousActiveElement;
       
 29904       }
       
 29905     });
       
 29906     const onFocusProp = props.onFocus;
       
 29907     const onFocus = useEvent((event) => {
       
 29908       onFocusProp == null ? void 0 : onFocusProp(event);
       
 29909       if (event.defaultPrevented)
       
 29910         return;
       
 29911       if (!composite)
       
 29912         return;
       
 29913       if (!store)
       
 29914         return;
       
 29915       const { relatedTarget } = event;
       
 29916       const { virtualFocus: virtualFocus2 } = store.getState();
       
 29917       if (virtualFocus2) {
       
 29918         if (isSelfTarget(event) && !isItem(store, relatedTarget)) {
       
 29919           queueMicrotask(scheduleFocus);
       
 29920         }
       
 29921       } else if (isSelfTarget(event)) {
       
 29922         store.setActiveId(null);
       
 29923       }
       
 29924     });
       
 29925     const onBlurCaptureProp = props.onBlurCapture;
       
 29926     const onBlurCapture = useEvent((event) => {
       
 29927       var _a2;
       
 29928       onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
       
 29929       if (event.defaultPrevented)
       
 29930         return;
       
 29931       if (!store)
       
 29932         return;
       
 29933       const { virtualFocus: virtualFocus2, activeId: activeId2 } = store.getState();
       
 29934       if (!virtualFocus2)
       
 29935         return;
       
 29936       const activeElement = (_a2 = getEnabledItem(store, activeId2)) == null ? void 0 : _a2.element;
       
 29937       const nextActiveElement = event.relatedTarget;
       
 29938       const nextActiveElementIsItem = isItem(store, nextActiveElement);
       
 29939       const previousElement = previousElementRef.current;
       
 29940       previousElementRef.current = null;
       
 29941       if (isSelfTarget(event) && nextActiveElementIsItem) {
       
 29942         if (nextActiveElement === activeElement) {
       
 29943           if (previousElement && previousElement !== nextActiveElement) {
       
 29944             fireBlurEvent(previousElement, event);
       
 29945           }
       
 29946         } else if (activeElement) {
       
 29947           fireBlurEvent(activeElement, event);
       
 29948         } else if (previousElement) {
       
 29949           fireBlurEvent(previousElement, event);
       
 29950         }
       
 29951         event.stopPropagation();
       
 29952       } else {
       
 29953         const targetIsItem = isItem(store, event.target);
       
 29954         if (!targetIsItem && activeElement) {
       
 29955           fireBlurEvent(activeElement, event);
       
 29956         }
       
 29957       }
       
 29958     });
       
 29959     const onKeyDownProp = props.onKeyDown;
       
 29960     const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
       
 29961     const onKeyDown = useEvent((event) => {
       
 29962       var _a2;
       
 29963       onKeyDownProp == null ? void 0 : onKeyDownProp(event);
       
 29964       if (event.defaultPrevented)
       
 29965         return;
       
 29966       if (!store)
       
 29967         return;
       
 29968       if (!isSelfTarget(event))
       
 29969         return;
       
 29970       const { orientation, items, renderedItems, activeId: activeId2 } = store.getState();
       
 29971       const activeItem = getEnabledItem(store, activeId2);
       
 29972       if ((_a2 = activeItem == null ? void 0 : activeItem.element) == null ? void 0 : _a2.isConnected)
       
 29973         return;
       
 29974       const isVertical = orientation !== "horizontal";
       
 29975       const isHorizontal = orientation !== "vertical";
       
 29976       const grid = isGrid(renderedItems);
       
 29977       const isHorizontalKey = event.key === "ArrowLeft" || event.key === "ArrowRight" || event.key === "Home" || event.key === "End";
       
 29978       if (isHorizontalKey && DLOEKDPY_isTextField(event.currentTarget))
       
 29979         return;
       
 29980       const up = () => {
       
 29981         if (grid) {
       
 29982           const item = items && findFirstEnabledItemInTheLastRow(items);
       
 29983           return item == null ? void 0 : item.id;
       
 29984         }
       
 29985         return store == null ? void 0 : store.last();
       
 29986       };
       
 29987       const keyMap = {
       
 29988         ArrowUp: (grid || isVertical) && up,
       
 29989         ArrowRight: (grid || isHorizontal) && store.first,
       
 29990         ArrowDown: (grid || isVertical) && store.first,
       
 29991         ArrowLeft: (grid || isHorizontal) && store.last,
       
 29992         Home: store.first,
       
 29993         End: store.last,
       
 29994         PageUp: store.first,
       
 29995         PageDown: store.last
       
 29996       };
       
 29997       const action = keyMap[event.key];
       
 29998       if (action) {
       
 29999         const id = action();
       
 30000         if (id !== void 0) {
       
 30001           if (!moveOnKeyPressProp(event))
       
 30002             return;
       
 30003           event.preventDefault();
       
 30004           store.move(id);
       
 30005         }
       
 30006       }
       
 30007     });
       
 30008     props = useWrapElement(
       
 30009       props,
       
 30010       (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CompositeContextProvider, { value: store, children: element }),
       
 30011       [store]
       
 30012     );
       
 30013     const activeDescendant = store.useState((state) => {
       
 30014       var _a2;
       
 30015       if (!store)
       
 30016         return;
       
 30017       if (!composite)
       
 30018         return;
       
 30019       if (!state.virtualFocus)
       
 30020         return;
       
 30021       return (_a2 = getEnabledItem(store, state.activeId)) == null ? void 0 : _a2.id;
       
 30022     });
       
 30023     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 30024       "aria-activedescendant": activeDescendant
       
 30025     }, props), {
       
 30026       ref: useMergeRefs(composite ? store.setBaseElement : null, props.ref),
       
 30027       onKeyDownCapture,
       
 30028       onKeyUpCapture,
       
 30029       onFocusCapture,
       
 30030       onFocus,
       
 30031       onBlurCapture,
       
 30032       onKeyDown
       
 30033     });
       
 30034     const focusable = store.useState(
       
 30035       (state) => composite && (state.virtualFocus || state.activeId === null)
       
 30036     );
       
 30037     props = useFocusable(_4R3V3JGP_spreadValues({ focusable }, props));
       
 30038     return props;
       
 30039   }
       
 30040 );
       
 30041 var _7QTPYGNZ_Composite = createComponent((props) => {
       
 30042   const htmlProps = useComposite(props);
       
 30043   return createElement("div", htmlProps);
       
 30044 });
       
 30045 if (false) {}
       
 30046 
       
 30047 
       
 30048 
       
 30049 ;// CONCATENATED MODULE: external "ReactDOM"
       
 30050 const external_ReactDOM_namespaceObject = window["ReactDOM"];
       
 30051 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/combobox/combobox.js
       
 30052 "use client";
       
 30053 
       
 30054 
       
 30055 
       
 30056 
       
 30057 
       
 30058 
       
 30059 
       
 30060 
       
 30061 
       
 30062 
       
 30063 
       
 30064 
       
 30065 
       
 30066 
       
 30067 
       
 30068 
       
 30069 // src/combobox/combobox.ts
       
 30070 
       
 30071 
       
 30072 
       
 30073 
       
 30074 
       
 30075 
       
 30076 function isFirstItemAutoSelected(items, activeValue, autoSelect) {
       
 30077   if (!autoSelect)
       
 30078     return false;
       
 30079   const firstItem = items.find((item) => !item.disabled && item.value);
       
 30080   return (firstItem == null ? void 0 : firstItem.value) === activeValue;
       
 30081 }
       
 30082 function hasCompletionString(value, activeValue) {
       
 30083   if (!activeValue)
       
 30084     return false;
       
 30085   if (value == null)
       
 30086     return false;
       
 30087   value = normalizeString(value);
       
 30088   return activeValue.length > value.length && activeValue.toLowerCase().indexOf(value.toLowerCase()) === 0;
       
 30089 }
       
 30090 function isInputEvent(event) {
       
 30091   return event.type === "input";
       
 30092 }
       
 30093 function isAriaAutoCompleteValue(value) {
       
 30094   return value === "inline" || value === "list" || value === "both" || value === "none";
       
 30095 }
       
 30096 var useCombobox = createHook(
       
 30097   (_a) => {
       
 30098     var _b = _a, {
       
 30099       store,
       
 30100       focusable = true,
       
 30101       autoSelect: autoSelectProp = false,
       
 30102       getAutoSelectId,
       
 30103       showOnChange = true,
       
 30104       setValueOnChange = true,
       
 30105       showOnMouseDown = true,
       
 30106       setValueOnClick = true,
       
 30107       showOnKeyDown = true,
       
 30108       moveOnKeyPress = true,
       
 30109       autoComplete = "list"
       
 30110     } = _b, props = __objRest(_b, [
       
 30111       "store",
       
 30112       "focusable",
       
 30113       "autoSelect",
       
 30114       "getAutoSelectId",
       
 30115       "showOnChange",
       
 30116       "setValueOnChange",
       
 30117       "showOnMouseDown",
       
 30118       "setValueOnClick",
       
 30119       "showOnKeyDown",
       
 30120       "moveOnKeyPress",
       
 30121       "autoComplete"
       
 30122     ]);
       
 30123     const context = useComboboxProviderContext();
       
 30124     store = store || context;
       
 30125     invariant(
       
 30126       store,
       
 30127        false && 0
       
 30128     );
       
 30129     const ref = (0,external_React_.useRef)(null);
       
 30130     const [valueUpdated, forceValueUpdate] = useForceUpdate();
       
 30131     const canAutoSelectRef = (0,external_React_.useRef)(false);
       
 30132     const composingRef = (0,external_React_.useRef)(false);
       
 30133     const autoSelect = store.useState(
       
 30134       (state) => !!autoSelectProp && state.virtualFocus
       
 30135     );
       
 30136     const inline = autoComplete === "inline" || autoComplete === "both";
       
 30137     const [canInline, setCanInline] = (0,external_React_.useState)(inline);
       
 30138     useUpdateLayoutEffect(() => {
       
 30139       if (!inline)
       
 30140         return;
       
 30141       setCanInline(true);
       
 30142     }, [inline]);
       
 30143     const storeValue = store.useState("value");
       
 30144     const activeValue = store.useState(
       
 30145       (state) => inline && canInline ? state.activeValue : void 0
       
 30146     );
       
 30147     const items = store.useState("renderedItems");
       
 30148     const open = store.useState("open");
       
 30149     const contentElement = store.useState("contentElement");
       
 30150     const value = (0,external_React_.useMemo)(() => {
       
 30151       if (!inline)
       
 30152         return storeValue;
       
 30153       if (!canInline)
       
 30154         return storeValue;
       
 30155       const firstItemAutoSelected = isFirstItemAutoSelected(
       
 30156         items,
       
 30157         activeValue,
       
 30158         autoSelect
       
 30159       );
       
 30160       if (firstItemAutoSelected) {
       
 30161         if (hasCompletionString(storeValue, activeValue)) {
       
 30162           const slice = (activeValue == null ? void 0 : activeValue.slice(storeValue.length)) || "";
       
 30163           return storeValue + slice;
       
 30164         }
       
 30165         return storeValue;
       
 30166       }
       
 30167       return activeValue || storeValue;
       
 30168     }, [inline, canInline, items, activeValue, autoSelect, storeValue]);
       
 30169     (0,external_React_.useEffect)(() => {
       
 30170       const element = ref.current;
       
 30171       if (!element)
       
 30172         return;
       
 30173       const onCompositeItemMove = () => setCanInline(true);
       
 30174       element.addEventListener("combobox-item-move", onCompositeItemMove);
       
 30175       return () => {
       
 30176         element.removeEventListener("combobox-item-move", onCompositeItemMove);
       
 30177       };
       
 30178     }, []);
       
 30179     (0,external_React_.useEffect)(() => {
       
 30180       if (!inline)
       
 30181         return;
       
 30182       if (!canInline)
       
 30183         return;
       
 30184       if (!activeValue)
       
 30185         return;
       
 30186       const firstItemAutoSelected = isFirstItemAutoSelected(
       
 30187         items,
       
 30188         activeValue,
       
 30189         autoSelect
       
 30190       );
       
 30191       if (!firstItemAutoSelected)
       
 30192         return;
       
 30193       if (!hasCompletionString(storeValue, activeValue))
       
 30194         return;
       
 30195       queueMicrotask(() => {
       
 30196         const element = ref.current;
       
 30197         if (!element)
       
 30198           return;
       
 30199         setSelectionRange(element, storeValue.length, activeValue.length);
       
 30200       });
       
 30201     }, [
       
 30202       valueUpdated,
       
 30203       inline,
       
 30204       canInline,
       
 30205       activeValue,
       
 30206       items,
       
 30207       autoSelect,
       
 30208       storeValue
       
 30209     ]);
       
 30210     const scrollingElementRef = (0,external_React_.useRef)(null);
       
 30211     const getAutoSelectIdProp = useEvent(getAutoSelectId);
       
 30212     const autoSelectIdRef = (0,external_React_.useRef)(null);
       
 30213     (0,external_React_.useEffect)(() => {
       
 30214       if (!open)
       
 30215         return;
       
 30216       if (!contentElement)
       
 30217         return;
       
 30218       const scrollingElement = getScrollingElement(contentElement);
       
 30219       if (!scrollingElement)
       
 30220         return;
       
 30221       scrollingElementRef.current = scrollingElement;
       
 30222       const onWheel = () => {
       
 30223         canAutoSelectRef.current = false;
       
 30224       };
       
 30225       const onScroll = () => {
       
 30226         if (!store)
       
 30227           return;
       
 30228         if (!canAutoSelectRef.current)
       
 30229           return;
       
 30230         const { activeId } = store.getState();
       
 30231         if (activeId === null)
       
 30232           return;
       
 30233         if (activeId === autoSelectIdRef.current)
       
 30234           return;
       
 30235         canAutoSelectRef.current = false;
       
 30236       };
       
 30237       const options = { passive: true, capture: true };
       
 30238       scrollingElement.addEventListener("wheel", onWheel, options);
       
 30239       scrollingElement.addEventListener("scroll", onScroll, options);
       
 30240       return () => {
       
 30241         scrollingElement.removeEventListener("wheel", onWheel, true);
       
 30242         scrollingElement.removeEventListener("scroll", onScroll, true);
       
 30243       };
       
 30244     }, [open, contentElement, store]);
       
 30245     useSafeLayoutEffect(() => {
       
 30246       if (!storeValue)
       
 30247         return;
       
 30248       if (composingRef.current)
       
 30249         return;
       
 30250       canAutoSelectRef.current = true;
       
 30251     }, [storeValue]);
       
 30252     useSafeLayoutEffect(() => {
       
 30253       if (open)
       
 30254         return;
       
 30255       canAutoSelectRef.current = false;
       
 30256     }, [open]);
       
 30257     const resetValueOnSelect = store.useState("resetValueOnSelect");
       
 30258     useUpdateEffect(() => {
       
 30259       var _a2;
       
 30260       const canAutoSelect = canAutoSelectRef.current;
       
 30261       if (!store)
       
 30262         return;
       
 30263       if ((!autoSelect || !canAutoSelect) && !resetValueOnSelect)
       
 30264         return;
       
 30265       const { baseElement, contentElement: contentElement2, activeId } = store.getState();
       
 30266       if (baseElement && !hasFocus(baseElement))
       
 30267         return;
       
 30268       if (contentElement2 == null ? void 0 : contentElement2.hasAttribute("data-placing")) {
       
 30269         const observer = new MutationObserver(forceValueUpdate);
       
 30270         observer.observe(contentElement2, { attributeFilter: ["data-placing"] });
       
 30271         return () => observer.disconnect();
       
 30272       }
       
 30273       if (autoSelect && canAutoSelect) {
       
 30274         const userAutoSelectId = getAutoSelectIdProp(items);
       
 30275         const autoSelectId = userAutoSelectId !== void 0 ? userAutoSelectId : store.first();
       
 30276         autoSelectIdRef.current = autoSelectId;
       
 30277         store.move(autoSelectId != null ? autoSelectId : null);
       
 30278       } else {
       
 30279         const element = (_a2 = store.item(activeId)) == null ? void 0 : _a2.element;
       
 30280         if (element && "scrollIntoView" in element) {
       
 30281           element.scrollIntoView({ block: "nearest", inline: "nearest" });
       
 30282         }
       
 30283       }
       
 30284       return;
       
 30285     }, [
       
 30286       store,
       
 30287       valueUpdated,
       
 30288       storeValue,
       
 30289       autoSelect,
       
 30290       resetValueOnSelect,
       
 30291       getAutoSelectIdProp,
       
 30292       items
       
 30293     ]);
       
 30294     (0,external_React_.useEffect)(() => {
       
 30295       if (!inline)
       
 30296         return;
       
 30297       const combobox = ref.current;
       
 30298       if (!combobox)
       
 30299         return;
       
 30300       const elements = [combobox, contentElement].filter(
       
 30301         (value2) => !!value2
       
 30302       );
       
 30303       const onBlur2 = (event) => {
       
 30304         if (elements.every((el) => isFocusEventOutside(event, el))) {
       
 30305           store == null ? void 0 : store.setValue(value);
       
 30306         }
       
 30307       };
       
 30308       elements.forEach((el) => el.addEventListener("focusout", onBlur2));
       
 30309       return () => {
       
 30310         elements.forEach((el) => el.removeEventListener("focusout", onBlur2));
       
 30311       };
       
 30312     }, [inline, contentElement, store, value]);
       
 30313     const onChangeProp = props.onChange;
       
 30314     const showOnChangeProp = useBooleanEvent(showOnChange);
       
 30315     const setValueOnChangeProp = useBooleanEvent(setValueOnChange);
       
 30316     const onChange = useEvent((event) => {
       
 30317       onChangeProp == null ? void 0 : onChangeProp(event);
       
 30318       if (event.defaultPrevented)
       
 30319         return;
       
 30320       if (!store)
       
 30321         return;
       
 30322       const { value: value2, selectionStart, selectionEnd } = event.target;
       
 30323       const nativeEvent = event.nativeEvent;
       
 30324       canAutoSelectRef.current = true;
       
 30325       if (isInputEvent(nativeEvent)) {
       
 30326         if (nativeEvent.isComposing) {
       
 30327           canAutoSelectRef.current = false;
       
 30328           composingRef.current = true;
       
 30329         }
       
 30330         if (inline) {
       
 30331           const textInserted = nativeEvent.inputType === "insertText" || nativeEvent.inputType === "insertCompositionText";
       
 30332           const caretAtEnd = selectionStart === value2.length;
       
 30333           setCanInline(textInserted && caretAtEnd);
       
 30334         }
       
 30335       }
       
 30336       if (setValueOnChangeProp(event)) {
       
 30337         const isSameValue = value2 === store.getState().value;
       
 30338         (0,external_ReactDOM_namespaceObject.flushSync)(() => store == null ? void 0 : store.setValue(value2));
       
 30339         setSelectionRange(event.currentTarget, selectionStart, selectionEnd);
       
 30340         if (inline && autoSelect && isSameValue) {
       
 30341           forceValueUpdate();
       
 30342         }
       
 30343       }
       
 30344       if (showOnChangeProp(event)) {
       
 30345         store.show();
       
 30346       }
       
 30347       if (!autoSelect || !canAutoSelectRef.current) {
       
 30348         store.setActiveId(null);
       
 30349       }
       
 30350     });
       
 30351     const onCompositionEndProp = props.onCompositionEnd;
       
 30352     const onCompositionEnd = useEvent(
       
 30353       (event) => {
       
 30354         canAutoSelectRef.current = true;
       
 30355         composingRef.current = false;
       
 30356         onCompositionEndProp == null ? void 0 : onCompositionEndProp(event);
       
 30357         if (event.defaultPrevented)
       
 30358           return;
       
 30359         if (!autoSelect)
       
 30360           return;
       
 30361         forceValueUpdate();
       
 30362       }
       
 30363     );
       
 30364     const onMouseDownProp = props.onMouseDown;
       
 30365     const setValueOnClickProp = useBooleanEvent(setValueOnClick);
       
 30366     const showOnMouseDownProp = useBooleanEvent(showOnMouseDown);
       
 30367     const onMouseDown = useEvent((event) => {
       
 30368       onMouseDownProp == null ? void 0 : onMouseDownProp(event);
       
 30369       if (event.defaultPrevented)
       
 30370         return;
       
 30371       if (event.button)
       
 30372         return;
       
 30373       if (event.ctrlKey)
       
 30374         return;
       
 30375       if (!store)
       
 30376         return;
       
 30377       store.setActiveId(null);
       
 30378       if (setValueOnClickProp(event)) {
       
 30379         store.setValue(value);
       
 30380       }
       
 30381       if (showOnMouseDownProp(event)) {
       
 30382         queueBeforeEvent(event.currentTarget, "mouseup", store.show);
       
 30383       }
       
 30384     });
       
 30385     const onKeyDownProp = props.onKeyDown;
       
 30386     const showOnKeyDownProp = useBooleanEvent(showOnKeyDown);
       
 30387     const onKeyDown = useEvent(
       
 30388       (event) => {
       
 30389         onKeyDownProp == null ? void 0 : onKeyDownProp(event);
       
 30390         if (!event.repeat) {
       
 30391           canAutoSelectRef.current = false;
       
 30392         }
       
 30393         if (event.defaultPrevented)
       
 30394           return;
       
 30395         if (event.ctrlKey)
       
 30396           return;
       
 30397         if (event.altKey)
       
 30398           return;
       
 30399         if (event.shiftKey)
       
 30400           return;
       
 30401         if (event.metaKey)
       
 30402           return;
       
 30403         if (!store)
       
 30404           return;
       
 30405         const { open: open2, activeId } = store.getState();
       
 30406         if (open2)
       
 30407           return;
       
 30408         if (activeId !== null)
       
 30409           return;
       
 30410         if (event.key === "ArrowUp" || event.key === "ArrowDown") {
       
 30411           if (showOnKeyDownProp(event)) {
       
 30412             event.preventDefault();
       
 30413             store.show();
       
 30414           }
       
 30415         }
       
 30416       }
       
 30417     );
       
 30418     const onBlurProp = props.onBlur;
       
 30419     const onBlur = useEvent((event) => {
       
 30420       canAutoSelectRef.current = false;
       
 30421       onBlurProp == null ? void 0 : onBlurProp(event);
       
 30422       if (event.defaultPrevented)
       
 30423         return;
       
 30424     });
       
 30425     const id = useId(props.id);
       
 30426     const ariaAutoComplete = isAriaAutoCompleteValue(autoComplete) ? autoComplete : void 0;
       
 30427     const isActiveItem = store.useState((state) => state.activeId === null);
       
 30428     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 30429       id,
       
 30430       role: "combobox",
       
 30431       "aria-autocomplete": ariaAutoComplete,
       
 30432       "aria-haspopup": getPopupRole(contentElement, "listbox"),
       
 30433       "aria-expanded": open,
       
 30434       "aria-controls": contentElement == null ? void 0 : contentElement.id,
       
 30435       "data-active-item": isActiveItem || void 0,
       
 30436       value
       
 30437     }, props), {
       
 30438       ref: useMergeRefs(ref, props.ref),
       
 30439       onChange,
       
 30440       onCompositionEnd,
       
 30441       onMouseDown,
       
 30442       onKeyDown,
       
 30443       onBlur
       
 30444     });
       
 30445     props = useComposite(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 30446       store,
       
 30447       focusable
       
 30448     }, props), {
       
 30449       // Enable inline autocomplete when the user moves from the combobox input
       
 30450       // to an item.
       
 30451       moveOnKeyPress: (event) => {
       
 30452         if (isFalsyBooleanCallback(moveOnKeyPress, event))
       
 30453           return false;
       
 30454         if (inline)
       
 30455           setCanInline(true);
       
 30456         return true;
       
 30457       }
       
 30458     }));
       
 30459     props = usePopoverAnchor(_4R3V3JGP_spreadValues({ store }, props));
       
 30460     return _4R3V3JGP_spreadValues({ autoComplete: "off" }, props);
       
 30461   }
       
 30462 );
       
 30463 var Combobox = createComponent((props) => {
       
 30464   const htmlProps = useCombobox(props);
       
 30465   return createElement("input", htmlProps);
       
 30466 });
       
 30467 if (false) {}
       
 30468 
       
 30469 
       
 30470 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CLE7NTOY.js
       
 30471 "use client";
       
 30472 
       
 30473 
       
 30474 
       
 30475 
       
 30476 
       
 30477 
       
 30478 
       
 30479 // src/disclosure/disclosure-content.tsx
       
 30480 
       
 30481 
       
 30482 
       
 30483 function afterTimeout(timeoutMs, cb) {
       
 30484   const timeoutId = setTimeout(cb, timeoutMs);
       
 30485   return () => clearTimeout(timeoutId);
       
 30486 }
       
 30487 function CLE7NTOY_afterPaint(cb) {
       
 30488   let raf = requestAnimationFrame(() => {
       
 30489     raf = requestAnimationFrame(cb);
       
 30490   });
       
 30491   return () => cancelAnimationFrame(raf);
       
 30492 }
       
 30493 function parseCSSTime(...times) {
       
 30494   return times.join(", ").split(", ").reduce((longestTime, currentTimeString) => {
       
 30495     const currentTime = parseFloat(currentTimeString || "0s") * 1e3;
       
 30496     if (currentTime > longestTime)
       
 30497       return currentTime;
       
 30498     return longestTime;
       
 30499   }, 0);
       
 30500 }
       
 30501 function isHidden(mounted, hidden, alwaysVisible) {
       
 30502   return !alwaysVisible && hidden !== false && (!mounted || !!hidden);
       
 30503 }
       
 30504 var useDisclosureContent = createHook(
       
 30505   (_a) => {
       
 30506     var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, ["store", "alwaysVisible"]);
       
 30507     const context = useDisclosureProviderContext();
       
 30508     store = store || context;
       
 30509     invariant(
       
 30510       store,
       
 30511        false && 0
       
 30512     );
       
 30513     const id = useId(props.id);
       
 30514     const [transition, setTransition] = (0,external_React_.useState)(null);
       
 30515     const open = store.useState("open");
       
 30516     const mounted = store.useState("mounted");
       
 30517     const animated = store.useState("animated");
       
 30518     const contentElement = store.useState("contentElement");
       
 30519     useSafeLayoutEffect(() => {
       
 30520       if (!animated)
       
 30521         return;
       
 30522       if (!(contentElement == null ? void 0 : contentElement.isConnected)) {
       
 30523         setTransition(null);
       
 30524         return;
       
 30525       }
       
 30526       return CLE7NTOY_afterPaint(() => {
       
 30527         setTransition(open ? "enter" : "leave");
       
 30528       });
       
 30529     }, [animated, contentElement, open]);
       
 30530     useSafeLayoutEffect(() => {
       
 30531       if (!store)
       
 30532         return;
       
 30533       if (!animated)
       
 30534         return;
       
 30535       if (!contentElement)
       
 30536         return;
       
 30537       if (!transition)
       
 30538         return;
       
 30539       if (transition === "enter" && !open)
       
 30540         return;
       
 30541       if (transition === "leave" && open)
       
 30542         return;
       
 30543       if (typeof animated === "number") {
       
 30544         const timeoutMs2 = animated;
       
 30545         return afterTimeout(timeoutMs2, store.stopAnimation);
       
 30546       }
       
 30547       const {
       
 30548         transitionDuration,
       
 30549         animationDuration,
       
 30550         transitionDelay,
       
 30551         animationDelay
       
 30552       } = getComputedStyle(contentElement);
       
 30553       const delay = parseCSSTime(transitionDelay, animationDelay);
       
 30554       const duration = parseCSSTime(transitionDuration, animationDuration);
       
 30555       const timeoutMs = delay + duration;
       
 30556       if (!timeoutMs)
       
 30557         return;
       
 30558       return afterTimeout(timeoutMs, store.stopAnimation);
       
 30559     }, [store, animated, contentElement, open, transition]);
       
 30560     props = useWrapElement(
       
 30561       props,
       
 30562       (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DialogScopedContextProvider, { value: store, children: element }),
       
 30563       [store]
       
 30564     );
       
 30565     const hidden = isHidden(mounted, props.hidden, alwaysVisible);
       
 30566     const style = hidden ? _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props.style), { display: "none" }) : props.style;
       
 30567     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 30568       id,
       
 30569       "data-enter": transition === "enter" ? "" : void 0,
       
 30570       "data-leave": transition === "leave" ? "" : void 0,
       
 30571       hidden
       
 30572     }, props), {
       
 30573       ref: useMergeRefs(id ? store.setContentElement : null, props.ref),
       
 30574       style
       
 30575     });
       
 30576     return props;
       
 30577   }
       
 30578 );
       
 30579 var DisclosureContentImpl = createComponent(
       
 30580   (props) => {
       
 30581     const htmlProps = useDisclosureContent(props);
       
 30582     return createElement("div", htmlProps);
       
 30583   }
       
 30584 );
       
 30585 var DisclosureContent = createComponent(
       
 30586   (_a) => {
       
 30587     var _b = _a, { unmountOnHide } = _b, props = __objRest(_b, ["unmountOnHide"]);
       
 30588     const context = useDisclosureProviderContext();
       
 30589     const store = props.store || context;
       
 30590     const mounted = useStoreState(
       
 30591       store,
       
 30592       (state) => !unmountOnHide || (state == null ? void 0 : state.mounted)
       
 30593     );
       
 30594     if (mounted === false)
       
 30595       return null;
       
 30596     return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DisclosureContentImpl, _4R3V3JGP_spreadValues({}, props));
       
 30597   }
       
 30598 );
       
 30599 if (false) {}
       
 30600 
       
 30601 
       
 30602 
       
 30603 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/ZEXNX5JH.js
       
 30604 "use client";
       
 30605 
       
 30606 
       
 30607 
       
 30608 
       
 30609 
       
 30610 
       
 30611 
       
 30612 // src/combobox/combobox-list.tsx
       
 30613 
       
 30614 
       
 30615 
       
 30616 
       
 30617 var useComboboxList = createHook(
       
 30618   (_a) => {
       
 30619     var _b = _a, { store, focusable = true, alwaysVisible } = _b, props = __objRest(_b, ["store", "focusable", "alwaysVisible"]);
       
 30620     const context = useComboboxProviderContext();
       
 30621     store = store || context;
       
 30622     invariant(
       
 30623       store,
       
 30624        false && 0
       
 30625     );
       
 30626     const ref = (0,external_React_.useRef)(null);
       
 30627     const id = useId(props.id);
       
 30628     const onKeyDownProp = props.onKeyDown;
       
 30629     const onKeyDown = useEvent((event) => {
       
 30630       onKeyDownProp == null ? void 0 : onKeyDownProp(event);
       
 30631       if (event.defaultPrevented)
       
 30632         return;
       
 30633       if (event.key === "Escape") {
       
 30634         store == null ? void 0 : store.move(null);
       
 30635       }
       
 30636     });
       
 30637     const restoreVirtualFocus = (0,external_React_.useRef)(false);
       
 30638     const onFocusVisibleProp = props.onFocusVisible;
       
 30639     const onFocusVisible = useEvent((event) => {
       
 30640       onFocusVisibleProp == null ? void 0 : onFocusVisibleProp(event);
       
 30641       if (event.defaultPrevented)
       
 30642         return;
       
 30643       if (event.type !== "focus")
       
 30644         return;
       
 30645       if (!store)
       
 30646         return;
       
 30647       const { virtualFocus } = store.getState();
       
 30648       if (!virtualFocus)
       
 30649         return;
       
 30650       const { relatedTarget, currentTarget } = event;
       
 30651       if (relatedTarget && currentTarget.contains(relatedTarget))
       
 30652         return;
       
 30653       restoreVirtualFocus.current = true;
       
 30654       store.setState("virtualFocus", false);
       
 30655     });
       
 30656     const onBlurProp = props.onBlur;
       
 30657     const onBlur = useEvent((event) => {
       
 30658       onBlurProp == null ? void 0 : onBlurProp(event);
       
 30659       if (event.defaultPrevented)
       
 30660         return;
       
 30661       if (!restoreVirtualFocus.current)
       
 30662         return;
       
 30663       if (!isFocusEventOutside(event))
       
 30664         return;
       
 30665       restoreVirtualFocus.current = false;
       
 30666       store == null ? void 0 : store.setState("virtualFocus", true);
       
 30667     });
       
 30668     props = useWrapElement(
       
 30669       props,
       
 30670       (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ComboboxScopedContextProvider, { value: store, children: element }),
       
 30671       [store]
       
 30672     );
       
 30673     const mounted = store.useState("mounted");
       
 30674     const hidden = isHidden(mounted, props.hidden, alwaysVisible);
       
 30675     const style = hidden ? _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props.style), { display: "none" }) : props.style;
       
 30676     const multiSelectable = store.useState(
       
 30677       (state) => Array.isArray(state.selectedValue)
       
 30678     );
       
 30679     const role = useAttribute(ref, "role", props.role);
       
 30680     const isCompositeRole = role === "listbox" || role === "tree" || role === "grid";
       
 30681     const ariaMultiSelectable = isCompositeRole ? multiSelectable || void 0 : void 0;
       
 30682     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 30683       id,
       
 30684       hidden,
       
 30685       role: "listbox",
       
 30686       tabIndex: focusable ? -1 : void 0,
       
 30687       "aria-multiselectable": ariaMultiSelectable
       
 30688     }, props), {
       
 30689       ref: useMergeRefs(id ? store.setContentElement : null, ref, props.ref),
       
 30690       style,
       
 30691       onKeyDown,
       
 30692       onFocusVisible,
       
 30693       onBlur
       
 30694     });
       
 30695     props = useFocusable(_4R3V3JGP_spreadValues({ focusable }, props));
       
 30696     return props;
       
 30697   }
       
 30698 );
       
 30699 var ComboboxList = createComponent((props) => {
       
 30700   const htmlProps = useComboboxList(props);
       
 30701   return createElement("div", htmlProps);
       
 30702 });
       
 30703 if (false) {}
       
 30704 
       
 30705 
       
 30706 
       
 30707 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/NWCBQ4CV.js
       
 30708 "use client";
       
 30709 
       
 30710 
       
 30711 
       
 30712 
       
 30713 
       
 30714 // src/command/command.ts
       
 30715 
       
 30716 
       
 30717 
       
 30718 
       
 30719 
       
 30720 function isNativeClick(event) {
       
 30721   if (!event.isTrusted)
       
 30722     return false;
       
 30723   const element = event.currentTarget;
       
 30724   if (event.key === "Enter") {
       
 30725     return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "A";
       
 30726   }
       
 30727   if (event.key === " ") {
       
 30728     return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "INPUT" || element.tagName === "SELECT";
       
 30729   }
       
 30730   return false;
       
 30731 }
       
 30732 var NWCBQ4CV_symbol = Symbol("command");
       
 30733 var useCommand = createHook(
       
 30734   (_a) => {
       
 30735     var _b = _a, { clickOnEnter = true, clickOnSpace = true } = _b, props = __objRest(_b, ["clickOnEnter", "clickOnSpace"]);
       
 30736     const ref = (0,external_React_.useRef)(null);
       
 30737     const tagName = useTagName(ref, props.as);
       
 30738     const type = props.type;
       
 30739     const [isNativeButton, setIsNativeButton] = (0,external_React_.useState)(
       
 30740       () => !!tagName && isButton({ tagName, type })
       
 30741     );
       
 30742     (0,external_React_.useEffect)(() => {
       
 30743       if (!ref.current)
       
 30744         return;
       
 30745       setIsNativeButton(isButton(ref.current));
       
 30746     }, []);
       
 30747     const [active, setActive] = (0,external_React_.useState)(false);
       
 30748     const activeRef = (0,external_React_.useRef)(false);
       
 30749     const disabled = disabledFromProps(props);
       
 30750     const [isDuplicate, metadataProps] = useMetadataProps(props, NWCBQ4CV_symbol, true);
       
 30751     const onKeyDownProp = props.onKeyDown;
       
 30752     const onKeyDown = useEvent((event) => {
       
 30753       onKeyDownProp == null ? void 0 : onKeyDownProp(event);
       
 30754       const element = event.currentTarget;
       
 30755       if (event.defaultPrevented)
       
 30756         return;
       
 30757       if (isDuplicate)
       
 30758         return;
       
 30759       if (disabled)
       
 30760         return;
       
 30761       if (!isSelfTarget(event))
       
 30762         return;
       
 30763       if (DLOEKDPY_isTextField(element))
       
 30764         return;
       
 30765       if (element.isContentEditable)
       
 30766         return;
       
 30767       const isEnter = clickOnEnter && event.key === "Enter";
       
 30768       const isSpace = clickOnSpace && event.key === " ";
       
 30769       const shouldPreventEnter = event.key === "Enter" && !clickOnEnter;
       
 30770       const shouldPreventSpace = event.key === " " && !clickOnSpace;
       
 30771       if (shouldPreventEnter || shouldPreventSpace) {
       
 30772         event.preventDefault();
       
 30773         return;
       
 30774       }
       
 30775       if (isEnter || isSpace) {
       
 30776         const nativeClick = isNativeClick(event);
       
 30777         if (isEnter) {
       
 30778           if (!nativeClick) {
       
 30779             event.preventDefault();
       
 30780             const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, ["view"]);
       
 30781             const click = () => fireClickEvent(element, eventInit);
       
 30782             if (isFirefox()) {
       
 30783               queueBeforeEvent(element, "keyup", click);
       
 30784             } else {
       
 30785               queueMicrotask(click);
       
 30786             }
       
 30787           }
       
 30788         } else if (isSpace) {
       
 30789           activeRef.current = true;
       
 30790           if (!nativeClick) {
       
 30791             event.preventDefault();
       
 30792             setActive(true);
       
 30793           }
       
 30794         }
       
 30795       }
       
 30796     });
       
 30797     const onKeyUpProp = props.onKeyUp;
       
 30798     const onKeyUp = useEvent((event) => {
       
 30799       onKeyUpProp == null ? void 0 : onKeyUpProp(event);
       
 30800       if (event.defaultPrevented)
       
 30801         return;
       
 30802       if (isDuplicate)
       
 30803         return;
       
 30804       if (disabled)
       
 30805         return;
       
 30806       if (event.metaKey)
       
 30807         return;
       
 30808       const isSpace = clickOnSpace && event.key === " ";
       
 30809       if (activeRef.current && isSpace) {
       
 30810         activeRef.current = false;
       
 30811         if (!isNativeClick(event)) {
       
 30812           event.preventDefault();
       
 30813           setActive(false);
       
 30814           const element = event.currentTarget;
       
 30815           const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, ["view"]);
       
 30816           queueMicrotask(() => fireClickEvent(element, eventInit));
       
 30817         }
       
 30818       }
       
 30819     });
       
 30820     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({
       
 30821       "data-active": active ? "" : void 0,
       
 30822       type: isNativeButton ? "button" : void 0
       
 30823     }, metadataProps), props), {
       
 30824       ref: useMergeRefs(ref, props.ref),
       
 30825       onKeyDown,
       
 30826       onKeyUp
       
 30827     });
       
 30828     props = useFocusable(props);
       
 30829     return props;
       
 30830   }
       
 30831 );
       
 30832 var Command = createComponent((props) => {
       
 30833   props = useCommand(props);
       
 30834   return createElement("button", props);
       
 30835 });
       
 30836 if (false) {}
       
 30837 
       
 30838 
       
 30839 
       
 30840 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/UH3I23HL.js
       
 30841 "use client";
       
 30842 
       
 30843 
       
 30844 
       
 30845 
       
 30846 
       
 30847 // src/collection/collection-item.ts
       
 30848 
       
 30849 
       
 30850 var useCollectionItem = createHook(
       
 30851   (_a) => {
       
 30852     var _b = _a, {
       
 30853       store,
       
 30854       shouldRegisterItem = true,
       
 30855       getItem = identity,
       
 30856       element: element
       
 30857     } = _b, props = __objRest(_b, [
       
 30858       "store",
       
 30859       "shouldRegisterItem",
       
 30860       "getItem",
       
 30861       // @ts-expect-error This prop may come from a collection renderer.
       
 30862       "element"
       
 30863     ]);
       
 30864     const context = useCollectionContext();
       
 30865     store = store || context;
       
 30866     const id = useId(props.id);
       
 30867     const ref = (0,external_React_.useRef)(element);
       
 30868     (0,external_React_.useEffect)(() => {
       
 30869       const element2 = ref.current;
       
 30870       if (!id)
       
 30871         return;
       
 30872       if (!element2)
       
 30873         return;
       
 30874       if (!shouldRegisterItem)
       
 30875         return;
       
 30876       const item = getItem({ id, element: element2 });
       
 30877       return store == null ? void 0 : store.renderItem(item);
       
 30878     }, [id, shouldRegisterItem, getItem, store]);
       
 30879     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), {
       
 30880       ref: useMergeRefs(ref, props.ref)
       
 30881     });
       
 30882     return props;
       
 30883   }
       
 30884 );
       
 30885 var CollectionItem = createComponent(
       
 30886   (props) => {
       
 30887     const htmlProps = useCollectionItem(props);
       
 30888     return createElement("div", htmlProps);
       
 30889   }
       
 30890 );
       
 30891 if (false) {}
       
 30892 
       
 30893 
       
 30894 
       
 30895 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/QZLXIDNP.js
       
 30896 "use client";
       
 30897 
       
 30898 
       
 30899 
       
 30900 
       
 30901 
       
 30902 
       
 30903 
       
 30904 
       
 30905 
       
 30906 // src/composite/composite-item.tsx
       
 30907 
       
 30908 
       
 30909 
       
 30910 
       
 30911 
       
 30912 function isEditableElement(element) {
       
 30913   if (element.isContentEditable)
       
 30914     return true;
       
 30915   if (DLOEKDPY_isTextField(element))
       
 30916     return true;
       
 30917   return element.tagName === "INPUT" && !isButton(element);
       
 30918 }
       
 30919 function getNextPageOffset(scrollingElement, pageUp = false) {
       
 30920   const height = scrollingElement.clientHeight;
       
 30921   const { top } = scrollingElement.getBoundingClientRect();
       
 30922   const pageSize = Math.max(height * 0.875, height - 40) * 1.5;
       
 30923   const pageOffset = pageUp ? height - pageSize + top : pageSize + top;
       
 30924   if (scrollingElement.tagName === "HTML") {
       
 30925     return pageOffset + scrollingElement.scrollTop;
       
 30926   }
       
 30927   return pageOffset;
       
 30928 }
       
 30929 function getItemOffset(itemElement, pageUp = false) {
       
 30930   const { top } = itemElement.getBoundingClientRect();
       
 30931   if (pageUp) {
       
 30932     return top + itemElement.clientHeight;
       
 30933   }
       
 30934   return top;
       
 30935 }
       
 30936 function findNextPageItemId(element, store, next, pageUp = false) {
       
 30937   var _a;
       
 30938   if (!store)
       
 30939     return;
       
 30940   if (!next)
       
 30941     return;
       
 30942   const { renderedItems } = store.getState();
       
 30943   const scrollingElement = getScrollingElement(element);
       
 30944   if (!scrollingElement)
       
 30945     return;
       
 30946   const nextPageOffset = getNextPageOffset(scrollingElement, pageUp);
       
 30947   let id;
       
 30948   let prevDifference;
       
 30949   for (let i = 0; i < renderedItems.length; i += 1) {
       
 30950     const previousId = id;
       
 30951     id = next(i);
       
 30952     if (!id)
       
 30953       break;
       
 30954     if (id === previousId)
       
 30955       continue;
       
 30956     const itemElement = (_a = getEnabledItem(store, id)) == null ? void 0 : _a.element;
       
 30957     if (!itemElement)
       
 30958       continue;
       
 30959     const itemOffset = getItemOffset(itemElement, pageUp);
       
 30960     const difference = itemOffset - nextPageOffset;
       
 30961     const absDifference = Math.abs(difference);
       
 30962     if (pageUp && difference <= 0 || !pageUp && difference >= 0) {
       
 30963       if (prevDifference !== void 0 && prevDifference < absDifference) {
       
 30964         id = previousId;
       
 30965       }
       
 30966       break;
       
 30967     }
       
 30968     prevDifference = absDifference;
       
 30969   }
       
 30970   return id;
       
 30971 }
       
 30972 function targetIsAnotherItem(event, store) {
       
 30973   if (isSelfTarget(event))
       
 30974     return false;
       
 30975   return isItem(store, event.target);
       
 30976 }
       
 30977 function useRole(ref, props) {
       
 30978   const roleProp = props.role;
       
 30979   const [role, setRole] = (0,external_React_.useState)(roleProp);
       
 30980   useSafeLayoutEffect(() => {
       
 30981     const element = ref.current;
       
 30982     if (!element)
       
 30983       return;
       
 30984     setRole(element.getAttribute("role") || roleProp);
       
 30985   }, [roleProp]);
       
 30986   return role;
       
 30987 }
       
 30988 function requiresAriaSelected(role) {
       
 30989   return role === "option" || role === "treeitem";
       
 30990 }
       
 30991 function supportsAriaSelected(role) {
       
 30992   if (role === "option")
       
 30993     return true;
       
 30994   if (role === "tab")
       
 30995     return true;
       
 30996   if (role === "treeitem")
       
 30997     return true;
       
 30998   if (role === "gridcell")
       
 30999     return true;
       
 31000   if (role === "row")
       
 31001     return true;
       
 31002   if (role === "columnheader")
       
 31003     return true;
       
 31004   if (role === "rowheader")
       
 31005     return true;
       
 31006   return false;
       
 31007 }
       
 31008 var useCompositeItem = createHook(
       
 31009   (_a) => {
       
 31010     var _b = _a, {
       
 31011       store,
       
 31012       rowId: rowIdProp,
       
 31013       preventScrollOnKeyDown = false,
       
 31014       moveOnKeyPress = true,
       
 31015       tabbable = false,
       
 31016       getItem: getItemProp,
       
 31017       "aria-setsize": ariaSetSizeProp,
       
 31018       "aria-posinset": ariaPosInSetProp
       
 31019     } = _b, props = __objRest(_b, [
       
 31020       "store",
       
 31021       "rowId",
       
 31022       "preventScrollOnKeyDown",
       
 31023       "moveOnKeyPress",
       
 31024       "tabbable",
       
 31025       "getItem",
       
 31026       "aria-setsize",
       
 31027       "aria-posinset"
       
 31028     ]);
       
 31029     const context = useCompositeContext();
       
 31030     store = store || context;
       
 31031     const id = useId(props.id);
       
 31032     const ref = (0,external_React_.useRef)(null);
       
 31033     const row = (0,external_React_.useContext)(CompositeRowContext);
       
 31034     const rowId = useStoreState(store, (state) => {
       
 31035       if (rowIdProp)
       
 31036         return rowIdProp;
       
 31037       if (!state)
       
 31038         return;
       
 31039       if (!(row == null ? void 0 : row.baseElement))
       
 31040         return;
       
 31041       if (row.baseElement !== state.baseElement)
       
 31042         return;
       
 31043       return row.id;
       
 31044     });
       
 31045     const disabled = disabledFromProps(props);
       
 31046     const trulyDisabled = disabled && !props.accessibleWhenDisabled;
       
 31047     const getItem = (0,external_React_.useCallback)(
       
 31048       (item) => {
       
 31049         const nextItem = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, item), {
       
 31050           id: id || item.id,
       
 31051           rowId,
       
 31052           disabled: !!trulyDisabled
       
 31053         });
       
 31054         if (getItemProp) {
       
 31055           return getItemProp(nextItem);
       
 31056         }
       
 31057         return nextItem;
       
 31058       },
       
 31059       [id, rowId, trulyDisabled, getItemProp]
       
 31060     );
       
 31061     const onFocusProp = props.onFocus;
       
 31062     const hasFocusedComposite = (0,external_React_.useRef)(false);
       
 31063     const onFocus = useEvent((event) => {
       
 31064       onFocusProp == null ? void 0 : onFocusProp(event);
       
 31065       if (event.defaultPrevented)
       
 31066         return;
       
 31067       if (isPortalEvent(event))
       
 31068         return;
       
 31069       if (!id)
       
 31070         return;
       
 31071       if (!store)
       
 31072         return;
       
 31073       const { activeId, virtualFocus: virtualFocus2, baseElement: baseElement2 } = store.getState();
       
 31074       if (targetIsAnotherItem(event, store))
       
 31075         return;
       
 31076       if (activeId !== id) {
       
 31077         store.setActiveId(id);
       
 31078       }
       
 31079       if (!virtualFocus2)
       
 31080         return;
       
 31081       if (!isSelfTarget(event))
       
 31082         return;
       
 31083       if (isEditableElement(event.currentTarget))
       
 31084         return;
       
 31085       if (!(baseElement2 == null ? void 0 : baseElement2.isConnected))
       
 31086         return;
       
 31087       hasFocusedComposite.current = true;
       
 31088       const fromComposite = event.relatedTarget === baseElement2 || isItem(store, event.relatedTarget);
       
 31089       if (fromComposite) {
       
 31090         focusSilently(baseElement2);
       
 31091       } else {
       
 31092         baseElement2.focus();
       
 31093       }
       
 31094     });
       
 31095     const onBlurCaptureProp = props.onBlurCapture;
       
 31096     const onBlurCapture = useEvent((event) => {
       
 31097       onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
       
 31098       if (event.defaultPrevented)
       
 31099         return;
       
 31100       const state = store == null ? void 0 : store.getState();
       
 31101       if ((state == null ? void 0 : state.virtualFocus) && hasFocusedComposite.current) {
       
 31102         hasFocusedComposite.current = false;
       
 31103         event.preventDefault();
       
 31104         event.stopPropagation();
       
 31105       }
       
 31106     });
       
 31107     const onKeyDownProp = props.onKeyDown;
       
 31108     const preventScrollOnKeyDownProp = useBooleanEvent(preventScrollOnKeyDown);
       
 31109     const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
       
 31110     const onKeyDown = useEvent((event) => {
       
 31111       onKeyDownProp == null ? void 0 : onKeyDownProp(event);
       
 31112       if (event.defaultPrevented)
       
 31113         return;
       
 31114       if (!isSelfTarget(event))
       
 31115         return;
       
 31116       if (!store)
       
 31117         return;
       
 31118       const { currentTarget } = event;
       
 31119       const state = store.getState();
       
 31120       const item = store.item(id);
       
 31121       const isGrid = !!(item == null ? void 0 : item.rowId);
       
 31122       const isVertical = state.orientation !== "horizontal";
       
 31123       const isHorizontal = state.orientation !== "vertical";
       
 31124       const canHomeEnd = () => {
       
 31125         if (isGrid)
       
 31126           return true;
       
 31127         if (isHorizontal)
       
 31128           return true;
       
 31129         if (!state.baseElement)
       
 31130           return true;
       
 31131         if (!DLOEKDPY_isTextField(state.baseElement))
       
 31132           return true;
       
 31133         return false;
       
 31134       };
       
 31135       const keyMap = {
       
 31136         ArrowUp: (isGrid || isVertical) && store.up,
       
 31137         ArrowRight: (isGrid || isHorizontal) && store.next,
       
 31138         ArrowDown: (isGrid || isVertical) && store.down,
       
 31139         ArrowLeft: (isGrid || isHorizontal) && store.previous,
       
 31140         Home: () => {
       
 31141           if (!canHomeEnd())
       
 31142             return;
       
 31143           if (!isGrid || event.ctrlKey) {
       
 31144             return store == null ? void 0 : store.first();
       
 31145           }
       
 31146           return store == null ? void 0 : store.previous(-1);
       
 31147         },
       
 31148         End: () => {
       
 31149           if (!canHomeEnd())
       
 31150             return;
       
 31151           if (!isGrid || event.ctrlKey) {
       
 31152             return store == null ? void 0 : store.last();
       
 31153           }
       
 31154           return store == null ? void 0 : store.next(-1);
       
 31155         },
       
 31156         PageUp: () => {
       
 31157           return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.up, true);
       
 31158         },
       
 31159         PageDown: () => {
       
 31160           return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.down);
       
 31161         }
       
 31162       };
       
 31163       const action = keyMap[event.key];
       
 31164       if (action) {
       
 31165         const nextId = action();
       
 31166         if (preventScrollOnKeyDownProp(event) || nextId !== void 0) {
       
 31167           if (!moveOnKeyPressProp(event))
       
 31168             return;
       
 31169           event.preventDefault();
       
 31170           store.move(nextId);
       
 31171         }
       
 31172       }
       
 31173     });
       
 31174     const baseElement = useStoreState(
       
 31175       store,
       
 31176       (state) => (state == null ? void 0 : state.baseElement) || void 0
       
 31177     );
       
 31178     const providerValue = (0,external_React_.useMemo)(
       
 31179       () => ({ id, baseElement }),
       
 31180       [id, baseElement]
       
 31181     );
       
 31182     props = useWrapElement(
       
 31183       props,
       
 31184       (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CompositeItemContext.Provider, { value: providerValue, children: element }),
       
 31185       [providerValue]
       
 31186     );
       
 31187     const isActiveItem = useStoreState(
       
 31188       store,
       
 31189       (state) => !!state && state.activeId === id
       
 31190     );
       
 31191     const virtualFocus = useStoreState(store, "virtualFocus");
       
 31192     const role = useRole(ref, props);
       
 31193     let ariaSelected;
       
 31194     if (isActiveItem) {
       
 31195       if (requiresAriaSelected(role)) {
       
 31196         ariaSelected = true;
       
 31197       } else if (virtualFocus && supportsAriaSelected(role)) {
       
 31198         ariaSelected = true;
       
 31199       }
       
 31200     }
       
 31201     const ariaSetSize = useStoreState(store, (state) => {
       
 31202       if (ariaSetSizeProp != null)
       
 31203         return ariaSetSizeProp;
       
 31204       if (!state)
       
 31205         return;
       
 31206       if (!(row == null ? void 0 : row.ariaSetSize))
       
 31207         return;
       
 31208       if (row.baseElement !== state.baseElement)
       
 31209         return;
       
 31210       return row.ariaSetSize;
       
 31211     });
       
 31212     const ariaPosInSet = useStoreState(store, (state) => {
       
 31213       if (ariaPosInSetProp != null)
       
 31214         return ariaPosInSetProp;
       
 31215       if (!state)
       
 31216         return;
       
 31217       if (!(row == null ? void 0 : row.ariaPosInSet))
       
 31218         return;
       
 31219       if (row.baseElement !== state.baseElement)
       
 31220         return;
       
 31221       const itemsInRow = state.renderedItems.filter(
       
 31222         (item) => item.rowId === rowId
       
 31223       );
       
 31224       return row.ariaPosInSet + itemsInRow.findIndex((item) => item.id === id);
       
 31225     });
       
 31226     const isTabbable = useStoreState(store, (state) => {
       
 31227       if (!(state == null ? void 0 : state.renderedItems.length))
       
 31228         return true;
       
 31229       if (state.virtualFocus)
       
 31230         return false;
       
 31231       if (tabbable)
       
 31232         return true;
       
 31233       return state.activeId === id;
       
 31234     });
       
 31235     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 31236       id,
       
 31237       "aria-selected": ariaSelected,
       
 31238       "data-active-item": isActiveItem ? "" : void 0
       
 31239     }, props), {
       
 31240       ref: useMergeRefs(ref, props.ref),
       
 31241       tabIndex: isTabbable ? props.tabIndex : -1,
       
 31242       onFocus,
       
 31243       onBlurCapture,
       
 31244       onKeyDown
       
 31245     });
       
 31246     props = useCommand(props);
       
 31247     props = useCollectionItem(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 31248       store
       
 31249     }, props), {
       
 31250       getItem,
       
 31251       shouldRegisterItem: !!id ? props.shouldRegisterItem : false
       
 31252     }));
       
 31253     return _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), {
       
 31254       "aria-setsize": ariaSetSize,
       
 31255       "aria-posinset": ariaPosInSet
       
 31256     });
       
 31257   }
       
 31258 );
       
 31259 var QZLXIDNP_CompositeItem = createMemoComponent(
       
 31260   (props) => {
       
 31261     const htmlProps = useCompositeItem(props);
       
 31262     return createElement("button", htmlProps);
       
 31263   }
       
 31264 );
       
 31265 if (false) {}
       
 31266 
       
 31267 
       
 31268 
       
 31269 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/combobox/combobox-item.js
       
 31270 "use client";
       
 31271 
       
 31272 
       
 31273 
       
 31274 
       
 31275 
       
 31276 
       
 31277 
       
 31278 
       
 31279 
       
 31280 
       
 31281 
       
 31282 
       
 31283 
       
 31284 
       
 31285 
       
 31286 
       
 31287 
       
 31288 
       
 31289 
       
 31290 // src/combobox/combobox-item.tsx
       
 31291 
       
 31292 
       
 31293 
       
 31294 
       
 31295 
       
 31296 
       
 31297 function isSelected(storeValue, itemValue) {
       
 31298   if (itemValue == null)
       
 31299     return;
       
 31300   if (storeValue == null)
       
 31301     return false;
       
 31302   if (Array.isArray(storeValue)) {
       
 31303     return storeValue.includes(itemValue);
       
 31304   }
       
 31305   return storeValue === itemValue;
       
 31306 }
       
 31307 var useComboboxItem = createHook(
       
 31308   (_a) => {
       
 31309     var _b = _a, {
       
 31310       store,
       
 31311       value,
       
 31312       hideOnClick,
       
 31313       selectValueOnClick = true,
       
 31314       setValueOnClick,
       
 31315       focusOnHover = false,
       
 31316       moveOnKeyPress = true,
       
 31317       getItem: getItemProp
       
 31318     } = _b, props = __objRest(_b, [
       
 31319       "store",
       
 31320       "value",
       
 31321       "hideOnClick",
       
 31322       "selectValueOnClick",
       
 31323       "setValueOnClick",
       
 31324       "focusOnHover",
       
 31325       "moveOnKeyPress",
       
 31326       "getItem"
       
 31327     ]);
       
 31328     const context = useComboboxScopedContext();
       
 31329     store = store || context;
       
 31330     invariant(
       
 31331       store,
       
 31332        false && 0
       
 31333     );
       
 31334     const getItem = (0,external_React_.useCallback)(
       
 31335       (item) => {
       
 31336         const nextItem = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, item), { value });
       
 31337         if (getItemProp) {
       
 31338           return getItemProp(nextItem);
       
 31339         }
       
 31340         return nextItem;
       
 31341       },
       
 31342       [value, getItemProp]
       
 31343     );
       
 31344     const multiSelectable = store.useState(
       
 31345       (state) => Array.isArray(state.selectedValue)
       
 31346     );
       
 31347     setValueOnClick = setValueOnClick != null ? setValueOnClick : !multiSelectable;
       
 31348     hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;
       
 31349     const onClickProp = props.onClick;
       
 31350     const setValueOnClickProp = useBooleanEvent(setValueOnClick);
       
 31351     const selectValueOnClickProp = useBooleanEvent(selectValueOnClick);
       
 31352     const hideOnClickProp = useBooleanEvent(hideOnClick);
       
 31353     const onClick = useEvent((event) => {
       
 31354       onClickProp == null ? void 0 : onClickProp(event);
       
 31355       if (event.defaultPrevented)
       
 31356         return;
       
 31357       if (isDownloading(event))
       
 31358         return;
       
 31359       if (isOpeningInNewTab(event))
       
 31360         return;
       
 31361       if (value != null) {
       
 31362         if (selectValueOnClickProp(event)) {
       
 31363           store == null ? void 0 : store.setSelectedValue((prevValue) => {
       
 31364             if (!Array.isArray(prevValue))
       
 31365               return value;
       
 31366             if (prevValue.includes(value)) {
       
 31367               return prevValue.filter((v) => v !== value);
       
 31368             }
       
 31369             return [...prevValue, value];
       
 31370           });
       
 31371         }
       
 31372         if (setValueOnClickProp(event)) {
       
 31373           store == null ? void 0 : store.setValue(value);
       
 31374         }
       
 31375       }
       
 31376       if (hideOnClickProp(event)) {
       
 31377         store == null ? void 0 : store.move(null);
       
 31378         store == null ? void 0 : store.hide();
       
 31379       }
       
 31380     });
       
 31381     const onKeyDownProp = props.onKeyDown;
       
 31382     const onKeyDown = useEvent((event) => {
       
 31383       onKeyDownProp == null ? void 0 : onKeyDownProp(event);
       
 31384       if (event.defaultPrevented)
       
 31385         return;
       
 31386       const baseElement = store == null ? void 0 : store.getState().baseElement;
       
 31387       if (!baseElement)
       
 31388         return;
       
 31389       if (hasFocus(baseElement))
       
 31390         return;
       
 31391       const printable = event.key.length === 1;
       
 31392       if (printable || event.key === "Backspace" || event.key === "Delete") {
       
 31393         queueMicrotask(() => baseElement.focus());
       
 31394         if (DLOEKDPY_isTextField(baseElement)) {
       
 31395           store == null ? void 0 : store.setValue(baseElement.value);
       
 31396         }
       
 31397       }
       
 31398     });
       
 31399     const selected = store.useState(
       
 31400       (state) => isSelected(state.selectedValue, value)
       
 31401     );
       
 31402     if (multiSelectable && selected != null) {
       
 31403       props = _4R3V3JGP_spreadValues({
       
 31404         "aria-selected": selected
       
 31405       }, props);
       
 31406     }
       
 31407     props = useWrapElement(
       
 31408       props,
       
 31409       (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ComboboxItemValueContext.Provider, { value, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ComboboxItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }) }),
       
 31410       [value, selected]
       
 31411     );
       
 31412     const contentElement = store.useState("contentElement");
       
 31413     props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 31414       role: getPopupItemRole(contentElement),
       
 31415       children: value
       
 31416     }, props), {
       
 31417       onClick,
       
 31418       onKeyDown
       
 31419     });
       
 31420     const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
       
 31421     props = useCompositeItem(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
       
 31422       store
       
 31423     }, props), {
       
 31424       getItem,
       
 31425       // Dispatch a custom event on the combobox input when moving to an item
       
 31426       // with the keyboard so the Combobox component can enable inline
       
 31427       // autocompletion.
       
 31428       moveOnKeyPress: (event) => {
       
 31429         if (!moveOnKeyPressProp(event))
       
 31430           return false;
       
 31431         const moveEvent = new Event("combobox-item-move");
       
 31432         const baseElement = store == null ? void 0 : store.getState().baseElement;
       
 31433         baseElement == null ? void 0 : baseElement.dispatchEvent(moveEvent);
       
 31434         return true;
       
 31435       }
       
 31436     }));
       
 31437     props = useCompositeHover(_4R3V3JGP_spreadValues({ store, focusOnHover }, props));
       
 31438     return props;
       
 31439   }
       
 31440 );
       
 31441 var ComboboxItem = createMemoComponent(
       
 31442   (props) => {
       
 31443     const htmlProps = useComboboxItem(props);
       
 31444     return createElement("div", htmlProps);
       
 31445   }
       
 31446 );
       
 31447 if (false) {}
       
 31448 
       
 31449 
       
 31450 ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/combobox/combobox-item-value.js
       
 31451 "use client";
       
 31452 
       
 31453 
       
 31454 
       
 31455 
       
 31456 
       
 31457 
       
 31458 
       
 31459 
       
 31460 
       
 31461 
       
 31462 
       
 31463 // src/combobox/combobox-item-value.tsx
       
 31464 
       
 31465 
       
 31466 
       
 31467 function normalizeValue(value) {
       
 31468   return normalizeString(value).toLowerCase();
       
 31469 }
       
 31470 function splitValue(itemValue, userValue) {
       
 31471   userValue = normalizeValue(userValue);
       
 31472   let index = normalizeValue(itemValue).indexOf(userValue);
       
 31473   const parts = [];
       
 31474   while (index !== -1) {
       
 31475     if (index !== 0) {
       
 31476       parts.push(
       
 31477         /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { "data-autocomplete-value": "", children: itemValue.substr(0, index) }, parts.length)
       
 31478       );
       
 31479     }
       
 31480     parts.push(
       
 31481       /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { "data-user-value": "", children: itemValue.substr(index, userValue.length) }, parts.length)
       
 31482     );
       
 31483     itemValue = itemValue.substr(index + userValue.length);
       
 31484     index = normalizeValue(itemValue).indexOf(userValue);
       
 31485   }
       
 31486   if (itemValue) {
       
 31487     parts.push(
       
 31488       /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { "data-autocomplete-value": "", children: itemValue }, parts.length)
       
 31489     );
       
 31490   }
       
 31491   return parts;
       
 31492 }
       
 31493 var useComboboxItemValue = createHook(
       
 31494   (_a) => {
       
 31495     var _b = _a, { store, value } = _b, props = __objRest(_b, ["store", "value"]);
       
 31496     const context = useComboboxScopedContext();
       
 31497     store = store || context;
       
 31498     const itemContext = (0,external_React_.useContext)(ComboboxItemValueContext);
       
 31499     const itemValue = value != null ? value : itemContext;
       
 31500     invariant(
       
 31501       store,
       
 31502        false && 0
       
 31503     );
       
 31504     const stateValue = store.useState(
       
 31505       (state) => itemValue && state.value ? state.value : void 0
       
 31506     );
       
 31507     const children = (0,external_React_.useMemo)(
       
 31508       () => itemValue && stateValue ? splitValue(itemValue, stateValue) : itemValue,
       
 31509       [itemValue, stateValue]
       
 31510     );
       
 31511     props = _4R3V3JGP_spreadValues({
       
 31512       children
       
 31513     }, props);
       
 31514     return props;
       
 31515   }
       
 31516 );
       
 31517 var ComboboxItemValue = createComponent(
       
 31518   (props) => {
       
 31519     const htmlProps = useComboboxItemValue(props);
       
 31520     return createElement("span", htmlProps);
       
 31521   }
       
 31522 );
       
 31523 if (false) {}
       
 31524 
       
 31525 
       
 31526 // EXTERNAL MODULE: ./node_modules/remove-accents/index.js
       
 31527 var remove_accents = __webpack_require__(9681);
       
 31528 var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
       
 31529 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
       
 31530 /**
       
 31531  * WordPress dependencies
       
 31532  */
       
 31533 
       
 31534 
       
 31535 const check = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 31536   xmlns: "http://www.w3.org/2000/svg",
       
 31537   viewBox: "0 0 24 24",
       
 31538   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 31539     d: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"
       
 31540   })
       
 31541 });
       
 31542 /* harmony default export */ const library_check = (check);
       
 31543 
       
 31544 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/search-widget.js
       
 31545 /**
       
 31546  * External dependencies
       
 31547  */
       
 31548 // eslint-disable-next-line no-restricted-imports
       
 31549 
       
 31550 
       
 31551 
       
 31552 /**
       
 31553  * WordPress dependencies
       
 31554  */
       
 31555 
       
 31556 
       
 31557 
       
 31558 
       
 31559 
       
 31560 
       
 31561 /**
       
 31562  * Internal dependencies
       
 31563  */
       
 31564 
       
 31565 
       
 31566 
       
 31567 const {
       
 31568   CompositeV2: search_widget_Composite,
       
 31569   CompositeItemV2: search_widget_CompositeItem,
       
 31570   useCompositeStoreV2: search_widget_useCompositeStore
       
 31571 } = build_module_lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 31572 const radioCheck = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 31573   xmlns: "http://www.w3.org/2000/svg",
       
 31574   viewBox: "0 0 24 24",
       
 31575   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Circle, {
       
 31576     cx: 12,
       
 31577     cy: 12,
       
 31578     r: 3
       
 31579   })
       
 31580 });
       
 31581 function normalizeSearchInput(input = '') {
       
 31582   return remove_accents_default()(input.trim().toLowerCase());
       
 31583 }
       
 31584 const search_widget_EMPTY_ARRAY = [];
       
 31585 const getCurrentValue = (filterDefinition, currentFilter) => {
       
 31586   if (filterDefinition.singleSelection) {
       
 31587     return currentFilter?.value;
       
 31588   }
       
 31589   if (Array.isArray(currentFilter?.value)) {
       
 31590     return currentFilter.value;
       
 31591   }
       
 31592   if (!Array.isArray(currentFilter?.value) && !!currentFilter?.value) {
       
 31593     return [currentFilter.value];
       
 31594   }
       
 31595   return search_widget_EMPTY_ARRAY;
       
 31596 };
       
 31597 const getNewValue = (filterDefinition, currentFilter, value) => {
       
 31598   if (filterDefinition.singleSelection) {
       
 31599     return value;
       
 31600   }
       
 31601   if (Array.isArray(currentFilter?.value)) {
       
 31602     return currentFilter.value.includes(value) ? currentFilter.value.filter(v => v !== value) : [...currentFilter.value, value];
       
 31603   }
       
 31604   return [value];
       
 31605 };
       
 31606 function ListBox({
       
 31607   view,
       
 31608   filter,
       
 31609   onChangeView
       
 31610 }) {
       
 31611   const compositeStore = search_widget_useCompositeStore({
       
 31612     virtualFocus: true,
       
 31613     focusLoop: true,
       
 31614     // When we have no or just one operator, we can set the first item as active.
       
 31615     // We do that by passing `undefined` to `defaultActiveId`. Otherwise, we set it to `null`,
       
 31616     // so the first item is not selected, since the focus is on the operators control.
       
 31617     defaultActiveId: filter.operators?.length === 1 ? undefined : null
       
 31618   });
       
 31619   const currentFilter = view.filters.find(f => f.field === filter.field);
       
 31620   const currentValue = getCurrentValue(filter, currentFilter);
       
 31621   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(search_widget_Composite, {
       
 31622     store: compositeStore,
       
 31623     role: "listbox",
       
 31624     className: "dataviews-search-widget-listbox",
       
 31625     "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: List of items for a filter. 1: Filter name. e.g.: "List of: Author". */
       
 31626     (0,external_wp_i18n_namespaceObject.__)('List of: %1$s'), filter.name),
       
 31627     onFocusVisible: () => {
       
 31628       if (!compositeStore.getState().activeId) {
       
 31629         compositeStore.move(compositeStore.first());
       
 31630       }
       
 31631     },
       
 31632     render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CompositeTypeahead, {
       
 31633       store: compositeStore
       
 31634     }),
       
 31635     children: filter.elements.map(element => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(CompositeHover, {
       
 31636       store: compositeStore,
       
 31637       render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(search_widget_CompositeItem, {
       
 31638         render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 31639           "aria-label": element.label,
       
 31640           role: "option",
       
 31641           className: "dataviews-search-widget-listitem"
       
 31642         }),
       
 31643         onClick: () => {
       
 31644           const newFilters = currentFilter ? [...view.filters.map(_filter => {
       
 31645             if (_filter.field === filter.field) {
       
 31646               return {
       
 31647                 ..._filter,
       
 31648                 operator: currentFilter.operator || filter.operators[0],
       
 31649                 value: getNewValue(filter, currentFilter, element.value)
       
 31650               };
       
 31651             }
       
 31652             return _filter;
       
 31653           })] : [...view.filters, {
       
 31654             field: filter.field,
       
 31655             operator: filter.operators[0],
       
 31656             value: getNewValue(filter, currentFilter, element.value)
       
 31657           }];
       
 31658           onChangeView({
       
 31659             ...view,
       
 31660             page: 1,
       
 31661             filters: newFilters
       
 31662           });
       
 31663         }
       
 31664       }),
       
 31665       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
       
 31666         className: "dataviews-search-widget-listitem-check",
       
 31667         children: [filter.singleSelection && currentValue === element.value && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 31668           icon: radioCheck
       
 31669         }), !filter.singleSelection && currentValue.includes(element.value) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 31670           icon: library_check
       
 31671         })]
       
 31672       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
       
 31673         children: [element.label, !!element.description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 31674           className: "dataviews-search-widget-listitem-description",
       
 31675           children: element.description
       
 31676         })]
       
 31677       })]
       
 31678     }, element.value))
       
 31679   });
       
 31680 }
       
 31681 function search_widget_ComboboxList({
       
 31682   view,
       
 31683   filter,
       
 31684   onChangeView
       
 31685 }) {
       
 31686   const [searchValue, setSearchValue] = (0,external_wp_element_namespaceObject.useState)('');
       
 31687   const deferredSearchValue = (0,external_wp_element_namespaceObject.useDeferredValue)(searchValue);
       
 31688   const currentFilter = view.filters.find(_filter => _filter.field === filter.field);
       
 31689   const currentValue = getCurrentValue(filter, currentFilter);
       
 31690   const matches = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 31691     const normalizedSearch = normalizeSearchInput(deferredSearchValue);
       
 31692     return filter.elements.filter(item => normalizeSearchInput(item.label).includes(normalizedSearch));
       
 31693   }, [filter.elements, deferredSearchValue]);
       
 31694   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ComboboxProvider, {
       
 31695     resetValueOnSelect: false,
       
 31696     selectedValue: currentValue,
       
 31697     setSelectedValue: value => {
       
 31698       const newFilters = currentFilter ? [...view.filters.map(_filter => {
       
 31699         if (_filter.field === filter.field) {
       
 31700           return {
       
 31701             ..._filter,
       
 31702             operator: currentFilter.operator || filter.operators[0],
       
 31703             value
       
 31704           };
       
 31705         }
       
 31706         return _filter;
       
 31707       })] : [...view.filters, {
       
 31708         field: filter.field,
       
 31709         operator: filter.operators[0],
       
 31710         value
       
 31711       }];
       
 31712       onChangeView({
       
 31713         ...view,
       
 31714         page: 1,
       
 31715         filters: newFilters
       
 31716       });
       
 31717     },
       
 31718     setValue: setSearchValue,
       
 31719     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 31720       className: "dataviews-search-widget-filter-combobox__wrapper",
       
 31721       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComboboxLabel, {
       
 31722         render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
       
 31723           children: (0,external_wp_i18n_namespaceObject.__)('Search items')
       
 31724         }),
       
 31725         children: (0,external_wp_i18n_namespaceObject.__)('Search items')
       
 31726       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Combobox, {
       
 31727         autoSelect: "always",
       
 31728         placeholder: (0,external_wp_i18n_namespaceObject.__)('Search'),
       
 31729         className: "dataviews-search-widget-filter-combobox__input"
       
 31730       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 31731         className: "dataviews-search-widget-filter-combobox__icon",
       
 31732         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 31733           icon: library_search
       
 31734         })
       
 31735       })]
       
 31736     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ComboboxList, {
       
 31737       className: "dataviews-search-widget-filter-combobox-list",
       
 31738       alwaysVisible: true,
       
 31739       children: [matches.map(element => {
       
 31740         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ComboboxItem, {
       
 31741           value: element.value,
       
 31742           className: "dataviews-search-widget-listitem",
       
 31743           hideOnClick: false,
       
 31744           setValueOnClick: false,
       
 31745           focusOnHover: true,
       
 31746           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
       
 31747             className: "dataviews-search-widget-listitem-check",
       
 31748             children: [filter.singleSelection && currentValue === element.value && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 31749               icon: radioCheck
       
 31750             }), !filter.singleSelection && currentValue.includes(element.value) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 31751               icon: library_check
       
 31752             })]
       
 31753           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
       
 31754             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComboboxItemValue, {
       
 31755               className: "dataviews-search-widget-filter-combobox-item-value",
       
 31756               value: element.label
       
 31757             }), !!element.description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 31758               className: "dataviews-search-widget-listitem-description",
       
 31759               children: element.description
       
 31760             })]
       
 31761           })]
       
 31762         }, element.value);
       
 31763       }), !matches.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 31764         children: (0,external_wp_i18n_namespaceObject.__)('No results found')
       
 31765       })]
       
 31766     })]
       
 31767   });
       
 31768 }
       
 31769 function SearchWidget(props) {
       
 31770   const Widget = props.filter.elements.length > 10 ? search_widget_ComboboxList : ListBox;
       
 31771   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Widget, {
       
 31772     ...props
       
 31773   });
       
 31774 }
       
 31775 
       
 31776 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/filter-summary.js
       
 31777 /**
       
 31778  * External dependencies
       
 31779  */
       
 31780 
       
 31781 /**
       
 31782  * WordPress dependencies
       
 31783  */
       
 31784 
       
 31785 
       
 31786 
       
 31787 
       
 31788 const ENTER = 'Enter';
       
 31789 const SPACE = ' ';
       
 31790 
       
 31791 /**
       
 31792  * Internal dependencies
       
 31793  */
       
 31794 
       
 31795 
       
 31796 
       
 31797 
       
 31798 const FilterText = ({
       
 31799   activeElements,
       
 31800   filterInView,
       
 31801   filter
       
 31802 }) => {
       
 31803   if (activeElements === undefined || activeElements.length === 0) {
       
 31804     return filter.name;
       
 31805   }
       
 31806   const filterTextWrappers = {
       
 31807     Name: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 31808       className: "dataviews-filter-summary__filter-text-name"
       
 31809     }),
       
 31810     Value: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 31811       className: "dataviews-filter-summary__filter-text-value"
       
 31812     })
       
 31813   };
       
 31814   if (filterInView?.operator === constants_OPERATOR_IS_ANY) {
       
 31815     return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name. 3: Filter value. e.g.: "Author is any: Admin, Editor". */
       
 31816     (0,external_wp_i18n_namespaceObject.__)('<Name>%1$s is any: </Name><Value>%2$s</Value>'), filter.name, activeElements.map(element => element.label).join(', ')), filterTextWrappers);
       
 31817   }
       
 31818   if (filterInView?.operator === constants_OPERATOR_IS_NONE) {
       
 31819     return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name. 3: Filter value. e.g.: "Author is none: Admin, Editor". */
       
 31820     (0,external_wp_i18n_namespaceObject.__)('<Name>%1$s is none: </Name><Value>%2$s</Value>'), filter.name, activeElements.map(element => element.label).join(', ')), filterTextWrappers);
       
 31821   }
       
 31822   if (filterInView?.operator === OPERATOR_IS_ALL) {
       
 31823     return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name. 3: Filter value. e.g.: "Author is all: Admin, Editor". */
       
 31824     (0,external_wp_i18n_namespaceObject.__)('<Name>%1$s is all: </Name><Value>%2$s</Value>'), filter.name, activeElements.map(element => element.label).join(', ')), filterTextWrappers);
       
 31825   }
       
 31826   if (filterInView?.operator === OPERATOR_IS_NOT_ALL) {
       
 31827     return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name. 3: Filter value. e.g.: "Author is not all: Admin, Editor". */
       
 31828     (0,external_wp_i18n_namespaceObject.__)('<Name>%1$s is not all: </Name><Value>%2$s</Value>'), filter.name, activeElements.map(element => element.label).join(', ')), filterTextWrappers);
       
 31829   }
       
 31830   if (filterInView?.operator === constants_OPERATOR_IS) {
       
 31831     return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name. 3: Filter value. e.g.: "Author is: Admin". */
       
 31832     (0,external_wp_i18n_namespaceObject.__)('<Name>%1$s is: </Name><Value>%2$s</Value>'), filter.name, activeElements[0].label), filterTextWrappers);
       
 31833   }
       
 31834   if (filterInView?.operator === constants_OPERATOR_IS_NOT) {
       
 31835     return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name. 3: Filter value. e.g.: "Author is not: Admin". */
       
 31836     (0,external_wp_i18n_namespaceObject.__)('<Name>%1$s is not: </Name><Value>%2$s</Value>'), filter.name, activeElements[0].label), filterTextWrappers);
       
 31837   }
       
 31838   return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name e.g.: "Unknown status for Author". */
       
 31839   (0,external_wp_i18n_namespaceObject.__)('Unknown status for %1$s'), filter.name);
       
 31840 };
       
 31841 function OperatorSelector({
       
 31842   filter,
       
 31843   view,
       
 31844   onChangeView
       
 31845 }) {
       
 31846   const operatorOptions = filter.operators?.map(operator => ({
       
 31847     value: operator,
       
 31848     label: OPERATORS[operator]?.label
       
 31849   }));
       
 31850   const currentFilter = view.filters.find(_filter => _filter.field === filter.field);
       
 31851   const value = currentFilter?.operator || filter.operators[0];
       
 31852   return operatorOptions.length > 1 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 31853     spacing: 2,
       
 31854     justify: "flex-start",
       
 31855     className: "dataviews-filter-summary__operators-container",
       
 31856     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 31857       className: "dataviews-filter-summary__operators-filter-name",
       
 31858       children: filter.name
       
 31859     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
       
 31860       label: (0,external_wp_i18n_namespaceObject.__)('Conditions'),
       
 31861       value: value,
       
 31862       options: operatorOptions,
       
 31863       onChange: newValue => {
       
 31864         const operator = newValue;
       
 31865         const newFilters = currentFilter ? [...view.filters.map(_filter => {
       
 31866           if (_filter.field === filter.field) {
       
 31867             return {
       
 31868               ..._filter,
       
 31869               operator
       
 31870             };
       
 31871           }
       
 31872           return _filter;
       
 31873         })] : [...view.filters, {
       
 31874           field: filter.field,
       
 31875           operator,
       
 31876           value: undefined
       
 31877         }];
       
 31878         onChangeView({
       
 31879           ...view,
       
 31880           page: 1,
       
 31881           filters: newFilters
       
 31882         });
       
 31883       },
       
 31884       size: "small",
       
 31885       __nextHasNoMarginBottom: true,
       
 31886       hideLabelFromVision: true
       
 31887     })]
       
 31888   });
       
 31889 }
       
 31890 function FilterSummary({
       
 31891   addFilterRef,
       
 31892   openedFilter,
       
 31893   ...commonProps
       
 31894 }) {
       
 31895   const toggleRef = (0,external_wp_element_namespaceObject.useRef)(null);
       
 31896   const {
       
 31897     filter,
       
 31898     view,
       
 31899     onChangeView
       
 31900   } = commonProps;
       
 31901   const filterInView = view.filters.find(f => f.field === filter.field);
       
 31902   const activeElements = filter.elements.filter(element => {
       
 31903     if (filter.singleSelection) {
       
 31904       return element.value === filterInView?.value;
       
 31905     }
       
 31906     return filterInView?.value?.includes(element.value);
       
 31907   });
       
 31908   const isPrimary = filter.isPrimary;
       
 31909   const hasValues = filterInView?.value !== undefined;
       
 31910   const canResetOrRemove = !isPrimary || hasValues;
       
 31911   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
       
 31912     defaultOpen: openedFilter === filter.field,
       
 31913     contentClassName: "dataviews-filter-summary__popover",
       
 31914     popoverProps: {
       
 31915       placement: 'bottom-start',
       
 31916       role: 'dialog'
       
 31917     },
       
 31918     onClose: () => {
       
 31919       toggleRef.current?.focus();
       
 31920     },
       
 31921     renderToggle: ({
       
 31922       isOpen,
       
 31923       onToggle
       
 31924     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 31925       className: "dataviews-filter-summary__chip-container",
       
 31926       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
       
 31927         text: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Filter name. */
       
 31928         (0,external_wp_i18n_namespaceObject.__)('Filter by: %1$s'), filter.name.toLowerCase()),
       
 31929         placement: "top",
       
 31930         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 31931           className: dist_clsx('dataviews-filter-summary__chip', {
       
 31932             'has-reset': canResetOrRemove,
       
 31933             'has-values': hasValues
       
 31934           }),
       
 31935           role: "button",
       
 31936           tabIndex: 0,
       
 31937           onClick: onToggle,
       
 31938           onKeyDown: event => {
       
 31939             if ([ENTER, SPACE].includes(event.key)) {
       
 31940               onToggle();
       
 31941               event.preventDefault();
       
 31942             }
       
 31943           },
       
 31944           "aria-pressed": isOpen,
       
 31945           "aria-expanded": isOpen,
       
 31946           ref: toggleRef,
       
 31947           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FilterText, {
       
 31948             activeElements: activeElements,
       
 31949             filterInView: filterInView,
       
 31950             filter: filter
       
 31951           })
       
 31952         })
       
 31953       }), canResetOrRemove && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
       
 31954         text: isPrimary ? (0,external_wp_i18n_namespaceObject.__)('Reset') : (0,external_wp_i18n_namespaceObject.__)('Remove'),
       
 31955         placement: "top",
       
 31956         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("button", {
       
 31957           className: dist_clsx('dataviews-filter-summary__chip-remove', {
       
 31958             'has-values': hasValues
       
 31959           }),
       
 31960           onClick: () => {
       
 31961             onChangeView({
       
 31962               ...view,
       
 31963               page: 1,
       
 31964               filters: view.filters.filter(_filter => _filter.field !== filter.field)
       
 31965             });
       
 31966             // If the filter is not primary and can be removed, it will be added
       
 31967             // back to the available filters from `Add filter` component.
       
 31968             if (!isPrimary) {
       
 31969               addFilterRef.current?.focus();
       
 31970             } else {
       
 31971               // If is primary, focus the toggle button.
       
 31972               toggleRef.current?.focus();
       
 31973             }
       
 31974           },
       
 31975           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 31976             icon: close_small
       
 31977           })
       
 31978         })
       
 31979       })]
       
 31980     }),
       
 31981     renderContent: () => {
       
 31982       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 31983         spacing: 0,
       
 31984         justify: "flex-start",
       
 31985         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OperatorSelector, {
       
 31986           ...commonProps
       
 31987         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SearchWidget, {
       
 31988           ...commonProps
       
 31989         })]
       
 31990       });
       
 31991     }
       
 31992   });
       
 31993 }
       
 31994 
       
 31995 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/add-filter.js
       
 31996 /**
       
 31997  * External dependencies
       
 31998  */
       
 31999 
       
 32000 /**
       
 32001  * WordPress dependencies
       
 32002  */
       
 32003 
       
 32004 
       
 32005 
       
 32006 
       
 32007 /**
       
 32008  * Internal dependencies
       
 32009  */
       
 32010 
       
 32011 
       
 32012 const {
       
 32013   DropdownMenuV2: add_filter_DropdownMenu,
       
 32014   DropdownMenuItemV2: add_filter_DropdownMenuItem,
       
 32015   DropdownMenuItemLabelV2: add_filter_DropdownMenuItemLabel
       
 32016 } = build_module_lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 32017 function AddFilter({
       
 32018   filters,
       
 32019   view,
       
 32020   onChangeView,
       
 32021   setOpenedFilter
       
 32022 }, ref) {
       
 32023   if (!filters.length || filters.every(({
       
 32024     isPrimary
       
 32025   }) => isPrimary)) {
       
 32026     return null;
       
 32027   }
       
 32028   const inactiveFilters = filters.filter(filter => !filter.isVisible);
       
 32029   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_filter_DropdownMenu, {
       
 32030     trigger: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 32031       __experimentalIsFocusable: true,
       
 32032       size: "compact",
       
 32033       className: "dataviews-filters-button",
       
 32034       variant: "tertiary",
       
 32035       disabled: !inactiveFilters.length,
       
 32036       ref: ref,
       
 32037       children: (0,external_wp_i18n_namespaceObject.__)('Add filter')
       
 32038     }),
       
 32039     children: inactiveFilters.map(filter => {
       
 32040       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_filter_DropdownMenuItem, {
       
 32041         onClick: () => {
       
 32042           setOpenedFilter(filter.field);
       
 32043           onChangeView({
       
 32044             ...view,
       
 32045             page: 1,
       
 32046             filters: [...(view.filters || []), {
       
 32047               field: filter.field,
       
 32048               value: undefined,
       
 32049               operator: filter.operators[0]
       
 32050             }]
       
 32051           });
       
 32052         },
       
 32053         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_filter_DropdownMenuItemLabel, {
       
 32054           children: filter.name
       
 32055         })
       
 32056       }, filter.field);
       
 32057     })
       
 32058   });
       
 32059 }
       
 32060 /* harmony default export */ const add_filter = ((0,external_wp_element_namespaceObject.forwardRef)(AddFilter));
       
 32061 
       
 32062 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/reset-filters.js
       
 32063 /**
       
 32064  * WordPress dependencies
       
 32065  */
       
 32066 
       
 32067 
       
 32068 
       
 32069 /**
       
 32070  * Internal dependencies
       
 32071  */
       
 32072 
       
 32073 function ResetFilter({
       
 32074   filters,
       
 32075   view,
       
 32076   onChangeView
       
 32077 }) {
       
 32078   const isPrimary = field => filters.some(_filter => _filter.field === field && _filter.isPrimary);
       
 32079   const isDisabled = !view.search && !view.filters?.some(_filter => _filter.value !== undefined || !isPrimary(_filter.field));
       
 32080   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 32081     disabled: isDisabled,
       
 32082     __experimentalIsFocusable: true,
       
 32083     size: "compact",
       
 32084     variant: "tertiary",
       
 32085     className: "dataviews-filters__reset-button",
       
 32086     onClick: () => {
       
 32087       onChangeView({
       
 32088         ...view,
       
 32089         page: 1,
       
 32090         search: '',
       
 32091         filters: []
       
 32092       });
       
 32093     },
       
 32094     children: (0,external_wp_i18n_namespaceObject.__)('Reset')
       
 32095   });
       
 32096 }
       
 32097 
       
 32098 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/filters.js
       
 32099 /**
       
 32100  * WordPress dependencies
       
 32101  */
       
 32102 
       
 32103 
       
 32104 
       
 32105 /**
       
 32106  * Internal dependencies
       
 32107  */
       
 32108 
       
 32109 
       
 32110 
       
 32111 
       
 32112 
       
 32113 
       
 32114 function _Filters({
       
 32115   fields,
       
 32116   view,
       
 32117   onChangeView,
       
 32118   openedFilter,
       
 32119   setOpenedFilter
       
 32120 }) {
       
 32121   const addFilterRef = (0,external_wp_element_namespaceObject.useRef)(null);
       
 32122   const filters = [];
       
 32123   fields.forEach(field => {
       
 32124     if (!field.elements?.length) {
       
 32125       return;
       
 32126     }
       
 32127     const operators = sanitizeOperators(field);
       
 32128     if (operators.length === 0) {
       
 32129       return;
       
 32130     }
       
 32131     const isPrimary = !!field.filterBy?.isPrimary;
       
 32132     filters.push({
       
 32133       field: field.id,
       
 32134       name: field.header,
       
 32135       elements: field.elements,
       
 32136       singleSelection: operators.some(op => [constants_OPERATOR_IS, constants_OPERATOR_IS_NOT].includes(op)),
       
 32137       operators,
       
 32138       isVisible: isPrimary || view.filters.some(f => f.field === field.id && ALL_OPERATORS.includes(f.operator)),
       
 32139       isPrimary
       
 32140     });
       
 32141   });
       
 32142   // Sort filters by primary property. We need the primary filters to be first.
       
 32143   // Then we sort by name.
       
 32144   filters.sort((a, b) => {
       
 32145     if (a.isPrimary && !b.isPrimary) {
       
 32146       return -1;
       
 32147     }
       
 32148     if (!a.isPrimary && b.isPrimary) {
       
 32149       return 1;
       
 32150     }
       
 32151     return a.name.localeCompare(b.name);
       
 32152   });
       
 32153   const addFilter = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_filter, {
       
 32154     filters: filters,
       
 32155     view: view,
       
 32156     onChangeView: onChangeView,
       
 32157     ref: addFilterRef,
       
 32158     setOpenedFilter: setOpenedFilter
       
 32159   }, "add-filter");
       
 32160   const filterComponents = [...filters.map(filter => {
       
 32161     if (!filter.isVisible) {
       
 32162       return null;
       
 32163     }
       
 32164     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FilterSummary, {
       
 32165       filter: filter,
       
 32166       view: view,
       
 32167       onChangeView: onChangeView,
       
 32168       addFilterRef: addFilterRef,
       
 32169       openedFilter: openedFilter
       
 32170     }, filter.field);
       
 32171   }), addFilter];
       
 32172   if (filterComponents.length > 1) {
       
 32173     filterComponents.push( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResetFilter, {
       
 32174       filters: filters,
       
 32175       view: view,
       
 32176       onChangeView: onChangeView
       
 32177     }, "reset-filters"));
       
 32178   }
       
 32179   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 32180     justify: "flex-start",
       
 32181     style: {
       
 32182       width: 'fit-content'
       
 32183     },
       
 32184     wrap: true,
       
 32185     children: filterComponents
       
 32186   });
       
 32187 }
       
 32188 
       
 32189 // A type assertion is used here to keep the type argument.
       
 32190 const Filters = (0,external_wp_element_namespaceObject.memo)(_Filters);
       
 32191 /* harmony default export */ const filters = (Filters);
       
 32192 
       
 32193 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/search.js
       
 32194 /**
       
 32195  * WordPress dependencies
       
 32196  */
       
 32197 
       
 32198 
       
 32199 
       
 32200 
       
 32201 
       
 32202 /**
       
 32203  * Internal dependencies
       
 32204  */
       
 32205 
       
 32206 const Search = (0,external_wp_element_namespaceObject.memo)(function Search({
       
 32207   label,
       
 32208   view,
       
 32209   onChangeView
       
 32210 }) {
       
 32211   const [search, setSearch, debouncedSearch] = (0,external_wp_compose_namespaceObject.useDebouncedInput)(view.search);
       
 32212   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 32213     var _view$search;
       
 32214     setSearch((_view$search = view.search) !== null && _view$search !== void 0 ? _view$search : '');
       
 32215   }, [view.search, setSearch]);
       
 32216   const onChangeViewRef = (0,external_wp_element_namespaceObject.useRef)(onChangeView);
       
 32217   const viewRef = (0,external_wp_element_namespaceObject.useRef)(view);
       
 32218   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 32219     onChangeViewRef.current = onChangeView;
       
 32220     viewRef.current = view;
       
 32221   }, [onChangeView, view]);
       
 32222   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 32223     onChangeViewRef.current({
       
 32224       ...viewRef.current,
       
 32225       page: 1,
       
 32226       search: debouncedSearch
       
 32227     });
       
 32228   }, [debouncedSearch]);
       
 32229   const searchLabel = label || (0,external_wp_i18n_namespaceObject.__)('Search');
       
 32230   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SearchControl, {
       
 32231     __nextHasNoMarginBottom: true,
       
 32232     onChange: setSearch,
       
 32233     value: search,
       
 32234     label: searchLabel,
       
 32235     placeholder: searchLabel,
       
 32236     size: "compact"
       
 32237   });
       
 32238 });
       
 32239 /* harmony default export */ const build_module_search = (Search);
       
 32240 
       
 32241 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/normalize-fields.js
       
 32242 /**
       
 32243  * Internal dependencies
       
 32244  */
       
 32245 
       
 32246 /**
       
 32247  * Apply default values and normalize the fields config.
       
 32248  *
       
 32249  * @param fields Fields config.
       
 32250  * @return Normalized fields config.
       
 32251  */
       
 32252 function normalizeFields(fields) {
       
 32253   return fields.map(field => {
       
 32254     const getValue = field.getValue || (({
       
 32255       item
       
 32256     }) => item[field.id]);
       
 32257     return {
       
 32258       ...field,
       
 32259       header: field.header || field.id,
       
 32260       getValue,
       
 32261       render: field.render || getValue
       
 32262     };
       
 32263   });
       
 32264 }
       
 32265 
       
 32266 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/bulk-actions-toolbar.js
       
 32267 /**
       
 32268  * WordPress dependencies
       
 32269  */
       
 32270 
       
 32271 
       
 32272 
       
 32273 
       
 32274 
       
 32275 
       
 32276 /**
       
 32277  * Internal dependencies
       
 32278  */
       
 32279 
       
 32280 
       
 32281 
       
 32282 
       
 32283 const SNACKBAR_VARIANTS = {
       
 32284   init: {
       
 32285     bottom: -48
       
 32286   },
       
 32287   open: {
       
 32288     bottom: 24,
       
 32289     transition: {
       
 32290       bottom: {
       
 32291         type: 'tween',
       
 32292         duration: 0.2,
       
 32293         ease: [0, 0, 0.2, 1]
       
 32294       }
       
 32295     }
       
 32296   },
       
 32297   exit: {
       
 32298     opacity: 0,
       
 32299     bottom: 24,
       
 32300     transition: {
       
 32301       opacity: {
       
 32302         type: 'tween',
       
 32303         duration: 0.2,
       
 32304         ease: [0, 0, 0.2, 1]
       
 32305       }
       
 32306     }
       
 32307   }
       
 32308 };
       
 32309 function ActionTrigger({
       
 32310   action,
       
 32311   onClick,
       
 32312   isBusy,
       
 32313   items
       
 32314 }) {
       
 32315   const label = typeof action.label === 'string' ? action.label : action.label(items);
       
 32316   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
       
 32317     disabled: isBusy,
       
 32318     label: label,
       
 32319     icon: action.icon,
       
 32320     isDestructive: action.isDestructive,
       
 32321     size: "compact",
       
 32322     onClick: onClick,
       
 32323     isBusy: isBusy,
       
 32324     __experimentalIsFocusable: true,
       
 32325     tooltipPosition: "top"
       
 32326   });
       
 32327 }
       
 32328 const bulk_actions_toolbar_EMPTY_ARRAY = [];
       
 32329 function ActionButton({
       
 32330   action,
       
 32331   selectedItems,
       
 32332   actionInProgress,
       
 32333   setActionInProgress
       
 32334 }) {
       
 32335   const selectedEligibleItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 32336     return selectedItems.filter(item => {
       
 32337       return !action.isEligible || action.isEligible(item);
       
 32338     });
       
 32339   }, [action, selectedItems]);
       
 32340   if ('RenderModal' in action) {
       
 32341     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionWithModal, {
       
 32342       action: action,
       
 32343       items: selectedEligibleItems,
       
 32344       ActionTrigger: ActionTrigger
       
 32345     }, action.id);
       
 32346   }
       
 32347   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionTrigger, {
       
 32348     action: action,
       
 32349     onClick: () => {
       
 32350       setActionInProgress(action.id);
       
 32351       action.callback(selectedItems);
       
 32352     },
       
 32353     items: selectedEligibleItems,
       
 32354     isBusy: actionInProgress === action.id
       
 32355   }, action.id);
       
 32356 }
       
 32357 function renderToolbarContent(selection, actionsToShow, selectedItems, actionInProgress, setActionInProgress, onSelectionChange) {
       
 32358   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 32359     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
       
 32360       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 32361         className: "dataviews-bulk-actions__selection-count",
       
 32362         children: selection.length === 1 ? (0,external_wp_i18n_namespaceObject.__)('1 item selected') : (0,external_wp_i18n_namespaceObject.sprintf)(
       
 32363         // translators: %s: Total number of selected items.
       
 32364         (0,external_wp_i18n_namespaceObject._n)('%s item selected', '%s items selected', selection.length), selection.length)
       
 32365       })
       
 32366     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
       
 32367       children: actionsToShow.map(action => {
       
 32368         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ActionButton, {
       
 32369           action: action,
       
 32370           selectedItems: selectedItems,
       
 32371           actionInProgress: actionInProgress,
       
 32372           setActionInProgress: setActionInProgress
       
 32373         }, action.id);
       
 32374       })
       
 32375     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
       
 32376       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
       
 32377         icon: close_small,
       
 32378         showTooltip: true,
       
 32379         tooltipPosition: "top",
       
 32380         label: (0,external_wp_i18n_namespaceObject.__)('Cancel'),
       
 32381         disabled: !!actionInProgress,
       
 32382         onClick: () => {
       
 32383           onSelectionChange(bulk_actions_toolbar_EMPTY_ARRAY);
       
 32384         }
       
 32385       })
       
 32386     })]
       
 32387   });
       
 32388 }
       
 32389 function ToolbarContent({
       
 32390   selection,
       
 32391   actionsToShow,
       
 32392   selectedItems,
       
 32393   onSelectionChange
       
 32394 }) {
       
 32395   const [actionInProgress, setActionInProgress] = (0,external_wp_element_namespaceObject.useState)(null);
       
 32396   const buttons = (0,external_wp_element_namespaceObject.useRef)(null);
       
 32397   if (!actionInProgress) {
       
 32398     if (buttons.current) {
       
 32399       buttons.current = null;
       
 32400     }
       
 32401     return renderToolbarContent(selection, actionsToShow, selectedItems, actionInProgress, setActionInProgress, onSelectionChange);
       
 32402   } else if (!buttons.current) {
       
 32403     buttons.current = renderToolbarContent(selection, actionsToShow, selectedItems, actionInProgress, setActionInProgress, onSelectionChange);
       
 32404   }
       
 32405   return buttons.current;
       
 32406 }
       
 32407 function BulkActionsToolbar({
       
 32408   data,
       
 32409   selection,
       
 32410   actions = bulk_actions_toolbar_EMPTY_ARRAY,
       
 32411   onSelectionChange,
       
 32412   getItemId
       
 32413 }) {
       
 32414   const isReducedMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
       
 32415   const selectedItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 32416     return data.filter(item => selection.includes(getItemId(item)));
       
 32417   }, [selection, data, getItemId]);
       
 32418   const actionsToShow = (0,external_wp_element_namespaceObject.useMemo)(() => actions.filter(action => {
       
 32419     return action.supportsBulk && action.icon && selectedItems.some(item => !action.isEligible || action.isEligible(item));
       
 32420   }), [actions, selectedItems]);
       
 32421   if (selection && selection.length === 0 || actionsToShow.length === 0) {
       
 32422     return null;
       
 32423   }
       
 32424   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
       
 32425     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
       
 32426       layout: !isReducedMotion // See https://www.framer.com/docs/animation/#layout-animations
       
 32427       ,
       
 32428       initial: "init",
       
 32429       animate: "open",
       
 32430       exit: "exit",
       
 32431       variants: isReducedMotion ? undefined : SNACKBAR_VARIANTS,
       
 32432       className: "dataviews-bulk-actions",
       
 32433       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Toolbar, {
       
 32434         label: (0,external_wp_i18n_namespaceObject.__)('Bulk actions'),
       
 32435         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 32436           className: "dataviews-bulk-actions-toolbar-wrapper",
       
 32437           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ToolbarContent, {
       
 32438             selection: selection,
       
 32439             actionsToShow: actionsToShow,
       
 32440             selectedItems: selectedItems,
       
 32441             onSelectionChange: onSelectionChange
       
 32442           })
       
 32443         })
       
 32444       })
       
 32445     })
       
 32446   });
       
 32447 }
       
 32448 
       
 32449 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataviews.js
       
 32450 /**
       
 32451  * External dependencies
       
 32452  */
       
 32453 
       
 32454 /**
       
 32455  * WordPress dependencies
       
 32456  */
       
 32457 
       
 32458 
       
 32459 
       
 32460 /**
       
 32461  * Internal dependencies
       
 32462  */
       
 32463 
       
 32464 
       
 32465 
       
 32466 
       
 32467 
       
 32468 
       
 32469 
       
 32470 
       
 32471 
       
 32472 
       
 32473 
       
 32474 const defaultGetItemId = item => item.id;
       
 32475 const defaultOnSelectionChange = () => {};
       
 32476 function dataviews_useSomeItemHasAPossibleBulkAction(actions, data) {
       
 32477   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 32478     return data.some(item => {
       
 32479       return actions.some(action => {
       
 32480         return action.supportsBulk && (!action.isEligible || action.isEligible(item));
       
 32481       });
       
 32482     });
       
 32483   }, [actions, data]);
       
 32484 }
       
 32485 function DataViews({
       
 32486   view,
       
 32487   onChangeView,
       
 32488   fields,
       
 32489   search = true,
       
 32490   searchLabel = undefined,
       
 32491   actions = [],
       
 32492   data,
       
 32493   getItemId = defaultGetItemId,
       
 32494   isLoading = false,
       
 32495   paginationInfo,
       
 32496   supportedLayouts,
       
 32497   selection: selectionProperty,
       
 32498   setSelection: setSelectionProperty,
       
 32499   onSelectionChange = defaultOnSelectionChange
       
 32500 }) {
       
 32501   const [selectionState, setSelectionState] = (0,external_wp_element_namespaceObject.useState)([]);
       
 32502   let selection, setSelection;
       
 32503   if (selectionProperty !== undefined && setSelectionProperty !== undefined) {
       
 32504     selection = selectionProperty;
       
 32505     setSelection = setSelectionProperty;
       
 32506   } else {
       
 32507     selection = selectionState;
       
 32508     setSelection = setSelectionState;
       
 32509   }
       
 32510   const [openedFilter, setOpenedFilter] = (0,external_wp_element_namespaceObject.useState)(null);
       
 32511   const onSetSelection = (0,external_wp_element_namespaceObject.useCallback)(items => {
       
 32512     setSelection(items.map(item => getItemId(item)));
       
 32513     onSelectionChange(items);
       
 32514   }, [setSelection, getItemId, onSelectionChange]);
       
 32515   const ViewComponent = VIEW_LAYOUTS.find(v => v.type === view.type)?.component;
       
 32516   const _fields = (0,external_wp_element_namespaceObject.useMemo)(() => normalizeFields(fields), [fields]);
       
 32517   const hasPossibleBulkAction = dataviews_useSomeItemHasAPossibleBulkAction(actions, data);
       
 32518   const _selection = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 32519     return selection.filter(id => data.some(item => getItemId(item) === id));
       
 32520   }, [selection, data, getItemId]);
       
 32521   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 32522     className: "dataviews-wrapper",
       
 32523     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 32524       alignment: "top",
       
 32525       justify: "start",
       
 32526       className: "dataviews-filters__view-actions",
       
 32527       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 32528         justify: "start",
       
 32529         className: "dataviews-filters__container",
       
 32530         wrap: true,
       
 32531         children: [search && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_search, {
       
 32532           label: searchLabel,
       
 32533           view: view,
       
 32534           onChangeView: onChangeView
       
 32535         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(filters, {
       
 32536           fields: _fields,
       
 32537           view: view,
       
 32538           onChangeView: onChangeView,
       
 32539           openedFilter: openedFilter,
       
 32540           setOpenedFilter: setOpenedFilter
       
 32541         })]
       
 32542       }), [constants_LAYOUT_TABLE, constants_LAYOUT_GRID].includes(view.type) && hasPossibleBulkAction && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BulkActions, {
       
 32543         actions: actions,
       
 32544         data: data,
       
 32545         onSelectionChange: onSetSelection,
       
 32546         selection: _selection,
       
 32547         getItemId: getItemId
       
 32548       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(view_actions, {
       
 32549         fields: _fields,
       
 32550         view: view,
       
 32551         onChangeView: onChangeView,
       
 32552         supportedLayouts: supportedLayouts
       
 32553       })]
       
 32554     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ViewComponent, {
       
 32555       actions: actions,
       
 32556       data: data,
       
 32557       fields: _fields,
       
 32558       getItemId: getItemId,
       
 32559       isLoading: isLoading,
       
 32560       onChangeView: onChangeView,
       
 32561       onSelectionChange: onSetSelection,
       
 32562       selection: _selection,
       
 32563       setOpenedFilter: setOpenedFilter,
       
 32564       view: view
       
 32565     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pagination, {
       
 32566       view: view,
       
 32567       onChangeView: onChangeView,
       
 32568       paginationInfo: paginationInfo
       
 32569     }), [constants_LAYOUT_TABLE, constants_LAYOUT_GRID].includes(view.type) && hasPossibleBulkAction && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BulkActionsToolbar, {
       
 32570       data: data,
       
 32571       actions: actions,
       
 32572       selection: _selection,
       
 32573       onSelectionChange: onSetSelection,
       
 32574       getItemId: getItemId
       
 32575     })]
       
 32576   });
       
 32577 }
       
 32578 
       
 32579 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page/header.js
       
 32580 /**
       
 32581  * WordPress dependencies
       
 32582  */
       
 32583 
       
 32584 
       
 32585 /**
       
 32586  * Internal dependencies
       
 32587  */
       
 32588 
       
 32589 
       
 32590 function Header({
       
 32591   title,
       
 32592   subTitle,
       
 32593   actions
       
 32594 }) {
       
 32595   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 32596     className: "edit-site-page-header",
       
 32597     as: "header",
       
 32598     spacing: 0,
       
 32599     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 32600       className: "edit-site-page-header__page-title",
       
 32601       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 32602         as: "h2",
       
 32603         level: 3,
       
 32604         weight: 500,
       
 32605         className: "edit-site-page-header__title",
       
 32606         children: title
       
 32607       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
       
 32608         className: "edit-site-page-header__actions",
       
 32609         children: actions
       
 32610       })]
       
 32611     }), subTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 32612       variant: "muted",
       
 32613       as: "p",
       
 32614       className: "edit-site-page-header__sub-title",
       
 32615       children: subTitle
       
 32616     })]
       
 32617   });
       
 32618 }
       
 32619 
       
 32620 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page/index.js
       
 32621 /**
       
 32622  * External dependencies
       
 32623  */
       
 32624 
       
 32625 
       
 32626 /**
       
 32627  * WordPress dependencies
       
 32628  */
       
 32629 
       
 32630 
       
 32631 /**
       
 32632  * Internal dependencies
       
 32633  */
       
 32634 
       
 32635 
       
 32636 
       
 32637 
       
 32638 const {
       
 32639   NavigableRegion: page_NavigableRegion
       
 32640 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 32641 function Page({
       
 32642   title,
       
 32643   subTitle,
       
 32644   actions,
       
 32645   children,
       
 32646   className,
       
 32647   hideTitleFromUI = false
       
 32648 }) {
       
 32649   const classes = dist_clsx('edit-site-page', className);
       
 32650   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(page_NavigableRegion, {
       
 32651     className: classes,
       
 32652     ariaLabel: title,
       
 32653     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 32654       className: "edit-site-page-content",
       
 32655       children: [!hideTitleFromUI && title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Header, {
       
 32656         title: title,
       
 32657         subTitle: subTitle,
       
 32658         actions: actions
       
 32659       }), children]
       
 32660     })
       
 32661   });
       
 32662 }
       
 32663 
       
 32664 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pages.js
       
 32665 /**
       
 32666  * WordPress dependencies
       
 32667  */
       
 32668 
       
 32669 
       
 32670 
       
 32671 const pages = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, {
       
 32672   xmlns: "http://www.w3.org/2000/svg",
       
 32673   viewBox: "0 0 24 24",
       
 32674   children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32675     d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"
       
 32676   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32677     d: "M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"
       
 32678   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32679     d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"
       
 32680   })]
       
 32681 });
       
 32682 /* harmony default export */ const library_pages = (pages);
       
 32683 
       
 32684 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/published.js
       
 32685 /**
       
 32686  * WordPress dependencies
       
 32687  */
       
 32688 
       
 32689 
       
 32690 const published = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 32691   xmlns: "http://www.w3.org/2000/svg",
       
 32692   viewBox: "0 0 24 24",
       
 32693   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32694     fillRule: "evenodd",
       
 32695     clipRule: "evenodd",
       
 32696     d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"
       
 32697   })
       
 32698 });
       
 32699 /* harmony default export */ const library_published = (published);
       
 32700 
       
 32701 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/scheduled.js
       
 32702 /**
       
 32703  * WordPress dependencies
       
 32704  */
       
 32705 
       
 32706 
       
 32707 const scheduled = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 32708   xmlns: "http://www.w3.org/2000/svg",
       
 32709   viewBox: "0 0 24 24",
       
 32710   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32711     fillRule: "evenodd",
       
 32712     clipRule: "evenodd",
       
 32713     d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"
       
 32714   })
       
 32715 });
       
 32716 /* harmony default export */ const library_scheduled = (scheduled);
       
 32717 
       
 32718 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drafts.js
       
 32719 /**
       
 32720  * WordPress dependencies
       
 32721  */
       
 32722 
       
 32723 
       
 32724 const drafts = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 32725   xmlns: "http://www.w3.org/2000/svg",
       
 32726   viewBox: "0 0 24 24",
       
 32727   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32728     fillRule: "evenodd",
       
 32729     clipRule: "evenodd",
       
 32730     d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"
       
 32731   })
       
 32732 });
       
 32733 /* harmony default export */ const library_drafts = (drafts);
       
 32734 
       
 32735 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pending.js
       
 32736 /**
       
 32737  * WordPress dependencies
       
 32738  */
       
 32739 
       
 32740 
       
 32741 const pending = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 32742   xmlns: "http://www.w3.org/2000/svg",
       
 32743   viewBox: "0 0 24 24",
       
 32744   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32745     fillRule: "evenodd",
       
 32746     clipRule: "evenodd",
       
 32747     d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"
       
 32748   })
       
 32749 });
       
 32750 /* harmony default export */ const library_pending = (pending);
       
 32751 
       
 32752 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/not-allowed.js
       
 32753 /**
       
 32754  * WordPress dependencies
       
 32755  */
       
 32756 
       
 32757 
       
 32758 const notAllowed = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 32759   xmlns: "http://www.w3.org/2000/svg",
       
 32760   viewBox: "0 0 24 24",
       
 32761   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 32762     fillRule: "evenodd",
       
 32763     clipRule: "evenodd",
       
 32764     d: "M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"
       
 32765   })
       
 32766 });
       
 32767 /* harmony default export */ const not_allowed = (notAllowed);
       
 32768 
       
 32769 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-dataviews/default-views.js
       
 32770 /**
       
 32771  * WordPress dependencies
       
 32772  */
       
 32773 
       
 32774 
       
 32775 
       
 32776 /**
       
 32777  * Internal dependencies
       
 32778  */
       
 32779 
       
 32780 const DEFAULT_CONFIG_PER_VIEW_TYPE = {
       
 32781   [LAYOUT_TABLE]: {
       
 32782     primaryField: 'title'
       
 32783   },
       
 32784   [LAYOUT_GRID]: {
       
 32785     mediaField: 'featured-image',
       
 32786     primaryField: 'title'
       
 32787   },
       
 32788   [LAYOUT_LIST]: {
       
 32789     primaryField: 'title',
       
 32790     mediaField: 'featured-image'
       
 32791   }
       
 32792 };
       
 32793 const DEFAULT_PAGE_BASE = {
       
 32794   type: LAYOUT_LIST,
       
 32795   search: '',
       
 32796   filters: [],
       
 32797   page: 1,
       
 32798   perPage: 20,
       
 32799   sort: {
       
 32800     field: 'date',
       
 32801     direction: 'desc'
       
 32802   },
       
 32803   // All fields are visible by default, so it's
       
 32804   // better to keep track of the hidden ones.
       
 32805   hiddenFields: ['date', 'featured-image'],
       
 32806   layout: {
       
 32807     ...DEFAULT_CONFIG_PER_VIEW_TYPE[LAYOUT_LIST]
       
 32808   }
       
 32809 };
       
 32810 const DEFAULT_VIEWS = {
       
 32811   page: [{
       
 32812     title: (0,external_wp_i18n_namespaceObject.__)('All pages'),
       
 32813     slug: 'all',
       
 32814     icon: library_pages,
       
 32815     view: DEFAULT_PAGE_BASE
       
 32816   }, {
       
 32817     title: (0,external_wp_i18n_namespaceObject.__)('Published'),
       
 32818     slug: 'published',
       
 32819     icon: library_published,
       
 32820     view: {
       
 32821       ...DEFAULT_PAGE_BASE,
       
 32822       filters: [{
       
 32823         field: 'status',
       
 32824         operator: OPERATOR_IS_ANY,
       
 32825         value: 'publish'
       
 32826       }]
       
 32827     }
       
 32828   }, {
       
 32829     title: (0,external_wp_i18n_namespaceObject.__)('Scheduled'),
       
 32830     slug: 'future',
       
 32831     icon: library_scheduled,
       
 32832     view: {
       
 32833       ...DEFAULT_PAGE_BASE,
       
 32834       filters: [{
       
 32835         field: 'status',
       
 32836         operator: OPERATOR_IS_ANY,
       
 32837         value: 'future'
       
 32838       }]
       
 32839     }
       
 32840   }, {
       
 32841     title: (0,external_wp_i18n_namespaceObject.__)('Drafts'),
       
 32842     slug: 'drafts',
       
 32843     icon: library_drafts,
       
 32844     view: {
       
 32845       ...DEFAULT_PAGE_BASE,
       
 32846       filters: [{
       
 32847         field: 'status',
       
 32848         operator: OPERATOR_IS_ANY,
       
 32849         value: 'draft'
       
 32850       }]
       
 32851     }
       
 32852   }, {
       
 32853     title: (0,external_wp_i18n_namespaceObject.__)('Pending'),
       
 32854     slug: 'pending',
       
 32855     icon: library_pending,
       
 32856     view: {
       
 32857       ...DEFAULT_PAGE_BASE,
       
 32858       filters: [{
       
 32859         field: 'status',
       
 32860         operator: OPERATOR_IS_ANY,
       
 32861         value: 'pending'
       
 32862       }]
       
 32863     }
       
 32864   }, {
       
 32865     title: (0,external_wp_i18n_namespaceObject.__)('Private'),
       
 32866     slug: 'private',
       
 32867     icon: not_allowed,
       
 32868     view: {
       
 32869       ...DEFAULT_PAGE_BASE,
       
 32870       filters: [{
       
 32871         field: 'status',
       
 32872         operator: OPERATOR_IS_ANY,
       
 32873         value: 'private'
       
 32874       }]
       
 32875     }
       
 32876   }, {
       
 32877     title: (0,external_wp_i18n_namespaceObject.__)('Trash'),
       
 32878     slug: 'trash',
       
 32879     icon: library_trash,
       
 32880     view: {
       
 32881       ...DEFAULT_PAGE_BASE,
       
 32882       filters: [{
       
 32883         field: 'status',
       
 32884         operator: OPERATOR_IS_ANY,
       
 32885         value: 'trash'
       
 32886       }]
       
 32887     }
       
 32888   }]
       
 32889 };
       
 32890 
       
 32891 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-page/index.js
       
 32892 /**
       
 32893  * WordPress dependencies
       
 32894  */
       
 32895 
       
 32896 
       
 32897 
       
 32898 
       
 32899 
       
 32900 
       
 32901 
       
 32902 
       
 32903 
       
 32904 
       
 32905 function AddNewPageModal({
       
 32906   onSave,
       
 32907   onClose
       
 32908 }) {
       
 32909   const [isCreatingPage, setIsCreatingPage] = (0,external_wp_element_namespaceObject.useState)(false);
       
 32910   const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)('');
       
 32911   const {
       
 32912     saveEntityRecord
       
 32913   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 32914   const {
       
 32915     createErrorNotice,
       
 32916     createSuccessNotice
       
 32917   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
 32918   const {
       
 32919     resolveSelect
       
 32920   } = (0,external_wp_data_namespaceObject.useRegistry)();
       
 32921   async function createPage(event) {
       
 32922     event.preventDefault();
       
 32923     if (isCreatingPage) {
       
 32924       return;
       
 32925     }
       
 32926     setIsCreatingPage(true);
       
 32927     try {
       
 32928       const pagePostType = await resolveSelect(external_wp_coreData_namespaceObject.store).getPostType('page');
       
 32929       const newPage = await saveEntityRecord('postType', 'page', {
       
 32930         status: 'draft',
       
 32931         title,
       
 32932         slug: title || (0,external_wp_i18n_namespaceObject.__)('No title'),
       
 32933         content: !!pagePostType.template && pagePostType.template.length ? (0,external_wp_blocks_namespaceObject.serialize)((0,external_wp_blocks_namespaceObject.synchronizeBlocksWithTemplate)([], pagePostType.template)) : undefined
       
 32934       }, {
       
 32935         throwOnError: true
       
 32936       });
       
 32937       onSave(newPage);
       
 32938       createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
       
 32939       // translators: %s: Title of the created template e.g: "Category".
       
 32940       (0,external_wp_i18n_namespaceObject.__)('"%s" successfully created.'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(newPage.title?.rendered || title)), {
       
 32941         type: 'snackbar'
       
 32942       });
       
 32943     } catch (error) {
       
 32944       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while creating the page.');
       
 32945       createErrorNotice(errorMessage, {
       
 32946         type: 'snackbar'
       
 32947       });
       
 32948     } finally {
       
 32949       setIsCreatingPage(false);
       
 32950     }
       
 32951   }
       
 32952   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 32953     title: (0,external_wp_i18n_namespaceObject.__)('Draft a new page'),
       
 32954     onRequestClose: onClose,
       
 32955     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
       
 32956       onSubmit: createPage,
       
 32957       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 32958         spacing: 3,
       
 32959         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
       
 32960           __next40pxDefaultSize: true,
       
 32961           label: (0,external_wp_i18n_namespaceObject.__)('Page title'),
       
 32962           onChange: setTitle,
       
 32963           placeholder: (0,external_wp_i18n_namespaceObject.__)('No title'),
       
 32964           value: title
       
 32965         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 32966           spacing: 2,
       
 32967           justify: "end",
       
 32968           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 32969             __next40pxDefaultSize: true,
       
 32970             variant: "tertiary",
       
 32971             onClick: onClose,
       
 32972             children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
       
 32973           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 32974             __next40pxDefaultSize: true,
       
 32975             variant: "primary",
       
 32976             type: "submit",
       
 32977             isBusy: isCreatingPage,
       
 32978             "aria-disabled": isCreatingPage,
       
 32979             children: (0,external_wp_i18n_namespaceObject.__)('Create draft')
       
 32980           })]
       
 32981         })]
       
 32982       })
       
 32983     })
       
 32984   });
       
 32985 }
       
 32986 
       
 32987 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/media/index.js
       
 32988 /**
       
 32989  * WordPress dependencies
       
 32990  */
       
 32991 
       
 32992 
       
 32993 function Media({
       
 32994   id,
       
 32995   size = ['large', 'medium', 'thumbnail'],
       
 32996   ...props
       
 32997 }) {
       
 32998   const {
       
 32999     record: media
       
 33000   } = (0,external_wp_coreData_namespaceObject.useEntityRecord)('root', 'media', id);
       
 33001   const currentSize = size.find(s => !!media?.media_details?.sizes[s]);
       
 33002   const mediaUrl = media?.media_details?.sizes[currentSize]?.source_url || media?.source_url;
       
 33003   if (!mediaUrl) {
       
 33004     return null;
       
 33005   }
       
 33006   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
       
 33007     ...props,
       
 33008     src: mediaUrl,
       
 33009     alt: media.alt_text
       
 33010   });
       
 33011 }
       
 33012 /* harmony default export */ const components_media = (Media);
       
 33013 
       
 33014 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
       
 33015 /**
       
 33016  * WordPress dependencies
       
 33017  */
       
 33018 
       
 33019 
       
 33020 const pencil = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 33021   xmlns: "http://www.w3.org/2000/svg",
       
 33022   viewBox: "0 0 24 24",
       
 33023   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 33024     d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"
       
 33025   })
       
 33026 });
       
 33027 /* harmony default export */ const library_pencil = (pencil);
       
 33028 
       
 33029 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
       
 33030 /**
       
 33031  * Internal dependencies
       
 33032  */
       
 33033 
       
 33034 
       
 33035 /* harmony default export */ const edit = (library_pencil);
       
 33036 
       
 33037 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/dataviews-actions/index.js
       
 33038 /**
       
 33039  * WordPress dependencies
       
 33040  */
       
 33041 
       
 33042 
       
 33043 
       
 33044 
       
 33045 
       
 33046 /**
       
 33047  * Internal dependencies
       
 33048  */
       
 33049 
       
 33050 
       
 33051 const {
       
 33052   useHistory: dataviews_actions_useHistory
       
 33053 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 33054 const useEditPostAction = () => {
       
 33055   const history = dataviews_actions_useHistory();
       
 33056   return (0,external_wp_element_namespaceObject.useMemo)(() => ({
       
 33057     id: 'edit-post',
       
 33058     label: (0,external_wp_i18n_namespaceObject.__)('Edit'),
       
 33059     isPrimary: true,
       
 33060     icon: edit,
       
 33061     isEligible(post) {
       
 33062       if (post.status === 'trash') {
       
 33063         return false;
       
 33064       }
       
 33065       // It's eligible for all post types except theme patterns.
       
 33066       return post.type !== PATTERN_TYPES.theme;
       
 33067     },
       
 33068     callback(items) {
       
 33069       const post = items[0];
       
 33070       history.push({
       
 33071         postId: post.id,
       
 33072         postType: post.type,
       
 33073         canvas: 'edit'
       
 33074       });
       
 33075     }
       
 33076   }), [history]);
       
 33077 };
       
 33078 
       
 33079 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-pages/index.js
       
 33080 /**
       
 33081  * WordPress dependencies
       
 33082  */
       
 33083 
       
 33084 
       
 33085 
       
 33086 
       
 33087 
       
 33088 
       
 33089 
       
 33090 
       
 33091 
       
 33092 
       
 33093 
       
 33094 /**
       
 33095  * Internal dependencies
       
 33096  */
       
 33097 
       
 33098 
       
 33099 
       
 33100 
       
 33101 
       
 33102 
       
 33103 
       
 33104 
       
 33105 
       
 33106 
       
 33107 
       
 33108 
       
 33109 const {
       
 33110   usePostActions
       
 33111 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 33112 const {
       
 33113   useLocation: page_pages_useLocation,
       
 33114   useHistory: page_pages_useHistory
       
 33115 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 33116 const page_pages_EMPTY_ARRAY = [];
       
 33117 const getFormattedDate = dateToDisplay => (0,external_wp_date_namespaceObject.dateI18n)((0,external_wp_date_namespaceObject.getSettings)().formats.datetimeAbbreviated, (0,external_wp_date_namespaceObject.getDate)(dateToDisplay));
       
 33118 function useView(postType) {
       
 33119   const {
       
 33120     params: {
       
 33121       activeView = 'all',
       
 33122       isCustom = 'false',
       
 33123       layout
       
 33124     }
       
 33125   } = page_pages_useLocation();
       
 33126   const history = page_pages_useHistory();
       
 33127   const selectedDefaultView = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 33128     const defaultView = isCustom === 'false' && DEFAULT_VIEWS[postType].find(({
       
 33129       slug
       
 33130     }) => slug === activeView)?.view;
       
 33131     if (isCustom === 'false' && layout) {
       
 33132       return {
       
 33133         ...defaultView,
       
 33134         type: layout,
       
 33135         layout: {
       
 33136           ...(DEFAULT_CONFIG_PER_VIEW_TYPE[layout] || {})
       
 33137         }
       
 33138       };
       
 33139     }
       
 33140     return defaultView;
       
 33141   }, [isCustom, activeView, layout, postType]);
       
 33142   const [view, setView] = (0,external_wp_element_namespaceObject.useState)(selectedDefaultView);
       
 33143   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 33144     if (selectedDefaultView) {
       
 33145       setView(selectedDefaultView);
       
 33146     }
       
 33147   }, [selectedDefaultView]);
       
 33148   const editedViewRecord = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 33149     if (isCustom !== 'true') {
       
 33150       return;
       
 33151     }
       
 33152     const {
       
 33153       getEditedEntityRecord
       
 33154     } = select(external_wp_coreData_namespaceObject.store);
       
 33155     const dataviewRecord = getEditedEntityRecord('postType', 'wp_dataviews', Number(activeView));
       
 33156     return dataviewRecord;
       
 33157   }, [activeView, isCustom]);
       
 33158   const {
       
 33159     editEntityRecord
       
 33160   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 33161   const customView = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 33162     const storedView = editedViewRecord?.content && JSON.parse(editedViewRecord?.content);
       
 33163     if (!storedView) {
       
 33164       return storedView;
       
 33165     }
       
 33166     return {
       
 33167       ...storedView,
       
 33168       layout: {
       
 33169         ...(DEFAULT_CONFIG_PER_VIEW_TYPE[storedView?.type] || {})
       
 33170       }
       
 33171     };
       
 33172   }, [editedViewRecord?.content]);
       
 33173   const setCustomView = (0,external_wp_element_namespaceObject.useCallback)(viewToSet => {
       
 33174     editEntityRecord('postType', 'wp_dataviews', editedViewRecord?.id, {
       
 33175       content: JSON.stringify(viewToSet)
       
 33176     });
       
 33177   }, [editEntityRecord, editedViewRecord?.id]);
       
 33178   const setDefaultViewAndUpdateUrl = (0,external_wp_element_namespaceObject.useCallback)(viewToSet => {
       
 33179     if (viewToSet.type !== view?.type) {
       
 33180       const {
       
 33181         params
       
 33182       } = history.getLocationWithParams();
       
 33183       history.push({
       
 33184         ...params,
       
 33185         layout: viewToSet.type
       
 33186       });
       
 33187     }
       
 33188     setView(viewToSet);
       
 33189   }, [history, view?.type]);
       
 33190   if (isCustom === 'false') {
       
 33191     return [view, setDefaultViewAndUpdateUrl];
       
 33192   } else if (isCustom === 'true' && customView) {
       
 33193     return [customView, setCustomView];
       
 33194   }
       
 33195   // Loading state where no the view was not found on custom views or default views.
       
 33196   return [DEFAULT_VIEWS[postType][0].view, setDefaultViewAndUpdateUrl];
       
 33197 }
       
 33198 
       
 33199 // See https://github.com/WordPress/gutenberg/issues/55886
       
 33200 // We do not support custom statutes at the moment.
       
 33201 const STATUSES = [{
       
 33202   value: 'draft',
       
 33203   label: (0,external_wp_i18n_namespaceObject.__)('Draft')
       
 33204 }, {
       
 33205   value: 'future',
       
 33206   label: (0,external_wp_i18n_namespaceObject.__)('Scheduled')
       
 33207 }, {
       
 33208   value: 'pending',
       
 33209   label: (0,external_wp_i18n_namespaceObject.__)('Pending Review')
       
 33210 }, {
       
 33211   value: 'private',
       
 33212   label: (0,external_wp_i18n_namespaceObject.__)('Private')
       
 33213 }, {
       
 33214   value: 'publish',
       
 33215   label: (0,external_wp_i18n_namespaceObject.__)('Published')
       
 33216 }, {
       
 33217   value: 'trash',
       
 33218   label: (0,external_wp_i18n_namespaceObject.__)('Trash')
       
 33219 }];
       
 33220 const DEFAULT_STATUSES = 'draft,future,pending,private,publish'; // All but 'trash'.
       
 33221 
       
 33222 function FeaturedImage({
       
 33223   item,
       
 33224   viewType
       
 33225 }) {
       
 33226   const isDisabled = item.status === 'trash';
       
 33227   const {
       
 33228     onClick
       
 33229   } = useLink({
       
 33230     postId: item.id,
       
 33231     postType: item.type,
       
 33232     canvas: 'edit'
       
 33233   });
       
 33234   const hasMedia = !!item.featured_media;
       
 33235   const size = viewType === LAYOUT_GRID ? ['large', 'full', 'medium', 'thumbnail'] : ['thumbnail', 'medium', 'large', 'full'];
       
 33236   const media = hasMedia ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(components_media, {
       
 33237     className: "edit-site-page-pages__featured-image",
       
 33238     id: item.featured_media,
       
 33239     size: size
       
 33240   }) : null;
       
 33241   const renderButton = viewType !== LAYOUT_LIST && !isDisabled;
       
 33242   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 33243     className: `edit-site-page-pages__featured-image-wrapper is-layout-${viewType}`,
       
 33244     children: renderButton ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("button", {
       
 33245       className: "page-pages-preview-field__button",
       
 33246       type: "button",
       
 33247       onClick: onClick,
       
 33248       "aria-label": item.title?.rendered || (0,external_wp_i18n_namespaceObject.__)('(no title)'),
       
 33249       children: media
       
 33250     }) : media
       
 33251   });
       
 33252 }
       
 33253 function getItemId(item) {
       
 33254   return item.id.toString();
       
 33255 }
       
 33256 function PagePages() {
       
 33257   var _pages$map, _usePrevious;
       
 33258   const postType = 'page';
       
 33259   const [view, setView] = useView(postType);
       
 33260   const history = page_pages_useHistory();
       
 33261   const {
       
 33262     params: {
       
 33263       postId
       
 33264     }
       
 33265   } = page_pages_useLocation();
       
 33266   const [selection, setSelection] = (0,external_wp_element_namespaceObject.useState)([postId]);
       
 33267   const onSelectionChange = (0,external_wp_element_namespaceObject.useCallback)(items => {
       
 33268     var _params$isCustom;
       
 33269     const {
       
 33270       params
       
 33271     } = history.getLocationWithParams();
       
 33272     if (((_params$isCustom = params.isCustom) !== null && _params$isCustom !== void 0 ? _params$isCustom : 'false') === 'false' && view?.type === LAYOUT_LIST) {
       
 33273       history.push({
       
 33274         ...params,
       
 33275         postId: items.length === 1 ? items[0].id : undefined
       
 33276       });
       
 33277     }
       
 33278   }, [history, view?.type]);
       
 33279   const queryArgs = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 33280     const filters = {};
       
 33281     view.filters.forEach(filter => {
       
 33282       if (filter.field === 'status' && filter.operator === OPERATOR_IS_ANY) {
       
 33283         filters.status = filter.value;
       
 33284       }
       
 33285       if (filter.field === 'author' && filter.operator === OPERATOR_IS_ANY) {
       
 33286         filters.author = filter.value;
       
 33287       } else if (filter.field === 'author' && filter.operator === OPERATOR_IS_NONE) {
       
 33288         filters.author_exclude = filter.value;
       
 33289       }
       
 33290     });
       
 33291     // We want to provide a different default item for the status filter
       
 33292     // than the REST API provides.
       
 33293     if (!filters.status || filters.status === '') {
       
 33294       filters.status = DEFAULT_STATUSES;
       
 33295     }
       
 33296     return {
       
 33297       per_page: view.perPage,
       
 33298       page: view.page,
       
 33299       _embed: 'author',
       
 33300       order: view.sort?.direction,
       
 33301       orderby: view.sort?.field,
       
 33302       search: view.search,
       
 33303       ...filters
       
 33304     };
       
 33305   }, [view]);
       
 33306   const {
       
 33307     records: pages,
       
 33308     isResolving: isLoadingPages,
       
 33309     totalItems,
       
 33310     totalPages
       
 33311   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', postType, queryArgs);
       
 33312   const ids = (_pages$map = pages?.map(page => getItemId(page))) !== null && _pages$map !== void 0 ? _pages$map : [];
       
 33313   const prevIds = (_usePrevious = (0,external_wp_compose_namespaceObject.usePrevious)(ids)) !== null && _usePrevious !== void 0 ? _usePrevious : [];
       
 33314   const deletedIds = prevIds.filter(id => !ids.includes(id));
       
 33315   const postIdWasDeleted = deletedIds.includes(postId);
       
 33316   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 33317     if (postIdWasDeleted) {
       
 33318       history.push({
       
 33319         ...history.getLocationWithParams().params,
       
 33320         postId: undefined
       
 33321       });
       
 33322     }
       
 33323   }, [postIdWasDeleted, history]);
       
 33324   const {
       
 33325     records: authors,
       
 33326     isResolving: isLoadingAuthors
       
 33327   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('root', 'user', {
       
 33328     per_page: -1
       
 33329   });
       
 33330   const paginationInfo = (0,external_wp_element_namespaceObject.useMemo)(() => ({
       
 33331     totalItems,
       
 33332     totalPages
       
 33333   }), [totalItems, totalPages]);
       
 33334   const {
       
 33335     frontPageId,
       
 33336     postsPageId,
       
 33337     addNewLabel,
       
 33338     canCreatePage
       
 33339   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 33340     const {
       
 33341       getEntityRecord,
       
 33342       getPostType,
       
 33343       canUser
       
 33344     } = select(external_wp_coreData_namespaceObject.store);
       
 33345     const siteSettings = getEntityRecord('root', 'site');
       
 33346     return {
       
 33347       frontPageId: siteSettings?.page_on_front,
       
 33348       postsPageId: siteSettings?.page_for_posts,
       
 33349       addNewLabel: getPostType('page')?.labels?.add_new_item,
       
 33350       canCreatePage: canUser('create', 'pages')
       
 33351     };
       
 33352   });
       
 33353   const fields = (0,external_wp_element_namespaceObject.useMemo)(() => [{
       
 33354     id: 'featured-image',
       
 33355     header: (0,external_wp_i18n_namespaceObject.__)('Featured Image'),
       
 33356     getValue: ({
       
 33357       item
       
 33358     }) => item.featured_media,
       
 33359     render: ({
       
 33360       item
       
 33361     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FeaturedImage, {
       
 33362       item: item,
       
 33363       viewType: view.type
       
 33364     }),
       
 33365     enableSorting: false,
       
 33366     width: '1%'
       
 33367   }, {
       
 33368     header: (0,external_wp_i18n_namespaceObject.__)('Title'),
       
 33369     id: 'title',
       
 33370     getValue: ({
       
 33371       item
       
 33372     }) => item.title?.rendered,
       
 33373     render: ({
       
 33374       item
       
 33375     }) => {
       
 33376       const addLink = [LAYOUT_TABLE, LAYOUT_GRID].includes(view.type) && item.status !== 'trash';
       
 33377       const title = addLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Link, {
       
 33378         params: {
       
 33379           postId: item.id,
       
 33380           postType: item.type,
       
 33381           canvas: 'edit'
       
 33382         },
       
 33383         children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title?.rendered) || (0,external_wp_i18n_namespaceObject.__)('(no title)')
       
 33384       }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 33385         children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title?.rendered) || (0,external_wp_i18n_namespaceObject.__)('(no title)')
       
 33386       });
       
 33387       let suffix = '';
       
 33388       if (item.id === frontPageId) {
       
 33389         suffix = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 33390           className: "edit-site-page-pages__title-badge",
       
 33391           children: (0,external_wp_i18n_namespaceObject.__)('Front Page')
       
 33392         });
       
 33393       } else if (item.id === postsPageId) {
       
 33394         suffix = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 33395           className: "edit-site-page-pages__title-badge",
       
 33396           children: (0,external_wp_i18n_namespaceObject.__)('Posts Page')
       
 33397         });
       
 33398       }
       
 33399       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 33400         className: "edit-site-page-pages-title",
       
 33401         alignment: "center",
       
 33402         justify: "flex-start",
       
 33403         children: [title, suffix]
       
 33404       });
       
 33405     },
       
 33406     maxWidth: 300,
       
 33407     enableHiding: false
       
 33408   }, {
       
 33409     header: (0,external_wp_i18n_namespaceObject.__)('Author'),
       
 33410     id: 'author',
       
 33411     getValue: ({
       
 33412       item
       
 33413     }) => item._embedded?.author[0]?.name,
       
 33414     elements: authors?.map(({
       
 33415       id,
       
 33416       name
       
 33417     }) => ({
       
 33418       value: id,
       
 33419       label: name
       
 33420     })) || []
       
 33421   }, {
       
 33422     header: (0,external_wp_i18n_namespaceObject.__)('Status'),
       
 33423     id: 'status',
       
 33424     getValue: ({
       
 33425       item
       
 33426     }) => {
       
 33427       var _STATUSES$find$label;
       
 33428       return (_STATUSES$find$label = STATUSES.find(({
       
 33429         value
       
 33430       }) => value === item.status)?.label) !== null && _STATUSES$find$label !== void 0 ? _STATUSES$find$label : item.status;
       
 33431     },
       
 33432     elements: STATUSES,
       
 33433     enableSorting: false,
       
 33434     filterBy: {
       
 33435       operators: [OPERATOR_IS_ANY]
       
 33436     }
       
 33437   }, {
       
 33438     header: (0,external_wp_i18n_namespaceObject.__)('Date'),
       
 33439     id: 'date',
       
 33440     render: ({
       
 33441       item
       
 33442     }) => {
       
 33443       const isDraftOrPrivate = ['draft', 'private'].includes(item.status);
       
 33444       if (isDraftOrPrivate) {
       
 33445         return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: page creation date */
       
 33446         (0,external_wp_i18n_namespaceObject.__)('<span>Modified: <time>%s</time></span>'), getFormattedDate(item.date)), {
       
 33447           span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {}),
       
 33448           time: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {})
       
 33449         });
       
 33450       }
       
 33451       const isScheduled = item.status === 'future';
       
 33452       if (isScheduled) {
       
 33453         return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: page creation date */
       
 33454         (0,external_wp_i18n_namespaceObject.__)('<span>Scheduled: <time>%s</time></span>'), getFormattedDate(item.date)), {
       
 33455           span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {}),
       
 33456           time: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {})
       
 33457         });
       
 33458       }
       
 33459 
       
 33460       // Pending & Published posts show the modified date if it's newer.
       
 33461       const dateToDisplay = (0,external_wp_date_namespaceObject.getDate)(item.modified) > (0,external_wp_date_namespaceObject.getDate)(item.date) ? item.modified : item.date;
       
 33462       const isPending = item.status === 'pending';
       
 33463       if (isPending) {
       
 33464         return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: the newest of created or modified date for the page */
       
 33465         (0,external_wp_i18n_namespaceObject.__)('<span>Modified: <time>%s</time></span>'), getFormattedDate(dateToDisplay)), {
       
 33466           span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {}),
       
 33467           time: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {})
       
 33468         });
       
 33469       }
       
 33470       const isPublished = item.status === 'publish';
       
 33471       if (isPublished) {
       
 33472         return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: the newest of created or modified date for the page */
       
 33473         (0,external_wp_i18n_namespaceObject.__)('<span>Published: <time>%s</time></span>'), getFormattedDate(dateToDisplay)), {
       
 33474           span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {}),
       
 33475           time: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {})
       
 33476         });
       
 33477       }
       
 33478 
       
 33479       // Unknow status.
       
 33480       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
       
 33481         children: getFormattedDate(item.date)
       
 33482       });
       
 33483     }
       
 33484   }], [authors, view.type, frontPageId, postsPageId]);
       
 33485   const postTypeActions = usePostActions({
       
 33486     postType: 'page',
       
 33487     context: 'list'
       
 33488   });
       
 33489   const editAction = useEditPostAction();
       
 33490   const actions = (0,external_wp_element_namespaceObject.useMemo)(() => [editAction, ...postTypeActions], [postTypeActions, editAction]);
       
 33491   const onChangeView = (0,external_wp_element_namespaceObject.useCallback)(newView => {
       
 33492     if (newView.type !== view.type) {
       
 33493       newView = {
       
 33494         ...newView,
       
 33495         layout: {
       
 33496           ...DEFAULT_CONFIG_PER_VIEW_TYPE[newView.type]
       
 33497         }
       
 33498       };
       
 33499     }
       
 33500     setView(newView);
       
 33501   }, [view.type, setView]);
       
 33502   const [showAddPageModal, setShowAddPageModal] = (0,external_wp_element_namespaceObject.useState)(false);
       
 33503   const openModal = () => setShowAddPageModal(true);
       
 33504   const closeModal = () => setShowAddPageModal(false);
       
 33505   const handleNewPage = ({
       
 33506     type,
       
 33507     id
       
 33508   }) => {
       
 33509     history.push({
       
 33510       postId: id,
       
 33511       postType: type,
       
 33512       canvas: 'edit'
       
 33513     });
       
 33514     closeModal();
       
 33515   };
       
 33516   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Page, {
       
 33517     title: (0,external_wp_i18n_namespaceObject.__)('Pages'),
       
 33518     actions: addNewLabel && canCreatePage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 33519       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 33520         variant: "primary",
       
 33521         onClick: openModal,
       
 33522         __next40pxDefaultSize: true,
       
 33523         children: addNewLabel
       
 33524       }), showAddPageModal && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AddNewPageModal, {
       
 33525         onSave: handleNewPage,
       
 33526         onClose: closeModal
       
 33527       })]
       
 33528     }),
       
 33529     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViews, {
       
 33530       paginationInfo: paginationInfo,
       
 33531       fields: fields,
       
 33532       actions: actions,
       
 33533       data: pages || page_pages_EMPTY_ARRAY,
       
 33534       isLoading: isLoadingPages || isLoadingAuthors,
       
 33535       view: view,
       
 33536       onChangeView: onChangeView,
       
 33537       selection: selection,
       
 33538       setSelection: setSelection,
       
 33539       onSelectionChange: onSelectionChange,
       
 33540       getItemId: getItemId
       
 33541     })
       
 33542   });
       
 33543 }
       
 33544 
       
 33545 ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/filter-and-sort-data-view.js
       
 33546 /**
       
 33547  * External dependencies
       
 33548  */
       
 33549 
       
 33550 
       
 33551 /**
       
 33552  * Internal dependencies
       
 33553  */
       
 33554 
       
 33555 
       
 33556 function filter_and_sort_data_view_normalizeSearchInput(input = '') {
       
 33557   return remove_accents_default()(input.trim().toLowerCase());
       
 33558 }
       
 33559 const filter_and_sort_data_view_EMPTY_ARRAY = [];
       
 33560 
       
 33561 /**
       
 33562  * Applies the filtering, sorting and pagination to the raw data based on the view configuration.
       
 33563  *
       
 33564  * @param data   Raw data.
       
 33565  * @param view   View config.
       
 33566  * @param fields Fields config.
       
 33567  *
       
 33568  * @return Filtered, sorted and paginated data.
       
 33569  */
       
 33570 function filterSortAndPaginate(data, view, fields) {
       
 33571   if (!data) {
       
 33572     return {
       
 33573       data: filter_and_sort_data_view_EMPTY_ARRAY,
       
 33574       paginationInfo: {
       
 33575         totalItems: 0,
       
 33576         totalPages: 0
       
 33577       }
       
 33578     };
       
 33579   }
       
 33580   const _fields = normalizeFields(fields);
       
 33581   let filteredData = [...data];
       
 33582   // Handle global search.
       
 33583   if (view.search) {
       
 33584     const normalizedSearch = filter_and_sort_data_view_normalizeSearchInput(view.search);
       
 33585     filteredData = filteredData.filter(item => {
       
 33586       return _fields.filter(field => field.enableGlobalSearch).map(field => {
       
 33587         return filter_and_sort_data_view_normalizeSearchInput(field.getValue({
       
 33588           item
       
 33589         }));
       
 33590       }).some(field => field.includes(normalizedSearch));
       
 33591     });
       
 33592   }
       
 33593   if (view.filters.length > 0) {
       
 33594     view.filters.forEach(filter => {
       
 33595       const field = _fields.find(_field => _field.id === filter.field);
       
 33596       if (field) {
       
 33597         if (filter.operator === constants_OPERATOR_IS_ANY && filter?.value?.length > 0) {
       
 33598           filteredData = filteredData.filter(item => {
       
 33599             const fieldValue = field.getValue({
       
 33600               item
       
 33601             });
       
 33602             if (Array.isArray(fieldValue)) {
       
 33603               return filter.value.some(filterValue => fieldValue.includes(filterValue));
       
 33604             } else if (typeof fieldValue === 'string') {
       
 33605               return filter.value.includes(fieldValue);
       
 33606             }
       
 33607             return false;
       
 33608           });
       
 33609         } else if (filter.operator === constants_OPERATOR_IS_NONE && filter?.value?.length > 0) {
       
 33610           filteredData = filteredData.filter(item => {
       
 33611             const fieldValue = field.getValue({
       
 33612               item
       
 33613             });
       
 33614             if (Array.isArray(fieldValue)) {
       
 33615               return !filter.value.some(filterValue => fieldValue.includes(filterValue));
       
 33616             } else if (typeof fieldValue === 'string') {
       
 33617               return !filter.value.includes(fieldValue);
       
 33618             }
       
 33619             return false;
       
 33620           });
       
 33621         } else if (filter.operator === OPERATOR_IS_ALL && filter?.value?.length > 0) {
       
 33622           filteredData = filteredData.filter(item => {
       
 33623             return filter.value.every(value => {
       
 33624               return field.getValue({
       
 33625                 item
       
 33626               })?.includes(value);
       
 33627             });
       
 33628           });
       
 33629         } else if (filter.operator === OPERATOR_IS_NOT_ALL && filter?.value?.length > 0) {
       
 33630           filteredData = filteredData.filter(item => {
       
 33631             return filter.value.every(value => {
       
 33632               return !field.getValue({
       
 33633                 item
       
 33634               })?.includes(value);
       
 33635             });
       
 33636           });
       
 33637         } else if (filter.operator === constants_OPERATOR_IS) {
       
 33638           filteredData = filteredData.filter(item => {
       
 33639             return filter.value === field.getValue({
       
 33640               item
       
 33641             });
       
 33642           });
       
 33643         } else if (filter.operator === constants_OPERATOR_IS_NOT) {
       
 33644           filteredData = filteredData.filter(item => {
       
 33645             return filter.value !== field.getValue({
       
 33646               item
       
 33647             });
       
 33648           });
       
 33649         }
       
 33650       }
       
 33651     });
       
 33652   }
       
 33653 
       
 33654   // Handle sorting.
       
 33655   if (view.sort) {
       
 33656     const fieldId = view.sort.field;
       
 33657     const fieldToSort = _fields.find(field => {
       
 33658       return field.id === fieldId;
       
 33659     });
       
 33660     if (fieldToSort) {
       
 33661       filteredData.sort((a, b) => {
       
 33662         var _fieldToSort$getValue, _fieldToSort$getValue2;
       
 33663         const valueA = (_fieldToSort$getValue = fieldToSort.getValue({
       
 33664           item: a
       
 33665         })) !== null && _fieldToSort$getValue !== void 0 ? _fieldToSort$getValue : '';
       
 33666         const valueB = (_fieldToSort$getValue2 = fieldToSort.getValue({
       
 33667           item: b
       
 33668         })) !== null && _fieldToSort$getValue2 !== void 0 ? _fieldToSort$getValue2 : '';
       
 33669         return view.sort?.direction === 'asc' ? valueA.localeCompare(valueB) : valueB.localeCompare(valueA);
       
 33670       });
       
 33671     }
       
 33672   }
       
 33673 
       
 33674   // Handle pagination.
       
 33675   let totalItems = filteredData.length;
       
 33676   let totalPages = 1;
       
 33677   if (view.page !== undefined && view.perPage !== undefined) {
       
 33678     const start = (view.page - 1) * view.perPage;
       
 33679     totalItems = filteredData?.length || 0;
       
 33680     totalPages = Math.ceil(totalItems / view.perPage);
       
 33681     filteredData = filteredData?.slice(start, start + view.perPage);
       
 33682   }
       
 33683   return {
       
 33684     data: filteredData,
       
 33685     paginationInfo: {
       
 33686       totalItems,
       
 33687       totalPages
       
 33688     }
       
 33689   };
       
 33690 }
       
 33691 
       
 33692 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/lock-small.js
       
 33693 /**
       
 33694  * WordPress dependencies
       
 33695  */
       
 33696 
       
 33697 
       
 33698 const lockSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 33699   viewBox: "0 0 24 24",
       
 33700   xmlns: "http://www.w3.org/2000/svg",
       
 33701   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 33702     fillRule: "evenodd",
       
 33703     clipRule: "evenodd",
       
 33704     d: "M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"
       
 33705   })
       
 33706 });
       
 33707 /* harmony default export */ const lock_small = (lockSmall);
       
 33708 
       
 33709 ;// CONCATENATED MODULE: external ["wp","priorityQueue"]
       
 33710 const external_wp_priorityQueue_namespaceObject = window["wp"]["priorityQueue"];
       
 33711 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/async/index.js
       
 33712 /**
       
 33713  * WordPress dependencies
       
 33714  */
       
 33715 
       
 33716 
       
 33717 const blockPreviewQueue = (0,external_wp_priorityQueue_namespaceObject.createQueue)();
       
 33718 
       
 33719 /**
       
 33720  * Renders a component at the next idle time.
       
 33721  * @param {*} props
       
 33722  */
       
 33723 function Async({
       
 33724   children,
       
 33725   placeholder
       
 33726 }) {
       
 33727   const [shouldRender, setShouldRender] = (0,external_wp_element_namespaceObject.useState)(false);
       
 33728 
       
 33729   // In the future, we could try to use startTransition here, but currently
       
 33730   // react will batch all transitions, which means all previews will be
       
 33731   // rendered at the same time.
       
 33732   // https://react.dev/reference/react/startTransition#caveats
       
 33733   // > If there are multiple ongoing Transitions, React currently batches them
       
 33734   // > together. This is a limitation that will likely be removed in a future
       
 33735   // > release.
       
 33736 
       
 33737   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 33738     const context = {};
       
 33739     blockPreviewQueue.add(context, () => {
       
 33740       // Synchronously run all renders so it consumes timeRemaining.
       
 33741       // See https://github.com/WordPress/gutenberg/pull/48238
       
 33742       (0,external_wp_element_namespaceObject.flushSync)(() => {
       
 33743         setShouldRender(true);
       
 33744       });
       
 33745     });
       
 33746     return () => {
       
 33747       blockPreviewQueue.cancel(context);
       
 33748     };
       
 33749   }, []);
       
 33750   if (!shouldRender) {
       
 33751     return placeholder;
       
 33752   }
       
 33753   return children;
       
 33754 }
       
 33755 
       
 33756 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/utils.js
       
 33757 const filterOutDuplicatesByName = (currentItem, index, items) => index === items.findIndex(item => currentItem.name === item.name);
       
 33758 
       
 33759 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/use-pattern-settings.js
       
 33760 /**
       
 33761  * WordPress dependencies
       
 33762  */
       
 33763 
       
 33764 
       
 33765 
       
 33766 
       
 33767 /**
       
 33768  * Internal dependencies
       
 33769  */
       
 33770 
       
 33771 
       
 33772 
       
 33773 function usePatternSettings() {
       
 33774   var _storedSettings$__exp;
       
 33775   const storedSettings = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 33776     const {
       
 33777       getSettings
       
 33778     } = lock_unlock_unlock(select(store));
       
 33779     return getSettings();
       
 33780   }, []);
       
 33781   const settingsBlockPatterns = (_storedSettings$__exp = storedSettings.__experimentalAdditionalBlockPatterns) !== null && _storedSettings$__exp !== void 0 ? _storedSettings$__exp :
       
 33782   // WP 6.0
       
 33783   storedSettings.__experimentalBlockPatterns; // WP 5.9
       
 33784 
       
 33785   const restBlockPatterns = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getBlockPatterns(), []);
       
 33786   const blockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => [...(settingsBlockPatterns || []), ...(restBlockPatterns || [])].filter(filterOutDuplicatesByName), [settingsBlockPatterns, restBlockPatterns]);
       
 33787   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 33788     const {
       
 33789       __experimentalAdditionalBlockPatterns,
       
 33790       ...restStoredSettings
       
 33791     } = storedSettings;
       
 33792     return {
       
 33793       ...restStoredSettings,
       
 33794       __experimentalBlockPatterns: blockPatterns,
       
 33795       __unstableIsPreviewMode: true
       
 33796     };
       
 33797   }, [storedSettings, blockPatterns]);
       
 33798   return settings;
       
 33799 }
       
 33800 
       
 33801 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/search-items.js
       
 33802 /**
       
 33803  * WordPress dependencies
       
 33804  */
       
 33805 
       
 33806 
       
 33807 /**
       
 33808  * Internal dependencies
       
 33809  */
       
 33810 
       
 33811 const {
       
 33812   extractWords,
       
 33813   getNormalizedSearchTerms,
       
 33814   normalizeString: search_items_normalizeString
       
 33815 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 33816 
       
 33817 /**
       
 33818  * Internal dependencies
       
 33819  */
       
 33820 
       
 33821 
       
 33822 // Default search helpers.
       
 33823 const defaultGetName = item => item.name || '';
       
 33824 const defaultGetTitle = item => item.title;
       
 33825 const defaultGetDescription = item => item.description || '';
       
 33826 const defaultGetKeywords = item => item.keywords || [];
       
 33827 const defaultHasCategory = () => false;
       
 33828 const removeMatchingTerms = (unmatchedTerms, unprocessedTerms) => {
       
 33829   return unmatchedTerms.filter(term => !getNormalizedSearchTerms(unprocessedTerms).some(unprocessedTerm => unprocessedTerm.includes(term)));
       
 33830 };
       
 33831 
       
 33832 /**
       
 33833  * Filters an item list given a search term.
       
 33834  *
       
 33835  * @param {Array}  items       Item list
       
 33836  * @param {string} searchInput Search input.
       
 33837  * @param {Object} config      Search Config.
       
 33838  *
       
 33839  * @return {Array} Filtered item list.
       
 33840  */
       
 33841 const searchItems = (items = [], searchInput = '', config = {}) => {
       
 33842   const normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
       
 33843 
       
 33844   // Filter patterns by category: the default category indicates that all patterns will be shown.
       
 33845   const onlyFilterByCategory = config.categoryId !== PATTERN_DEFAULT_CATEGORY && !normalizedSearchTerms.length;
       
 33846   const searchRankConfig = {
       
 33847     ...config,
       
 33848     onlyFilterByCategory
       
 33849   };
       
 33850 
       
 33851   // If we aren't filtering on search terms, matching on category is satisfactory.
       
 33852   // If we are, then we need more than a category match.
       
 33853   const threshold = onlyFilterByCategory ? 0 : 1;
       
 33854   const rankedItems = items.map(item => {
       
 33855     return [item, getItemSearchRank(item, searchInput, searchRankConfig)];
       
 33856   }).filter(([, rank]) => rank > threshold);
       
 33857 
       
 33858   // If we didn't have terms to search on, there's no point sorting.
       
 33859   if (normalizedSearchTerms.length === 0) {
       
 33860     return rankedItems.map(([item]) => item);
       
 33861   }
       
 33862   rankedItems.sort(([, rank1], [, rank2]) => rank2 - rank1);
       
 33863   return rankedItems.map(([item]) => item);
       
 33864 };
       
 33865 
       
 33866 /**
       
 33867  * Get the search rank for a given item and a specific search term.
       
 33868  * The better the match, the higher the rank.
       
 33869  * If the rank equals 0, it should be excluded from the results.
       
 33870  *
       
 33871  * @param {Object} item       Item to filter.
       
 33872  * @param {string} searchTerm Search term.
       
 33873  * @param {Object} config     Search Config.
       
 33874  *
       
 33875  * @return {number} Search Rank.
       
 33876  */
       
 33877 function getItemSearchRank(item, searchTerm, config) {
       
 33878   const {
       
 33879     categoryId,
       
 33880     getName = defaultGetName,
       
 33881     getTitle = defaultGetTitle,
       
 33882     getDescription = defaultGetDescription,
       
 33883     getKeywords = defaultGetKeywords,
       
 33884     hasCategory = defaultHasCategory,
       
 33885     onlyFilterByCategory
       
 33886   } = config;
       
 33887   let rank = categoryId === PATTERN_DEFAULT_CATEGORY || categoryId === TEMPLATE_PART_ALL_AREAS_CATEGORY || categoryId === PATTERN_USER_CATEGORY && item.type === PATTERN_TYPES.user || hasCategory(item, categoryId) ? 1 : 0;
       
 33888 
       
 33889   // If an item doesn't belong to the current category or we don't have
       
 33890   // search terms to filter by, return the initial rank value.
       
 33891   if (!rank || onlyFilterByCategory) {
       
 33892     return rank;
       
 33893   }
       
 33894   const name = getName(item);
       
 33895   const title = getTitle(item);
       
 33896   const description = getDescription(item);
       
 33897   const keywords = getKeywords(item);
       
 33898   const normalizedSearchInput = search_items_normalizeString(searchTerm);
       
 33899   const normalizedTitle = search_items_normalizeString(title);
       
 33900 
       
 33901   // Prefers exact matches
       
 33902   // Then prefers if the beginning of the title matches the search term
       
 33903   // name, keywords, description matches come later.
       
 33904   if (normalizedSearchInput === normalizedTitle) {
       
 33905     rank += 30;
       
 33906   } else if (normalizedTitle.startsWith(normalizedSearchInput)) {
       
 33907     rank += 20;
       
 33908   } else {
       
 33909     const terms = [name, title, description, ...keywords].join(' ');
       
 33910     const normalizedSearchTerms = extractWords(normalizedSearchInput);
       
 33911     const unmatchedTerms = removeMatchingTerms(normalizedSearchTerms, terms);
       
 33912     if (unmatchedTerms.length === 0) {
       
 33913       rank += 10;
       
 33914     }
       
 33915   }
       
 33916   return rank;
       
 33917 }
       
 33918 
       
 33919 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/use-patterns.js
       
 33920 /**
       
 33921  * WordPress dependencies
       
 33922  */
       
 33923 
       
 33924 
       
 33925 
       
 33926 
       
 33927 
       
 33928 
       
 33929 /**
       
 33930  * Internal dependencies
       
 33931  */
       
 33932 
       
 33933 
       
 33934 
       
 33935 
       
 33936 
       
 33937 const EMPTY_PATTERN_LIST = [];
       
 33938 const createTemplatePartId = (theme, slug) => theme && slug ? theme + '//' + slug : null;
       
 33939 const templatePartToPattern = templatePart => ({
       
 33940   blocks: (0,external_wp_blocks_namespaceObject.parse)(templatePart.content.raw, {
       
 33941     __unstableSkipMigrationLogs: true
       
 33942   }),
       
 33943   categories: [templatePart.area],
       
 33944   description: templatePart.description || '',
       
 33945   isCustom: templatePart.source === TEMPLATE_ORIGINS.custom,
       
 33946   keywords: templatePart.keywords || [],
       
 33947   id: createTemplatePartId(templatePart.theme, templatePart.slug),
       
 33948   name: createTemplatePartId(templatePart.theme, templatePart.slug),
       
 33949   title: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(templatePart.title.rendered),
       
 33950   type: templatePart.type,
       
 33951   _links: templatePart._links,
       
 33952   templatePart
       
 33953 });
       
 33954 const selectTemplatePartsAsPatterns = (0,external_wp_data_namespaceObject.createSelector)((select, categoryId, search = '') => {
       
 33955   var _getEntityRecords;
       
 33956   const {
       
 33957     getEntityRecords,
       
 33958     isResolving: isResolvingSelector
       
 33959   } = select(external_wp_coreData_namespaceObject.store);
       
 33960   const {
       
 33961     __experimentalGetDefaultTemplatePartAreas
       
 33962   } = select(external_wp_editor_namespaceObject.store);
       
 33963   const query = {
       
 33964     per_page: -1
       
 33965   };
       
 33966   const rawTemplateParts = (_getEntityRecords = getEntityRecords('postType', TEMPLATE_PART_POST_TYPE, query)) !== null && _getEntityRecords !== void 0 ? _getEntityRecords : EMPTY_PATTERN_LIST;
       
 33967   const templateParts = rawTemplateParts.map(templatePart => templatePartToPattern(templatePart));
       
 33968 
       
 33969   // In the case where a custom template part area has been removed we need
       
 33970   // the current list of areas to cross check against so orphaned template
       
 33971   // parts can be treated as uncategorized.
       
 33972   const knownAreas = __experimentalGetDefaultTemplatePartAreas() || [];
       
 33973   const templatePartAreas = knownAreas.map(area => area.area);
       
 33974   const templatePartHasCategory = (item, category) => {
       
 33975     if (category !== TEMPLATE_PART_AREA_DEFAULT_CATEGORY) {
       
 33976       return item.templatePart.area === category;
       
 33977     }
       
 33978     return item.templatePart.area === category || !templatePartAreas.includes(item.templatePart.area);
       
 33979   };
       
 33980   const isResolving = isResolvingSelector('getEntityRecords', ['postType', TEMPLATE_PART_POST_TYPE, query]);
       
 33981   const patterns = searchItems(templateParts, search, {
       
 33982     categoryId,
       
 33983     hasCategory: templatePartHasCategory
       
 33984   });
       
 33985   return {
       
 33986     patterns,
       
 33987     isResolving
       
 33988   };
       
 33989 }, select => [select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', TEMPLATE_PART_POST_TYPE, {
       
 33990   per_page: -1
       
 33991 }), select(external_wp_coreData_namespaceObject.store).isResolving('getEntityRecords', ['postType', TEMPLATE_PART_POST_TYPE, {
       
 33992   per_page: -1
       
 33993 }]), select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplatePartAreas()]);
       
 33994 const selectThemePatterns = (0,external_wp_data_namespaceObject.createSelector)(select => {
       
 33995   var _settings$__experimen;
       
 33996   const {
       
 33997     getSettings
       
 33998   } = lock_unlock_unlock(select(store));
       
 33999   const {
       
 34000     isResolving: isResolvingSelector
       
 34001   } = select(external_wp_coreData_namespaceObject.store);
       
 34002   const settings = getSettings();
       
 34003   const blockPatterns = (_settings$__experimen = settings.__experimentalAdditionalBlockPatterns) !== null && _settings$__experimen !== void 0 ? _settings$__experimen : settings.__experimentalBlockPatterns;
       
 34004   const restBlockPatterns = select(external_wp_coreData_namespaceObject.store).getBlockPatterns();
       
 34005   const patterns = [...(blockPatterns || []), ...(restBlockPatterns || [])].filter(pattern => !EXCLUDED_PATTERN_SOURCES.includes(pattern.source)).filter(filterOutDuplicatesByName).filter(pattern => pattern.inserter !== false).map(pattern => ({
       
 34006     ...pattern,
       
 34007     keywords: pattern.keywords || [],
       
 34008     type: PATTERN_TYPES.theme,
       
 34009     blocks: (0,external_wp_blocks_namespaceObject.parse)(pattern.content, {
       
 34010       __unstableSkipMigrationLogs: true
       
 34011     })
       
 34012   }));
       
 34013   return {
       
 34014     patterns,
       
 34015     isResolving: isResolvingSelector('getBlockPatterns')
       
 34016   };
       
 34017 }, select => [select(external_wp_coreData_namespaceObject.store).getBlockPatterns(), select(external_wp_coreData_namespaceObject.store).isResolving('getBlockPatterns'), lock_unlock_unlock(select(store)).getSettings()]);
       
 34018 const selectPatterns = (0,external_wp_data_namespaceObject.createSelector)((select, categoryId, syncStatus, search = '') => {
       
 34019   const {
       
 34020     patterns: themePatterns,
       
 34021     isResolving: isResolvingThemePatterns
       
 34022   } = selectThemePatterns(select);
       
 34023   const {
       
 34024     patterns: userPatterns,
       
 34025     isResolving: isResolvingUserPatterns
       
 34026   } = selectUserPatterns(select);
       
 34027   let patterns = [...(themePatterns || []), ...(userPatterns || [])];
       
 34028   if (syncStatus) {
       
 34029     // User patterns can have their sync statuses checked directly
       
 34030     // Non-user patterns are all unsynced for the time being.
       
 34031     patterns = patterns.filter(pattern => {
       
 34032       return pattern.type === PATTERN_TYPES.user ? pattern.syncStatus === syncStatus : syncStatus === PATTERN_SYNC_TYPES.unsynced;
       
 34033     });
       
 34034   }
       
 34035   if (categoryId) {
       
 34036     patterns = searchItems(patterns, search, {
       
 34037       categoryId,
       
 34038       hasCategory: (item, currentCategory) => item.categories?.includes(currentCategory)
       
 34039     });
       
 34040   } else {
       
 34041     patterns = searchItems(patterns, search, {
       
 34042       hasCategory: item => !item.hasOwnProperty('categories')
       
 34043     });
       
 34044   }
       
 34045   return {
       
 34046     patterns,
       
 34047     isResolving: isResolvingThemePatterns || isResolvingUserPatterns
       
 34048   };
       
 34049 }, select => [selectThemePatterns(select), selectUserPatterns(select)]);
       
 34050 
       
 34051 /**
       
 34052  * Converts a post of type `wp_block` to a 'pattern item' that more closely
       
 34053  * matches the structure of theme provided patterns.
       
 34054  *
       
 34055  * @param {Object} patternPost The `wp_block` record being normalized.
       
 34056  * @param {Map}    categories  A Map of user created categories.
       
 34057  *
       
 34058  * @return {Object} The normalized item.
       
 34059  */
       
 34060 const convertPatternPostToItem = (patternPost, categories) => ({
       
 34061   blocks: (0,external_wp_blocks_namespaceObject.parse)(patternPost.content.raw, {
       
 34062     __unstableSkipMigrationLogs: true
       
 34063   }),
       
 34064   ...(patternPost.wp_pattern_category.length > 0 && {
       
 34065     categories: patternPost.wp_pattern_category.map(patternCategoryId => categories && categories.get(patternCategoryId) ? categories.get(patternCategoryId).slug : patternCategoryId)
       
 34066   }),
       
 34067   termLabels: patternPost.wp_pattern_category.map(patternCategoryId => categories?.get(patternCategoryId) ? categories.get(patternCategoryId).label : patternCategoryId),
       
 34068   id: patternPost.id,
       
 34069   name: patternPost.slug,
       
 34070   syncStatus: patternPost.wp_pattern_sync_status || PATTERN_SYNC_TYPES.full,
       
 34071   title: patternPost.title.raw,
       
 34072   type: patternPost.type,
       
 34073   description: patternPost.excerpt.raw,
       
 34074   patternPost
       
 34075 });
       
 34076 const selectUserPatterns = (0,external_wp_data_namespaceObject.createSelector)((select, syncStatus, search = '') => {
       
 34077   const {
       
 34078     getEntityRecords,
       
 34079     isResolving: isResolvingSelector,
       
 34080     getUserPatternCategories
       
 34081   } = select(external_wp_coreData_namespaceObject.store);
       
 34082   const query = {
       
 34083     per_page: -1
       
 34084   };
       
 34085   const patternPosts = getEntityRecords('postType', PATTERN_TYPES.user, query);
       
 34086   const userPatternCategories = getUserPatternCategories();
       
 34087   const categories = new Map();
       
 34088   userPatternCategories.forEach(userCategory => categories.set(userCategory.id, userCategory));
       
 34089   let patterns = patternPosts ? patternPosts.map(record => convertPatternPostToItem(record, categories)) : EMPTY_PATTERN_LIST;
       
 34090   const isResolving = isResolvingSelector('getEntityRecords', ['postType', PATTERN_TYPES.user, query]);
       
 34091   if (syncStatus) {
       
 34092     patterns = patterns.filter(pattern => pattern.syncStatus === syncStatus);
       
 34093   }
       
 34094   patterns = searchItems(patterns, search, {
       
 34095     // We exit user pattern retrieval early if we aren't in the
       
 34096     // catch-all category for user created patterns, so it has
       
 34097     // to be in the category.
       
 34098     hasCategory: () => true
       
 34099   });
       
 34100   return {
       
 34101     patterns,
       
 34102     isResolving,
       
 34103     categories: userPatternCategories
       
 34104   };
       
 34105 }, select => [select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', PATTERN_TYPES.user, {
       
 34106   per_page: -1
       
 34107 }), select(external_wp_coreData_namespaceObject.store).isResolving('getEntityRecords', ['postType', PATTERN_TYPES.user, {
       
 34108   per_page: -1
       
 34109 }]), select(external_wp_coreData_namespaceObject.store).getUserPatternCategories()]);
       
 34110 const usePatterns = (postType, categoryId, {
       
 34111   search = '',
       
 34112   syncStatus
       
 34113 } = {}) => {
       
 34114   return (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 34115     if (postType === TEMPLATE_PART_POST_TYPE) {
       
 34116       return selectTemplatePartsAsPatterns(select, categoryId, search);
       
 34117     } else if (postType === PATTERN_TYPES.user && !!categoryId) {
       
 34118       const appliedCategory = categoryId === 'uncategorized' ? '' : categoryId;
       
 34119       return selectPatterns(select, appliedCategory, syncStatus, search);
       
 34120     } else if (postType === PATTERN_TYPES.user) {
       
 34121       return selectUserPatterns(select, syncStatus, search);
       
 34122     }
       
 34123     return {
       
 34124       patterns: EMPTY_PATTERN_LIST,
       
 34125       isResolving: false
       
 34126     };
       
 34127   }, [categoryId, postType, search, syncStatus]);
       
 34128 };
       
 34129 /* harmony default export */ const use_patterns = (usePatterns);
       
 34130 
       
 34131 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol.js
       
 34132 /**
       
 34133  * WordPress dependencies
       
 34134  */
       
 34135 
       
 34136 
       
 34137 const symbol_symbol = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 34138   xmlns: "http://www.w3.org/2000/svg",
       
 34139   viewBox: "0 0 24 24",
       
 34140   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 34141     d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"
       
 34142   })
       
 34143 });
       
 34144 /* harmony default export */ const library_symbol = (symbol_symbol);
       
 34145 
       
 34146 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
       
 34147 /**
       
 34148  * WordPress dependencies
       
 34149  */
       
 34150 
       
 34151 
       
 34152 const upload = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 34153   xmlns: "http://www.w3.org/2000/svg",
       
 34154   viewBox: "0 0 24 24",
       
 34155   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 34156     d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"
       
 34157   })
       
 34158 });
       
 34159 /* harmony default export */ const library_upload = (upload);
       
 34160 
       
 34161 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-pattern/index.js
       
 34162 /**
       
 34163  * WordPress dependencies
       
 34164  */
       
 34165 
       
 34166 
       
 34167 
       
 34168 
       
 34169 
       
 34170 
       
 34171 
       
 34172 
       
 34173 
       
 34174 
       
 34175 
       
 34176 /**
       
 34177  * Internal dependencies
       
 34178  */
       
 34179 
       
 34180 
       
 34181 
       
 34182 
       
 34183 
       
 34184 const {
       
 34185   useHistory: add_new_pattern_useHistory
       
 34186 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 34187 const {
       
 34188   CreatePatternModal,
       
 34189   useAddPatternCategory
       
 34190 } = lock_unlock_unlock(external_wp_patterns_namespaceObject.privateApis);
       
 34191 const {
       
 34192   CreateTemplatePartModal: add_new_pattern_CreateTemplatePartModal
       
 34193 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 34194 function AddNewPattern() {
       
 34195   const history = add_new_pattern_useHistory();
       
 34196   const [showPatternModal, setShowPatternModal] = (0,external_wp_element_namespaceObject.useState)(false);
       
 34197   const [showTemplatePartModal, setShowTemplatePartModal] = (0,external_wp_element_namespaceObject.useState)(false);
       
 34198   // eslint-disable-next-line @wordpress/no-unused-vars-before-return
       
 34199   const {
       
 34200     createPatternFromFile
       
 34201   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(external_wp_patterns_namespaceObject.store));
       
 34202   const {
       
 34203     createSuccessNotice,
       
 34204     createErrorNotice
       
 34205   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
 34206   const patternUploadInputRef = (0,external_wp_element_namespaceObject.useRef)();
       
 34207   const {
       
 34208     isBlockBasedTheme,
       
 34209     addNewPatternLabel,
       
 34210     addNewTemplatePartLabel,
       
 34211     canCreatePattern,
       
 34212     canCreateTemplatePart
       
 34213   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 34214     const {
       
 34215       getCurrentTheme,
       
 34216       getPostType,
       
 34217       canUser
       
 34218     } = select(external_wp_coreData_namespaceObject.store);
       
 34219     return {
       
 34220       isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
       
 34221       addNewPatternLabel: getPostType(PATTERN_TYPES.user)?.labels?.add_new_item,
       
 34222       addNewTemplatePartLabel: getPostType(TEMPLATE_PART_POST_TYPE)?.labels?.add_new_item,
       
 34223       canCreatePattern: canUser('create', 'blocks'),
       
 34224       canCreateTemplatePart: canUser('create', 'template-parts')
       
 34225     };
       
 34226   }, []);
       
 34227   function handleCreatePattern({
       
 34228     pattern
       
 34229   }) {
       
 34230     setShowPatternModal(false);
       
 34231     history.push({
       
 34232       postId: pattern.id,
       
 34233       postType: PATTERN_TYPES.user,
       
 34234       canvas: 'edit'
       
 34235     });
       
 34236   }
       
 34237   function handleCreateTemplatePart(templatePart) {
       
 34238     setShowTemplatePartModal(false);
       
 34239 
       
 34240     // Navigate to the created template part editor.
       
 34241     history.push({
       
 34242       postId: templatePart.id,
       
 34243       postType: TEMPLATE_PART_POST_TYPE,
       
 34244       canvas: 'edit'
       
 34245     });
       
 34246   }
       
 34247   function handleError() {
       
 34248     setShowPatternModal(false);
       
 34249     setShowTemplatePartModal(false);
       
 34250   }
       
 34251   const controls = [];
       
 34252   if (canCreatePattern) {
       
 34253     controls.push({
       
 34254       icon: library_symbol,
       
 34255       onClick: () => setShowPatternModal(true),
       
 34256       title: addNewPatternLabel
       
 34257     });
       
 34258   }
       
 34259   if (isBlockBasedTheme && canCreateTemplatePart) {
       
 34260     controls.push({
       
 34261       icon: symbol_filled,
       
 34262       onClick: () => setShowTemplatePartModal(true),
       
 34263       title: addNewTemplatePartLabel
       
 34264     });
       
 34265   }
       
 34266   if (canCreatePattern) {
       
 34267     controls.push({
       
 34268       icon: library_upload,
       
 34269       onClick: () => {
       
 34270         patternUploadInputRef.current.click();
       
 34271       },
       
 34272       title: (0,external_wp_i18n_namespaceObject.__)('Import pattern from JSON')
       
 34273     });
       
 34274   }
       
 34275   const {
       
 34276     categoryMap,
       
 34277     findOrCreateTerm
       
 34278   } = useAddPatternCategory();
       
 34279   if (controls.length === 0) {
       
 34280     return null;
       
 34281   }
       
 34282   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 34283     children: [addNewPatternLabel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
       
 34284       controls: controls,
       
 34285       icon: null,
       
 34286       toggleProps: {
       
 34287         variant: 'primary',
       
 34288         showTooltip: false,
       
 34289         __next40pxDefaultSize: true
       
 34290       },
       
 34291       text: addNewPatternLabel,
       
 34292       label: addNewPatternLabel
       
 34293     }), showPatternModal && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CreatePatternModal, {
       
 34294       onClose: () => setShowPatternModal(false),
       
 34295       onSuccess: handleCreatePattern,
       
 34296       onError: handleError
       
 34297     }), showTemplatePartModal && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_new_pattern_CreateTemplatePartModal, {
       
 34298       closeModal: () => setShowTemplatePartModal(false),
       
 34299       blocks: [],
       
 34300       onCreate: handleCreateTemplatePart,
       
 34301       onError: handleError
       
 34302     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
       
 34303       type: "file",
       
 34304       accept: ".json",
       
 34305       hidden: true,
       
 34306       ref: patternUploadInputRef,
       
 34307       onChange: async event => {
       
 34308         const file = event.target.files?.[0];
       
 34309         if (!file) {
       
 34310           return;
       
 34311         }
       
 34312         try {
       
 34313           const {
       
 34314             params: {
       
 34315               postType,
       
 34316               categoryId
       
 34317             }
       
 34318           } = history.getLocationWithParams();
       
 34319           let currentCategoryId;
       
 34320           // When we're not handling template parts, we should
       
 34321           // add or create the proper pattern category.
       
 34322           if (postType !== TEMPLATE_PART_POST_TYPE) {
       
 34323             const currentCategory = categoryMap.values().find(term => term.name === categoryId);
       
 34324             if (currentCategory) {
       
 34325               currentCategoryId = currentCategory.id || (await findOrCreateTerm(currentCategory.label));
       
 34326             }
       
 34327           }
       
 34328           const pattern = await createPatternFromFile(file, currentCategoryId ? [currentCategoryId] : undefined);
       
 34329 
       
 34330           // Navigate to the All patterns category for the newly created pattern
       
 34331           // if we're not on that page already and if we're not in the `my-patterns`
       
 34332           // category.
       
 34333           if (!currentCategoryId && categoryId !== 'my-patterns') {
       
 34334             history.push({
       
 34335               postType: PATTERN_TYPES.user,
       
 34336               categoryId: PATTERN_DEFAULT_CATEGORY
       
 34337             });
       
 34338           }
       
 34339           createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
       
 34340           // translators: %s: The imported pattern's title.
       
 34341           (0,external_wp_i18n_namespaceObject.__)('Imported "%s" from JSON.'), pattern.title.raw), {
       
 34342             type: 'snackbar',
       
 34343             id: 'import-pattern-success'
       
 34344           });
       
 34345         } catch (err) {
       
 34346           createErrorNotice(err.message, {
       
 34347             type: 'snackbar',
       
 34348             id: 'import-pattern-error'
       
 34349           });
       
 34350         } finally {
       
 34351           event.target.value = '';
 12191         }
 34352         }
 12192       }
 34353       }
 12193     })]
 34354     })]
 12194   }), [page === null || page === void 0 ? void 0 : page.context]);
 34355   });
       
 34356 }
       
 34357 
       
 34358 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js
       
 34359 /**
       
 34360  * WordPress dependencies
       
 34361  */
       
 34362 
       
 34363 
       
 34364 
       
 34365 /**
       
 34366  * Internal dependencies
       
 34367  */
       
 34368 
       
 34369 
       
 34370 function useDefaultPatternCategories() {
       
 34371   const blockPatternCategories = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 34372     var _settings$__experimen;
       
 34373     const {
       
 34374       getSettings
       
 34375     } = lock_unlock_unlock(select(store));
       
 34376     const settings = getSettings();
       
 34377     return (_settings$__experimen = settings.__experimentalAdditionalBlockPatternCategories) !== null && _settings$__experimen !== void 0 ? _settings$__experimen : settings.__experimentalBlockPatternCategories;
       
 34378   });
       
 34379   const restBlockPatternCategories = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getBlockPatternCategories());
       
 34380   return [...(blockPatternCategories || []), ...(restBlockPatternCategories || [])];
       
 34381 }
       
 34382 
       
 34383 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js
       
 34384 /**
       
 34385  * WordPress dependencies
       
 34386  */
       
 34387 
       
 34388 
       
 34389 
       
 34390 
       
 34391 /**
       
 34392  * Internal dependencies
       
 34393  */
       
 34394 
       
 34395 
       
 34396 
       
 34397 
       
 34398 function useThemePatterns() {
       
 34399   const blockPatterns = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 34400     var _getSettings$__experi;
       
 34401     const {
       
 34402       getSettings
       
 34403     } = lock_unlock_unlock(select(store));
       
 34404     return (_getSettings$__experi = getSettings().__experimentalAdditionalBlockPatterns) !== null && _getSettings$__experi !== void 0 ? _getSettings$__experi : getSettings().__experimentalBlockPatterns;
       
 34405   });
       
 34406   const restBlockPatterns = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getBlockPatterns());
       
 34407   const patterns = (0,external_wp_element_namespaceObject.useMemo)(() => [...(blockPatterns || []), ...(restBlockPatterns || [])].filter(pattern => !EXCLUDED_PATTERN_SOURCES.includes(pattern.source)).filter(filterOutDuplicatesByName).filter(pattern => pattern.inserter !== false), [blockPatterns, restBlockPatterns]);
       
 34408   return patterns;
       
 34409 }
       
 34410 
       
 34411 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js
       
 34412 /**
       
 34413  * WordPress dependencies
       
 34414  */
       
 34415 
       
 34416 
       
 34417 
       
 34418 /**
       
 34419  * Internal dependencies
       
 34420  */
       
 34421 
       
 34422 
       
 34423 
       
 34424 
       
 34425 function usePatternCategories() {
       
 34426   const defaultCategories = useDefaultPatternCategories();
       
 34427   defaultCategories.push({
       
 34428     name: TEMPLATE_PART_AREA_DEFAULT_CATEGORY,
       
 34429     label: (0,external_wp_i18n_namespaceObject.__)('Uncategorized')
       
 34430   });
       
 34431   const themePatterns = useThemePatterns();
       
 34432   const {
       
 34433     patterns: userPatterns,
       
 34434     categories: userPatternCategories
       
 34435   } = use_patterns(PATTERN_TYPES.user);
       
 34436   const patternCategories = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 34437     const categoryMap = {};
       
 34438     const categoriesWithCounts = [];
       
 34439 
       
 34440     // Create a map for easier counting of patterns in categories.
       
 34441     defaultCategories.forEach(category => {
       
 34442       if (!categoryMap[category.name]) {
       
 34443         categoryMap[category.name] = {
       
 34444           ...category,
       
 34445           count: 0
       
 34446         };
       
 34447       }
       
 34448     });
       
 34449     userPatternCategories.forEach(category => {
       
 34450       if (!categoryMap[category.name]) {
       
 34451         categoryMap[category.name] = {
       
 34452           ...category,
       
 34453           count: 0
       
 34454         };
       
 34455       }
       
 34456     });
       
 34457 
       
 34458     // Update the category counts to reflect theme registered patterns.
       
 34459     themePatterns.forEach(pattern => {
       
 34460       pattern.categories?.forEach(category => {
       
 34461         if (categoryMap[category]) {
       
 34462           categoryMap[category].count += 1;
       
 34463         }
       
 34464       });
       
 34465       // If the pattern has no categories, add it to uncategorized.
       
 34466       if (!pattern.categories?.length) {
       
 34467         categoryMap.uncategorized.count += 1;
       
 34468       }
       
 34469     });
       
 34470 
       
 34471     // Update the category counts to reflect user registered patterns.
       
 34472     userPatterns.forEach(pattern => {
       
 34473       pattern.categories?.forEach(category => {
       
 34474         if (categoryMap[category]) {
       
 34475           categoryMap[category].count += 1;
       
 34476         }
       
 34477       });
       
 34478       // If the pattern has no categories, add it to uncategorized.
       
 34479       if (!pattern.categories?.length) {
       
 34480         categoryMap.uncategorized.count += 1;
       
 34481       }
       
 34482     });
       
 34483 
       
 34484     // Filter categories so we only have those containing patterns.
       
 34485     [...defaultCategories, ...userPatternCategories].forEach(category => {
       
 34486       if (categoryMap[category.name].count && !categoriesWithCounts.find(cat => cat.name === category.name)) {
       
 34487         categoriesWithCounts.push(categoryMap[category.name]);
       
 34488       }
       
 34489     });
       
 34490     const sortedCategories = categoriesWithCounts.sort((a, b) => a.label.localeCompare(b.label));
       
 34491     sortedCategories.unshift({
       
 34492       name: PATTERN_USER_CATEGORY,
       
 34493       label: (0,external_wp_i18n_namespaceObject.__)('My patterns'),
       
 34494       count: userPatterns.length
       
 34495     });
       
 34496     sortedCategories.unshift({
       
 34497       name: PATTERN_DEFAULT_CATEGORY,
       
 34498       label: (0,external_wp_i18n_namespaceObject.__)('All patterns'),
       
 34499       description: (0,external_wp_i18n_namespaceObject.__)('A list of all patterns from all sources.'),
       
 34500       count: themePatterns.length + userPatterns.length
       
 34501     });
       
 34502     return sortedCategories;
       
 34503   }, [defaultCategories, themePatterns, userPatternCategories, userPatterns]);
       
 34504   return {
       
 34505     patternCategories,
       
 34506     hasPatterns: !!patternCategories.length
       
 34507   };
       
 34508 }
       
 34509 
       
 34510 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/rename-category-menu-item.js
       
 34511 /**
       
 34512  * WordPress dependencies
       
 34513  */
       
 34514 
       
 34515 
       
 34516 
       
 34517 
       
 34518 /**
       
 34519  * Internal dependencies
       
 34520  */
       
 34521 
       
 34522 
       
 34523 /**
       
 34524  * Internal dependencies
       
 34525  */
       
 34526 
       
 34527 
       
 34528 
       
 34529 
       
 34530 const {
       
 34531   RenamePatternCategoryModal
       
 34532 } = lock_unlock_unlock(external_wp_patterns_namespaceObject.privateApis);
       
 34533 function RenameCategoryMenuItem({
       
 34534   category,
       
 34535   onClose
       
 34536 }) {
       
 34537   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 34538   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 34539     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 34540       onClick: () => setIsModalOpen(true),
       
 34541       children: (0,external_wp_i18n_namespaceObject.__)('Rename')
       
 34542     }), isModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RenameModal, {
       
 34543       category: category,
       
 34544       onClose: () => {
       
 34545         setIsModalOpen(false);
       
 34546         onClose();
       
 34547       }
       
 34548     })]
       
 34549   });
       
 34550 }
       
 34551 function RenameModal({
       
 34552   category,
       
 34553   onClose
       
 34554 }) {
       
 34555   // User created pattern categories have their properties updated when
       
 34556   // retrieved via `getUserPatternCategories`. The rename modal expects an
       
 34557   // object that will match the pattern category entity.
       
 34558   const normalizedCategory = {
       
 34559     id: category.id,
       
 34560     slug: category.slug,
       
 34561     name: category.label
       
 34562   };
       
 34563 
       
 34564   // Optimization - only use pattern categories when the modal is open.
       
 34565   const existingCategories = usePatternCategories();
       
 34566   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RenamePatternCategoryModal, {
       
 34567     category: normalizedCategory,
       
 34568     existingCategories: existingCategories,
       
 34569     onClose: onClose,
       
 34570     overlayClassName: "edit-site-list__rename-modal"
       
 34571   });
       
 34572 }
       
 34573 
       
 34574 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/delete-category-menu-item.js
       
 34575 /**
       
 34576  * WordPress dependencies
       
 34577  */
       
 34578 
       
 34579 
       
 34580 
       
 34581 
       
 34582 
       
 34583 
       
 34584 
       
 34585 
       
 34586 
       
 34587 /**
       
 34588  * Internal dependencies
       
 34589  */
       
 34590 
       
 34591 
       
 34592 
       
 34593 
       
 34594 
       
 34595 const {
       
 34596   useHistory: delete_category_menu_item_useHistory
       
 34597 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 34598 function DeleteCategoryMenuItem({
       
 34599   category,
       
 34600   onClose
       
 34601 }) {
       
 34602   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 34603   const history = delete_category_menu_item_useHistory();
       
 34604   const {
       
 34605     createSuccessNotice,
       
 34606     createErrorNotice
       
 34607   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
 34608   const {
       
 34609     deleteEntityRecord,
       
 34610     invalidateResolution
       
 34611   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 34612   const onDelete = async () => {
       
 34613     try {
       
 34614       await deleteEntityRecord('taxonomy', 'wp_pattern_category', category.id, {
       
 34615         force: true
       
 34616       }, {
       
 34617         throwOnError: true
       
 34618       });
       
 34619 
       
 34620       // Prevent the need to refresh the page to get up-to-date categories
       
 34621       // and pattern categorization.
       
 34622       invalidateResolution('getUserPatternCategories');
       
 34623       invalidateResolution('getEntityRecords', ['postType', PATTERN_TYPES.user, {
       
 34624         per_page: -1
       
 34625       }]);
       
 34626       createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: The pattern category's name */
       
 34627       (0,external_wp_i18n_namespaceObject.__)('"%s" deleted.'), category.label), {
       
 34628         type: 'snackbar',
       
 34629         id: 'pattern-category-delete'
       
 34630       });
       
 34631       onClose?.();
       
 34632       history.push({
       
 34633         postType: PATTERN_TYPES.user,
       
 34634         categoryId: PATTERN_DEFAULT_CATEGORY
       
 34635       });
       
 34636     } catch (error) {
       
 34637       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while deleting the pattern category.');
       
 34638       createErrorNotice(errorMessage, {
       
 34639         type: 'snackbar',
       
 34640         id: 'pattern-category-delete'
       
 34641       });
       
 34642     }
       
 34643   };
       
 34644   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 34645     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 34646       isDestructive: true,
       
 34647       onClick: () => setIsModalOpen(true),
       
 34648       children: (0,external_wp_i18n_namespaceObject.__)('Delete')
       
 34649     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
       
 34650       isOpen: isModalOpen,
       
 34651       onConfirm: onDelete,
       
 34652       onCancel: () => setIsModalOpen(false),
       
 34653       confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Delete'),
       
 34654       className: "edit-site-patterns__delete-modal",
       
 34655       title: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 34656       // translators: %s: The pattern category's name.
       
 34657       (0,external_wp_i18n_namespaceObject.__)('Delete "%s"?'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(category.label)),
       
 34658       size: "medium",
       
 34659       __experimentalHideHeader: false,
       
 34660       children: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 34661       // translators: %s: The pattern category's name.
       
 34662       (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(category.label))
       
 34663     })]
       
 34664   });
       
 34665 }
       
 34666 
       
 34667 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/header.js
       
 34668 /**
       
 34669  * WordPress dependencies
       
 34670  */
       
 34671 
       
 34672 
       
 34673 
       
 34674 
       
 34675 
       
 34676 
       
 34677 /**
       
 34678  * Internal dependencies
       
 34679  */
       
 34680 
       
 34681 
       
 34682 
       
 34683 
       
 34684 
       
 34685 
       
 34686 
       
 34687 function PatternsHeader({
       
 34688   categoryId,
       
 34689   type,
       
 34690   titleId,
       
 34691   descriptionId
       
 34692 }) {
       
 34693   const {
       
 34694     patternCategories
       
 34695   } = usePatternCategories();
       
 34696   const templatePartAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplatePartAreas(), []);
       
 34697   let title, description, patternCategory;
       
 34698   if (type === TEMPLATE_PART_POST_TYPE) {
       
 34699     const templatePartArea = templatePartAreas.find(area => area.area === categoryId);
       
 34700     title = templatePartArea?.label || (0,external_wp_i18n_namespaceObject.__)('All Template Parts');
       
 34701     description = templatePartArea?.description || (0,external_wp_i18n_namespaceObject.__)('Includes every template part defined for any area.');
       
 34702   } else if (type === PATTERN_TYPES.user && !!categoryId) {
       
 34703     patternCategory = patternCategories.find(category => category.name === categoryId);
       
 34704     title = patternCategory?.label;
       
 34705     description = patternCategory?.description;
       
 34706   }
       
 34707   if (!title) {
       
 34708     return null;
       
 34709   }
       
 34710   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 34711     className: "edit-site-patterns__section-header",
       
 34712     spacing: 0,
       
 34713     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 34714       justify: "space-between",
       
 34715       className: "edit-site-patterns__title",
       
 34716       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 34717         as: "h2",
       
 34718         level: 3,
       
 34719         id: titleId,
       
 34720         weight: 500,
       
 34721         children: title
       
 34722       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 34723         expanded: false,
       
 34724         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AddNewPattern, {}), !!patternCategory?.id && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
       
 34725           icon: more_vertical,
       
 34726           label: (0,external_wp_i18n_namespaceObject.__)('Actions'),
       
 34727           toggleProps: {
       
 34728             className: 'edit-site-patterns__button',
       
 34729             describedBy: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: pattern category name */
       
 34730             (0,external_wp_i18n_namespaceObject.__)('Action menu for %s pattern category'), title),
       
 34731             size: 'compact'
       
 34732           },
       
 34733           children: ({
       
 34734             onClose
       
 34735           }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
       
 34736             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RenameCategoryMenuItem, {
       
 34737               category: patternCategory,
       
 34738               onClose: onClose
       
 34739             }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DeleteCategoryMenuItem, {
       
 34740               category: patternCategory,
       
 34741               onClose: onClose
       
 34742             })]
       
 34743           })
       
 34744         })]
       
 34745       })]
       
 34746     }), description ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 34747       variant: "muted",
       
 34748       as: "p",
       
 34749       id: descriptionId,
       
 34750       className: "edit-site-patterns__sub-title",
       
 34751       children: description
       
 34752     }) : null]
       
 34753   });
       
 34754 }
       
 34755 
       
 34756 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plugins.js
       
 34757 /**
       
 34758  * WordPress dependencies
       
 34759  */
       
 34760 
       
 34761 
       
 34762 const plugins = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 34763   xmlns: "http://www.w3.org/2000/svg",
       
 34764   viewBox: "0 0 24 24",
       
 34765   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 34766     d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"
       
 34767   })
       
 34768 });
       
 34769 /* harmony default export */ const library_plugins = (plugins);
       
 34770 
       
 34771 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/globe.js
       
 34772 /**
       
 34773  * WordPress dependencies
       
 34774  */
       
 34775 
       
 34776 
       
 34777 const globe = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 34778   xmlns: "http://www.w3.org/2000/svg",
       
 34779   viewBox: "0 0 24 24",
       
 34780   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 34781     d: "M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"
       
 34782   })
       
 34783 });
       
 34784 /* harmony default export */ const library_globe = (globe);
       
 34785 
       
 34786 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment-author-avatar.js
       
 34787 /**
       
 34788  * WordPress dependencies
       
 34789  */
       
 34790 
       
 34791 
       
 34792 const commentAuthorAvatar = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 34793   xmlns: "http://www.w3.org/2000/svg",
       
 34794   viewBox: "0 0 24 24",
       
 34795   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 34796     fillRule: "evenodd",
       
 34797     d: "M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",
       
 34798     clipRule: "evenodd"
       
 34799   })
       
 34800 });
       
 34801 /* harmony default export */ const comment_author_avatar = (commentAuthorAvatar);
       
 34802 
       
 34803 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-templates/hooks.js
       
 34804 /**
       
 34805  * WordPress dependencies
       
 34806  */
       
 34807 
       
 34808 
       
 34809 
       
 34810 
       
 34811 /**
       
 34812  * Internal dependencies
       
 34813  */
       
 34814 
       
 34815 
       
 34816 /** @typedef {'wp_template'|'wp_template_part'} TemplateType */
       
 34817 
       
 34818 /**
       
 34819  * @typedef {'theme'|'plugin'|'site'|'user'} AddedByType
       
 34820  *
       
 34821  * @typedef AddedByData
       
 34822  * @type {Object}
       
 34823  * @property {AddedByType}  type         The type of the data.
       
 34824  * @property {JSX.Element}  icon         The icon to display.
       
 34825  * @property {string}       [imageUrl]   The optional image URL to display.
       
 34826  * @property {string}       [text]       The text to display.
       
 34827  * @property {boolean}      isCustomized Whether the template has been customized.
       
 34828  *
       
 34829  * @param    {TemplateType} postType     The template post type.
       
 34830  * @param    {number}       postId       The template post id.
       
 34831  * @return {AddedByData} The added by object or null.
       
 34832  */
       
 34833 function useAddedBy(postType, postId) {
       
 34834   return (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 34835     const {
       
 34836       getEntityRecord,
       
 34837       getMedia,
       
 34838       getUser,
       
 34839       getEditedEntityRecord
       
 34840     } = select(external_wp_coreData_namespaceObject.store);
       
 34841     const template = getEditedEntityRecord('postType', postType, postId);
       
 34842     const originalSource = template?.original_source;
       
 34843     const authorText = template?.author_text;
       
 34844     switch (originalSource) {
       
 34845       case 'theme':
       
 34846         {
       
 34847           return {
       
 34848             type: originalSource,
       
 34849             icon: library_layout,
       
 34850             text: authorText,
       
 34851             isCustomized: template.source === TEMPLATE_ORIGINS.custom
       
 34852           };
       
 34853         }
       
 34854       case 'plugin':
       
 34855         {
       
 34856           return {
       
 34857             type: originalSource,
       
 34858             icon: library_plugins,
       
 34859             text: authorText,
       
 34860             isCustomized: template.source === TEMPLATE_ORIGINS.custom
       
 34861           };
       
 34862         }
       
 34863       case 'site':
       
 34864         {
       
 34865           const siteData = getEntityRecord('root', '__unstableBase');
       
 34866           return {
       
 34867             type: originalSource,
       
 34868             icon: library_globe,
       
 34869             imageUrl: siteData?.site_logo ? getMedia(siteData.site_logo)?.source_url : undefined,
       
 34870             text: authorText,
       
 34871             isCustomized: false
       
 34872           };
       
 34873         }
       
 34874       default:
       
 34875         {
       
 34876           const user = getUser(template.author);
       
 34877           return {
       
 34878             type: 'user',
       
 34879             icon: comment_author_avatar,
       
 34880             imageUrl: user?.avatar_urls?.[48],
       
 34881             text: authorText,
       
 34882             isCustomized: false
       
 34883           };
       
 34884         }
       
 34885     }
       
 34886   }, [postType, postId]);
       
 34887 }
       
 34888 
       
 34889 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/index.js
       
 34890 /**
       
 34891  * External dependencies
       
 34892  */
       
 34893 
       
 34894 
       
 34895 /**
       
 34896  * WordPress dependencies
       
 34897  */
       
 34898 
       
 34899 
       
 34900 
       
 34901 
       
 34902 
       
 34903 
       
 34904 
       
 34905 
       
 34906 
       
 34907 
       
 34908 
       
 34909 /**
       
 34910  * Internal dependencies
       
 34911  */
       
 34912 
       
 34913 
       
 34914 
       
 34915 
       
 34916 
       
 34917 
       
 34918 
       
 34919 
       
 34920 
       
 34921 
       
 34922 
       
 34923 
       
 34924 const {
       
 34925   ExperimentalBlockEditorProvider: page_patterns_ExperimentalBlockEditorProvider,
       
 34926   useGlobalStyle: page_patterns_useGlobalStyle
       
 34927 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 34928 const {
       
 34929   usePostActions: page_patterns_usePostActions
       
 34930 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 34931 const {
       
 34932   useLocation: page_patterns_useLocation
       
 34933 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 34934 const page_patterns_EMPTY_ARRAY = [];
       
 34935 const defaultConfigPerViewType = {
       
 34936   [LAYOUT_TABLE]: {
       
 34937     primaryField: 'title'
       
 34938   },
       
 34939   [LAYOUT_GRID]: {
       
 34940     mediaField: 'preview',
       
 34941     primaryField: 'title',
       
 34942     badgeFields: ['sync-status']
       
 34943   }
       
 34944 };
       
 34945 const DEFAULT_VIEW = {
       
 34946   type: LAYOUT_GRID,
       
 34947   search: '',
       
 34948   page: 1,
       
 34949   perPage: 20,
       
 34950   hiddenFields: [],
       
 34951   layout: {
       
 34952     ...defaultConfigPerViewType[LAYOUT_GRID]
       
 34953   },
       
 34954   filters: []
       
 34955 };
       
 34956 const SYNC_FILTERS = [{
       
 34957   value: PATTERN_SYNC_TYPES.full,
       
 34958   label: (0,external_wp_i18n_namespaceObject._x)('Synced', 'pattern (singular)'),
       
 34959   description: (0,external_wp_i18n_namespaceObject.__)('Patterns that are kept in sync across the site.')
       
 34960 }, {
       
 34961   value: PATTERN_SYNC_TYPES.unsynced,
       
 34962   label: (0,external_wp_i18n_namespaceObject._x)('Not synced', 'pattern (singular)'),
       
 34963   description: (0,external_wp_i18n_namespaceObject.__)('Patterns that can be changed freely without affecting the site.')
       
 34964 }];
       
 34965 function PreviewWrapper({
       
 34966   item,
       
 34967   onClick,
       
 34968   ariaDescribedBy,
       
 34969   children
       
 34970 }) {
       
 34971   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("button", {
       
 34972     className: "page-patterns-preview-field__button",
       
 34973     type: "button",
       
 34974     onClick: item.type !== PATTERN_TYPES.theme ? onClick : undefined,
       
 34975     "aria-label": item.title,
       
 34976     "aria-describedby": ariaDescribedBy,
       
 34977     "aria-disabled": item.type === PATTERN_TYPES.theme,
       
 34978     children: children
       
 34979   });
       
 34980 }
       
 34981 function Preview({
       
 34982   item,
       
 34983   viewType
       
 34984 }) {
       
 34985   const descriptionId = (0,external_wp_element_namespaceObject.useId)();
       
 34986   const isUserPattern = item.type === PATTERN_TYPES.user;
       
 34987   const isTemplatePart = item.type === TEMPLATE_PART_POST_TYPE;
       
 34988   const isEmpty = !item.blocks?.length;
       
 34989   const [backgroundColor] = page_patterns_useGlobalStyle('color.background');
       
 34990   const {
       
 34991     onClick
       
 34992   } = useLink({
       
 34993     postType: item.type,
       
 34994     postId: isUserPattern ? item.id : item.name,
       
 34995     canvas: 'edit'
       
 34996   });
       
 34997   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 34998     className: `page-patterns-preview-field is-viewtype-${viewType}`,
       
 34999     style: {
       
 35000       backgroundColor
       
 35001     },
       
 35002     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(PreviewWrapper, {
       
 35003       item: item,
       
 35004       onClick: onClick,
       
 35005       ariaDescribedBy: item.description ? descriptionId : undefined,
       
 35006       children: [isEmpty && isTemplatePart && (0,external_wp_i18n_namespaceObject.__)('Empty template part'), isEmpty && !isTemplatePart && (0,external_wp_i18n_namespaceObject.__)('Empty pattern'), !isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Async, {
       
 35007         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockPreview, {
       
 35008           blocks: item.blocks,
       
 35009           viewportWidth: item.viewportWidth
       
 35010         })
       
 35011       })]
       
 35012     }), item.description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 35013       hidden: true,
       
 35014       id: descriptionId,
       
 35015       children: item.description
       
 35016     })]
       
 35017   });
       
 35018 }
       
 35019 function Author({
       
 35020   item,
       
 35021   viewType
       
 35022 }) {
       
 35023   const [isImageLoaded, setIsImageLoaded] = (0,external_wp_element_namespaceObject.useState)(false);
       
 35024   const {
       
 35025     text,
       
 35026     icon,
       
 35027     imageUrl
       
 35028   } = useAddedBy(item.type, item.id);
       
 35029   const withIcon = viewType !== LAYOUT_LIST;
       
 35030   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 35031     alignment: "left",
       
 35032     spacing: 1,
       
 35033     children: [withIcon && imageUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 35034       className: dist_clsx('page-templates-author-field__avatar', {
       
 35035         'is-loaded': isImageLoaded
       
 35036       }),
       
 35037       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
       
 35038         onLoad: () => setIsImageLoaded(true),
       
 35039         alt: "",
       
 35040         src: imageUrl
       
 35041       })
       
 35042     }), withIcon && !imageUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 35043       className: "page-templates-author-field__icon",
       
 35044       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
       
 35045         icon: icon
       
 35046       })
       
 35047     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 35048       className: "page-templates-author-field__name",
       
 35049       children: text
       
 35050     })]
       
 35051   });
       
 35052 }
       
 35053 function Title({
       
 35054   item
       
 35055 }) {
       
 35056   const isUserPattern = item.type === PATTERN_TYPES.user;
       
 35057   const {
       
 35058     onClick
       
 35059   } = useLink({
       
 35060     postType: item.type,
       
 35061     postId: isUserPattern ? item.id : item.name,
       
 35062     canvas: 'edit'
       
 35063   });
       
 35064   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 35065     alignment: "center",
       
 35066     justify: "flex-start",
       
 35067     spacing: 2,
       
 35068     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
       
 35069       as: "div",
       
 35070       gap: 0,
       
 35071       justify: "left",
       
 35072       className: "edit-site-patterns__pattern-title",
       
 35073       children: item.type === PATTERN_TYPES.theme ? item.title : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 35074         variant: "link",
       
 35075         onClick: onClick
       
 35076         // Required for the grid's roving tab index system.
       
 35077         // See https://github.com/WordPress/gutenberg/pull/51898#discussion_r1243399243.
       
 35078         ,
       
 35079         tabIndex: "-1",
       
 35080         children: item.title || item.name
       
 35081       })
       
 35082     }), item.type === PATTERN_TYPES.theme && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
       
 35083       placement: "top",
       
 35084       text: (0,external_wp_i18n_namespaceObject.__)('This pattern cannot be edited.'),
       
 35085       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
       
 35086         className: "edit-site-patterns__pattern-lock-icon",
       
 35087         icon: lock_small,
       
 35088         size: 24
       
 35089       })
       
 35090     })]
       
 35091   });
       
 35092 }
       
 35093 function DataviewsPatterns() {
       
 35094   const {
       
 35095     params: {
       
 35096       postType,
       
 35097       categoryId: categoryIdFromURL
       
 35098     }
       
 35099   } = page_patterns_useLocation();
       
 35100   const type = postType || PATTERN_TYPES.user;
       
 35101   const categoryId = categoryIdFromURL || PATTERN_DEFAULT_CATEGORY;
       
 35102   const [view, setView] = (0,external_wp_element_namespaceObject.useState)(DEFAULT_VIEW);
       
 35103   const previousCategoryId = (0,external_wp_compose_namespaceObject.usePrevious)(categoryId);
       
 35104   const viewSyncStatus = view.filters?.find(({
       
 35105     field
       
 35106   }) => field === 'sync-status')?.value;
       
 35107   const {
       
 35108     patterns,
       
 35109     isResolving
       
 35110   } = use_patterns(type, categoryId, {
       
 35111     search: view.search,
       
 35112     syncStatus: viewSyncStatus
       
 35113   });
       
 35114   const {
       
 35115     records
       
 35116   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', TEMPLATE_PART_POST_TYPE, {
       
 35117     per_page: -1
       
 35118   });
       
 35119   const authors = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 35120     if (!records) {
       
 35121       return page_patterns_EMPTY_ARRAY;
       
 35122     }
       
 35123     const authorsSet = new Set();
       
 35124     records.forEach(template => {
       
 35125       authorsSet.add(template.author_text);
       
 35126     });
       
 35127     return Array.from(authorsSet).map(author => ({
       
 35128       value: author,
       
 35129       label: author
       
 35130     }));
       
 35131   }, [records]);
       
 35132   const fields = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 35133     const _fields = [{
       
 35134       header: (0,external_wp_i18n_namespaceObject.__)('Preview'),
       
 35135       id: 'preview',
       
 35136       render: ({
       
 35137         item
       
 35138       }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Preview, {
       
 35139         item: item,
       
 35140         viewType: view.type
       
 35141       }),
       
 35142       enableSorting: false,
       
 35143       enableHiding: false,
       
 35144       width: '1%'
       
 35145     }, {
       
 35146       header: (0,external_wp_i18n_namespaceObject.__)('Title'),
       
 35147       id: 'title',
       
 35148       render: ({
       
 35149         item
       
 35150       }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Title, {
       
 35151         item: item
       
 35152       }),
       
 35153       enableHiding: false
       
 35154     }];
       
 35155     if (type === PATTERN_TYPES.user) {
       
 35156       _fields.push({
       
 35157         header: (0,external_wp_i18n_namespaceObject.__)('Sync status'),
       
 35158         id: 'sync-status',
       
 35159         render: ({
       
 35160           item
       
 35161         }) => {
       
 35162           // User patterns can have their sync statuses checked directly.
       
 35163           // Non-user patterns are all unsynced for the time being.
       
 35164           return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 35165             className: `edit-site-patterns__field-sync-status-${item.syncStatus}`,
       
 35166             children: (SYNC_FILTERS.find(({
       
 35167               value
       
 35168             }) => value === item.syncStatus) || SYNC_FILTERS.find(({
       
 35169               value
       
 35170             }) => value === PATTERN_SYNC_TYPES.unsynced)).label
       
 35171           });
       
 35172         },
       
 35173         elements: SYNC_FILTERS,
       
 35174         filterBy: {
       
 35175           operators: [OPERATOR_IS],
       
 35176           isPrimary: true
       
 35177         },
       
 35178         enableSorting: false
       
 35179       });
       
 35180     } else if (type === TEMPLATE_PART_POST_TYPE) {
       
 35181       _fields.push({
       
 35182         header: (0,external_wp_i18n_namespaceObject.__)('Author'),
       
 35183         id: 'author',
       
 35184         getValue: ({
       
 35185           item
       
 35186         }) => item.templatePart.author_text,
       
 35187         render: ({
       
 35188           item
       
 35189         }) => {
       
 35190           return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Author, {
       
 35191             viewType: view.type,
       
 35192             item: item
       
 35193           });
       
 35194         },
       
 35195         elements: authors,
       
 35196         filterBy: {
       
 35197           isPrimary: true
       
 35198         },
       
 35199         width: '1%'
       
 35200       });
       
 35201     }
       
 35202     return _fields;
       
 35203   }, [view.type, type, authors]);
       
 35204 
       
 35205   // Reset the page number when the category changes.
 12195   (0,external_wp_element_namespaceObject.useEffect)(() => {
 35206   (0,external_wp_element_namespaceObject.useEffect)(() => {
 12196     if (isNavigationOpen) {
 35207     if (previousCategoryId !== categoryId) {
 12197       document.body.classList.add('is-navigation-sidebar-open');
 35208       setView(DEFAULT_VIEW);
       
 35209     }
       
 35210   }, [categoryId, previousCategoryId]);
       
 35211   const {
       
 35212     data,
       
 35213     paginationInfo
       
 35214   } = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 35215     // Search is managed server-side as well as filters for patterns.
       
 35216     // However, the author filter in template parts is done client-side.
       
 35217     const viewWithoutFilters = {
       
 35218       ...view
       
 35219     };
       
 35220     delete viewWithoutFilters.search;
       
 35221     if (type !== TEMPLATE_PART_POST_TYPE) {
       
 35222       viewWithoutFilters.filters = [];
       
 35223     }
       
 35224     return filterSortAndPaginate(patterns, viewWithoutFilters, fields);
       
 35225   }, [patterns, view, fields, type]);
       
 35226   const templatePartActions = page_patterns_usePostActions({
       
 35227     postType: TEMPLATE_PART_POST_TYPE,
       
 35228     context: 'list'
       
 35229   });
       
 35230   const patternActions = page_patterns_usePostActions({
       
 35231     postType: PATTERN_TYPES.user,
       
 35232     context: 'list'
       
 35233   });
       
 35234   const editAction = useEditPostAction();
       
 35235   const actions = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 35236     if (type === TEMPLATE_PART_POST_TYPE) {
       
 35237       return [editAction, ...templatePartActions].filter(Boolean);
       
 35238     }
       
 35239     return [editAction, ...patternActions].filter(Boolean);
       
 35240   }, [editAction, type, templatePartActions, patternActions]);
       
 35241   const onChangeView = (0,external_wp_element_namespaceObject.useCallback)(newView => {
       
 35242     if (newView.type !== view.type) {
       
 35243       newView = {
       
 35244         ...newView,
       
 35245         layout: {
       
 35246           ...defaultConfigPerViewType[newView.type]
       
 35247         }
       
 35248       };
       
 35249     }
       
 35250     setView(newView);
       
 35251   }, [view.type, setView]);
       
 35252   const id = (0,external_wp_element_namespaceObject.useId)();
       
 35253   const settings = usePatternSettings();
       
 35254   // Wrap everything in a block editor provider.
       
 35255   // This ensures 'styles' that are needed for the previews are synced
       
 35256   // from the site editor store to the block editor store.
       
 35257   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(page_patterns_ExperimentalBlockEditorProvider, {
       
 35258     settings: settings,
       
 35259     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Page, {
       
 35260       title: (0,external_wp_i18n_namespaceObject.__)('Patterns content'),
       
 35261       className: "edit-site-page-patterns-dataviews",
       
 35262       hideTitleFromUI: true,
       
 35263       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternsHeader, {
       
 35264         categoryId: categoryId,
       
 35265         type: type,
       
 35266         titleId: `${id}-title`,
       
 35267         descriptionId: `${id}-description`
       
 35268       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViews, {
       
 35269         paginationInfo: paginationInfo,
       
 35270         fields: fields,
       
 35271         actions: actions,
       
 35272         data: data || page_patterns_EMPTY_ARRAY,
       
 35273         getItemId: item => item.name,
       
 35274         isLoading: isResolving,
       
 35275         view: view,
       
 35276         onChangeView: onChangeView,
       
 35277         supportedLayouts: [LAYOUT_GRID, LAYOUT_TABLE]
       
 35278       })]
       
 35279     })
       
 35280   });
       
 35281 }
       
 35282 
       
 35283 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/home.js
       
 35284 /**
       
 35285  * WordPress dependencies
       
 35286  */
       
 35287 
       
 35288 
       
 35289 const home = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35290   xmlns: "http://www.w3.org/2000/svg",
       
 35291   viewBox: "0 0 24 24",
       
 35292   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35293     d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"
       
 35294   })
       
 35295 });
       
 35296 /* harmony default export */ const library_home = (home);
       
 35297 
       
 35298 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/verse.js
       
 35299 /**
       
 35300  * WordPress dependencies
       
 35301  */
       
 35302 
       
 35303 
       
 35304 const verse = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35305   viewBox: "0 0 24 24",
       
 35306   xmlns: "http://www.w3.org/2000/svg",
       
 35307   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35308     d: "M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"
       
 35309   })
       
 35310 });
       
 35311 /* harmony default export */ const library_verse = (verse);
       
 35312 
       
 35313 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pin.js
       
 35314 /**
       
 35315  * WordPress dependencies
       
 35316  */
       
 35317 
       
 35318 
       
 35319 const pin = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35320   xmlns: "http://www.w3.org/2000/svg",
       
 35321   viewBox: "0 0 24 24",
       
 35322   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35323     d: "m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"
       
 35324   })
       
 35325 });
       
 35326 /* harmony default export */ const library_pin = (pin);
       
 35327 
       
 35328 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive.js
       
 35329 /**
       
 35330  * WordPress dependencies
       
 35331  */
       
 35332 
       
 35333 
       
 35334 const archive = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35335   viewBox: "0 0 24 24",
       
 35336   xmlns: "http://www.w3.org/2000/svg",
       
 35337   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35338     fillRule: "evenodd",
       
 35339     clipRule: "evenodd",
       
 35340     d: "M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"
       
 35341   })
       
 35342 });
       
 35343 /* harmony default export */ const library_archive = (archive);
       
 35344 
       
 35345 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/not-found.js
       
 35346 /**
       
 35347  * WordPress dependencies
       
 35348  */
       
 35349 
       
 35350 
       
 35351 const notFound = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35352   xmlns: "http://www.w3.org/2000/svg",
       
 35353   viewBox: "0 0 24 24",
       
 35354   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35355     d: "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"
       
 35356   })
       
 35357 });
       
 35358 /* harmony default export */ const not_found = (notFound);
       
 35359 
       
 35360 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list.js
       
 35361 /**
       
 35362  * WordPress dependencies
       
 35363  */
       
 35364 
       
 35365 
       
 35366 const list = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35367   viewBox: "0 0 24 24",
       
 35368   xmlns: "http://www.w3.org/2000/svg",
       
 35369   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35370     d: "M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"
       
 35371   })
       
 35372 });
       
 35373 /* harmony default export */ const library_list = (list);
       
 35374 
       
 35375 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-meta.js
       
 35376 /**
       
 35377  * WordPress dependencies
       
 35378  */
       
 35379 
       
 35380 
       
 35381 const blockMeta = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35382   xmlns: "http://www.w3.org/2000/svg",
       
 35383   viewBox: "0 0 24 24",
       
 35384   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35385     fillRule: "evenodd",
       
 35386     d: "M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",
       
 35387     clipRule: "evenodd"
       
 35388   })
       
 35389 });
       
 35390 /* harmony default export */ const block_meta = (blockMeta);
       
 35391 
       
 35392 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/calendar.js
       
 35393 /**
       
 35394  * WordPress dependencies
       
 35395  */
       
 35396 
       
 35397 
       
 35398 const calendar = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35399   viewBox: "0 0 24 24",
       
 35400   xmlns: "http://www.w3.org/2000/svg",
       
 35401   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35402     d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"
       
 35403   })
       
 35404 });
       
 35405 /* harmony default export */ const library_calendar = (calendar);
       
 35406 
       
 35407 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/tag.js
       
 35408 /**
       
 35409  * WordPress dependencies
       
 35410  */
       
 35411 
       
 35412 
       
 35413 const tag = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35414   xmlns: "http://www.w3.org/2000/svg",
       
 35415   viewBox: "0 0 24 24",
       
 35416   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35417     d: "M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
       
 35418   })
       
 35419 });
       
 35420 /* harmony default export */ const library_tag = (tag);
       
 35421 
       
 35422 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js
       
 35423 /**
       
 35424  * WordPress dependencies
       
 35425  */
       
 35426 
       
 35427 
       
 35428 
       
 35429 const media = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, {
       
 35430   xmlns: "http://www.w3.org/2000/svg",
       
 35431   viewBox: "0 0 24 24",
       
 35432   children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35433     d: "m7 6.5 4 2.5-4 2.5z"
       
 35434   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35435     fillRule: "evenodd",
       
 35436     clipRule: "evenodd",
       
 35437     d: "m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"
       
 35438   })]
       
 35439 });
       
 35440 /* harmony default export */ const library_media = (media);
       
 35441 
       
 35442 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post.js
       
 35443 /**
       
 35444  * WordPress dependencies
       
 35445  */
       
 35446 
       
 35447 
       
 35448 const post_post = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 35449   xmlns: "http://www.w3.org/2000/svg",
       
 35450   viewBox: "0 0 24 24",
       
 35451   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 35452     d: "m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"
       
 35453   })
       
 35454 });
       
 35455 /* harmony default export */ const library_post = (post_post);
       
 35456 
       
 35457 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/utils.js
       
 35458 /**
       
 35459  * WordPress dependencies
       
 35460  */
       
 35461 
       
 35462 
       
 35463 
       
 35464 
       
 35465 
       
 35466 
       
 35467 
       
 35468 
       
 35469 /**
       
 35470  * Internal dependencies
       
 35471  */
       
 35472 
       
 35473 const EMPTY_OBJECT = {};
       
 35474 
       
 35475 /**
       
 35476  * @typedef IHasNameAndId
       
 35477  * @property {string|number} id   The entity's id.
       
 35478  * @property {string}        name The entity's name.
       
 35479  */
       
 35480 
       
 35481 const utils_getValueFromObjectPath = (object, path) => {
       
 35482   let value = object;
       
 35483   path.split('.').forEach(fieldName => {
       
 35484     value = value?.[fieldName];
       
 35485   });
       
 35486   return value;
       
 35487 };
       
 35488 
       
 35489 /**
       
 35490  * Helper util to map records to add a `name` prop from a
       
 35491  * provided path, in order to handle all entities in the same
       
 35492  * fashion(implementing`IHasNameAndId` interface).
       
 35493  *
       
 35494  * @param {Object[]} entities The array of entities.
       
 35495  * @param {string}   path     The path to map a `name` property from the entity.
       
 35496  * @return {IHasNameAndId[]} An array of enitities that now implement the `IHasNameAndId` interface.
       
 35497  */
       
 35498 const mapToIHasNameAndId = (entities, path) => {
       
 35499   return (entities || []).map(entity => ({
       
 35500     ...entity,
       
 35501     name: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(utils_getValueFromObjectPath(entity, path))
       
 35502   }));
       
 35503 };
       
 35504 
       
 35505 /**
       
 35506  * @typedef {Object} EntitiesInfo
       
 35507  * @property {boolean}  hasEntities         If an entity has available records(posts, terms, etc..).
       
 35508  * @property {number[]} existingEntitiesIds An array of the existing entities ids.
       
 35509  */
       
 35510 
       
 35511 const useExistingTemplates = () => {
       
 35512   return (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', TEMPLATE_POST_TYPE, {
       
 35513     per_page: -1
       
 35514   }), []);
       
 35515 };
       
 35516 const useDefaultTemplateTypes = () => {
       
 35517   return (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplateTypes(), []);
       
 35518 };
       
 35519 const usePublicPostTypes = () => {
       
 35520   const postTypes = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getPostTypes({
       
 35521     per_page: -1
       
 35522   }), []);
       
 35523   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 35524     const excludedPostTypes = ['attachment'];
       
 35525     return postTypes?.filter(({
       
 35526       viewable,
       
 35527       slug
       
 35528     }) => viewable && !excludedPostTypes.includes(slug));
       
 35529   }, [postTypes]);
       
 35530 };
       
 35531 const usePublicTaxonomies = () => {
       
 35532   const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getTaxonomies({
       
 35533     per_page: -1
       
 35534   }), []);
       
 35535   return (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 35536     return taxonomies?.filter(({
       
 35537       visibility
       
 35538     }) => visibility?.publicly_queryable);
       
 35539   }, [taxonomies]);
       
 35540 };
       
 35541 function usePostTypeArchiveMenuItems() {
       
 35542   const publicPostTypes = usePublicPostTypes();
       
 35543   const postTypesWithArchives = (0,external_wp_element_namespaceObject.useMemo)(() => publicPostTypes?.filter(postType => postType.has_archive), [publicPostTypes]);
       
 35544   const existingTemplates = useExistingTemplates();
       
 35545   // We need to keep track of naming conflicts. If a conflict
       
 35546   // occurs, we need to add slug.
       
 35547   const postTypeLabels = (0,external_wp_element_namespaceObject.useMemo)(() => publicPostTypes?.reduce((accumulator, {
       
 35548     labels
       
 35549   }) => {
       
 35550     const singularName = labels.singular_name.toLowerCase();
       
 35551     accumulator[singularName] = (accumulator[singularName] || 0) + 1;
       
 35552     return accumulator;
       
 35553   }, {}), [publicPostTypes]);
       
 35554   const needsUniqueIdentifier = (0,external_wp_element_namespaceObject.useCallback)(({
       
 35555     labels,
       
 35556     slug
       
 35557   }) => {
       
 35558     const singularName = labels.singular_name.toLowerCase();
       
 35559     return postTypeLabels[singularName] > 1 && singularName !== slug;
       
 35560   }, [postTypeLabels]);
       
 35561   return (0,external_wp_element_namespaceObject.useMemo)(() => postTypesWithArchives?.filter(postType => !(existingTemplates || []).some(existingTemplate => existingTemplate.slug === 'archive-' + postType.slug)).map(postType => {
       
 35562     let title;
       
 35563     if (needsUniqueIdentifier(postType)) {
       
 35564       title = (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35565       // translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
       
 35566       (0,external_wp_i18n_namespaceObject.__)('Archive: %1$s (%2$s)'), postType.labels.singular_name, postType.slug);
 12198     } else {
 35567     } else {
 12199       document.body.classList.remove('is-navigation-sidebar-open');
 35568       title = (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35569       // translators: %s: Name of the post type e.g: "Post".
       
 35570       (0,external_wp_i18n_namespaceObject.__)('Archive: %s'), postType.labels.singular_name);
 12200     }
 35571     }
 12201   }, [isNavigationOpen]);
 35572     return {
 12202   (0,external_wp_element_namespaceObject.useEffect)(function openGlobalStylesOnLoad() {
 35573       slug: 'archive-' + postType.slug,
 12203     const searchParams = new URLSearchParams(window.location.search);
 35574       description: (0,external_wp_i18n_namespaceObject.sprintf)(
 12204 
 35575       // translators: %s: Name of the post type e.g: "Post".
 12205     if (searchParams.get('styles') === 'open') {
 35576       (0,external_wp_i18n_namespaceObject.__)('Displays an archive with the latest posts of type: %s.'), postType.labels.singular_name),
 12206       enableComplementaryArea('core/edit-site', 'edit-site/global-styles');
 35577       title,
       
 35578       // `icon` is the `menu_icon` property of a post type. We
       
 35579       // only handle `dashicons` for now, even if the `menu_icon`
       
 35580       // also supports urls and svg as values.
       
 35581       icon: typeof postType.icon === 'string' && postType.icon.startsWith('dashicons-') ? postType.icon.slice(10) : library_archive,
       
 35582       templatePrefix: 'archive'
       
 35583     };
       
 35584   }) || [], [postTypesWithArchives, existingTemplates, needsUniqueIdentifier]);
       
 35585 }
       
 35586 const usePostTypeMenuItems = onClickMenuItem => {
       
 35587   const publicPostTypes = usePublicPostTypes();
       
 35588   const existingTemplates = useExistingTemplates();
       
 35589   const defaultTemplateTypes = useDefaultTemplateTypes();
       
 35590   // We need to keep track of naming conflicts. If a conflict
       
 35591   // occurs, we need to add slug.
       
 35592   const templateLabels = (0,external_wp_element_namespaceObject.useMemo)(() => publicPostTypes?.reduce((accumulator, {
       
 35593     labels
       
 35594   }) => {
       
 35595     const templateName = (labels.template_name || labels.singular_name).toLowerCase();
       
 35596     accumulator[templateName] = (accumulator[templateName] || 0) + 1;
       
 35597     return accumulator;
       
 35598   }, {}), [publicPostTypes]);
       
 35599   const needsUniqueIdentifier = (0,external_wp_element_namespaceObject.useCallback)(({
       
 35600     labels,
       
 35601     slug
       
 35602   }) => {
       
 35603     const templateName = (labels.template_name || labels.singular_name).toLowerCase();
       
 35604     return templateLabels[templateName] > 1 && templateName !== slug;
       
 35605   }, [templateLabels]);
       
 35606 
       
 35607   // `page`is a special case in template hierarchy.
       
 35608   const templatePrefixes = (0,external_wp_element_namespaceObject.useMemo)(() => publicPostTypes?.reduce((accumulator, {
       
 35609     slug
       
 35610   }) => {
       
 35611     let suffix = slug;
       
 35612     if (slug !== 'page') {
       
 35613       suffix = `single-${suffix}`;
 12207     }
 35614     }
 12208   }, [enableComplementaryArea]); // Don't render the Editor until the settings are set and loaded.
 35615     accumulator[slug] = suffix;
 12209 
 35616     return accumulator;
 12210   const isReady = (settings === null || settings === void 0 ? void 0 : settings.siteUrl) && templateType !== undefined && entityId !== undefined;
 35617   }, {}), [publicPostTypes]);
 12211   const secondarySidebarLabel = isListViewOpen ? (0,external_wp_i18n_namespaceObject.__)('List View') : (0,external_wp_i18n_namespaceObject.__)('Block Library');
 35618   const postTypesInfo = useEntitiesInfo('postType', templatePrefixes);
 12212 
 35619   const existingTemplateSlugs = (existingTemplates || []).map(({
 12213   const secondarySidebar = () => {
 35620     slug
 12214     if (editorMode === 'visual' && isInserterOpen) {
 35621   }) => slug);
 12215       return (0,external_wp_element_namespaceObject.createElement)(InserterSidebar, null);
 35622   const menuItems = (publicPostTypes || []).reduce((accumulator, postType) => {
       
 35623     const {
       
 35624       slug,
       
 35625       labels,
       
 35626       icon
       
 35627     } = postType;
       
 35628     // We need to check if the general template is part of the
       
 35629     // defaultTemplateTypes. If it is, just use that info and
       
 35630     // augment it with the specific template functionality.
       
 35631     const generalTemplateSlug = templatePrefixes[slug];
       
 35632     const defaultTemplateType = defaultTemplateTypes?.find(({
       
 35633       slug: _slug
       
 35634     }) => _slug === generalTemplateSlug);
       
 35635     const hasGeneralTemplate = existingTemplateSlugs?.includes(generalTemplateSlug);
       
 35636     const _needsUniqueIdentifier = needsUniqueIdentifier(postType);
       
 35637     let menuItemTitle = labels.template_name || (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35638     // translators: %s: Name of the post type e.g: "Post".
       
 35639     (0,external_wp_i18n_namespaceObject.__)('Single item: %s'), labels.singular_name);
       
 35640     if (_needsUniqueIdentifier) {
       
 35641       menuItemTitle = labels.template_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35642       // translators: %1s: Name of the template e.g: "Single Item: Post"; %2s: Slug of the post type e.g: "book".
       
 35643       (0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), labels.template_name, slug) : (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35644       // translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
       
 35645       (0,external_wp_i18n_namespaceObject.__)('Single item: %1$s (%2$s)'), labels.singular_name, slug);
 12216     }
 35646     }
 12217 
 35647     const menuItem = defaultTemplateType ? {
 12218     if (editorMode === 'visual' && isListViewOpen) {
 35648       ...defaultTemplateType,
 12219       return (0,external_wp_element_namespaceObject.createElement)(ListViewSidebar, null);
 35649       templatePrefix: templatePrefixes[slug]
       
 35650     } : {
       
 35651       slug: generalTemplateSlug,
       
 35652       title: menuItemTitle,
       
 35653       description: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35654       // translators: %s: Name of the post type e.g: "Post".
       
 35655       (0,external_wp_i18n_namespaceObject.__)('Displays a single item: %s.'), labels.singular_name),
       
 35656       // `icon` is the `menu_icon` property of a post type. We
       
 35657       // only handle `dashicons` for now, even if the `menu_icon`
       
 35658       // also supports urls and svg as values.
       
 35659       icon: typeof icon === 'string' && icon.startsWith('dashicons-') ? icon.slice(10) : library_post,
       
 35660       templatePrefix: templatePrefixes[slug]
       
 35661     };
       
 35662     const hasEntities = postTypesInfo?.[slug]?.hasEntities;
       
 35663     // We have a different template creation flow only if they have entities.
       
 35664     if (hasEntities) {
       
 35665       menuItem.onClick = template => {
       
 35666         onClickMenuItem({
       
 35667           type: 'postType',
       
 35668           slug,
       
 35669           config: {
       
 35670             recordNamePath: 'title.rendered',
       
 35671             queryArgs: ({
       
 35672               search
       
 35673             }) => {
       
 35674               return {
       
 35675                 _fields: 'id,title,slug,link',
       
 35676                 orderBy: search ? 'relevance' : 'modified',
       
 35677                 exclude: postTypesInfo[slug].existingEntitiesIds
       
 35678               };
       
 35679             },
       
 35680             getSpecificTemplate: suggestion => {
       
 35681               const templateSlug = `${templatePrefixes[slug]}-${suggestion.slug}`;
       
 35682               return {
       
 35683                 title: templateSlug,
       
 35684                 slug: templateSlug,
       
 35685                 templatePrefix: templatePrefixes[slug]
       
 35686               };
       
 35687             }
       
 35688           },
       
 35689           labels,
       
 35690           hasGeneralTemplate,
       
 35691           template
       
 35692         });
       
 35693       };
 12220     }
 35694     }
 12221 
 35695     // We don't need to add the menu item if there are no
 12222     return null;
 35696     // entities and the general template exists.
 12223   }; // Only announce the title once the editor is ready to prevent "Replace"
 35697     if (!hasGeneralTemplate || hasEntities) {
 12224   // action in <URlQueryController> from double-announcing.
 35698       accumulator.push(menuItem);
 12225 
 35699     }
 12226 
 35700     return accumulator;
 12227   useTitle(isReady && (0,external_wp_i18n_namespaceObject.__)('Editor (beta)'));
 35701   }, []);
 12228   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(URLQueryController, null), isReady && (0,external_wp_element_namespaceObject.createElement)(external_wp_keyboardShortcuts_namespaceObject.ShortcutProvider, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_coreData_namespaceObject.EntityProvider, {
 35702   // Split menu items into two groups: one for the default post types
 12229     kind: "root",
 35703   // and one for the rest.
 12230     type: "site"
 35704   const postTypesMenuItems = (0,external_wp_element_namespaceObject.useMemo)(() => menuItems.reduce((accumulator, postType) => {
 12231   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_coreData_namespaceObject.EntityProvider, {
 35705     const {
 12232     kind: "postType",
 35706       slug
 12233     type: templateType,
 35707     } = postType;
 12234     id: entityId
 35708     let key = 'postTypesMenuItems';
 12235   }, (0,external_wp_element_namespaceObject.createElement)(GlobalStylesProvider, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, {
 35709     if (slug === 'page') {
 12236     value: blockContext
 35710       key = 'defaultPostTypesMenuItems';
 12237   }, (0,external_wp_element_namespaceObject.createElement)(GlobalStylesRenderer, null), (0,external_wp_element_namespaceObject.createElement)(ErrorBoundary, {
 35711     }
 12238     onError: onError
 35712     accumulator[key].push(postType);
 12239   }, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(SidebarComplementaryAreaFills, null), (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
 35713     return accumulator;
 12240     labels: { ...interfaceLabels,
 35714   }, {
 12241       secondarySidebar: secondarySidebarLabel
 35715     defaultPostTypesMenuItems: [],
       
 35716     postTypesMenuItems: []
       
 35717   }), [menuItems]);
       
 35718   return postTypesMenuItems;
       
 35719 };
       
 35720 const useTaxonomiesMenuItems = onClickMenuItem => {
       
 35721   const publicTaxonomies = usePublicTaxonomies();
       
 35722   const existingTemplates = useExistingTemplates();
       
 35723   const defaultTemplateTypes = useDefaultTemplateTypes();
       
 35724   // `category` and `post_tag` are special cases in template hierarchy.
       
 35725   const templatePrefixes = (0,external_wp_element_namespaceObject.useMemo)(() => publicTaxonomies?.reduce((accumulator, {
       
 35726     slug
       
 35727   }) => {
       
 35728     let suffix = slug;
       
 35729     if (!['category', 'post_tag'].includes(slug)) {
       
 35730       suffix = `taxonomy-${suffix}`;
       
 35731     }
       
 35732     if (slug === 'post_tag') {
       
 35733       suffix = `tag`;
       
 35734     }
       
 35735     accumulator[slug] = suffix;
       
 35736     return accumulator;
       
 35737   }, {}), [publicTaxonomies]);
       
 35738   // We need to keep track of naming conflicts. If a conflict
       
 35739   // occurs, we need to add slug.
       
 35740   const taxonomyLabels = publicTaxonomies?.reduce((accumulator, {
       
 35741     labels
       
 35742   }) => {
       
 35743     const templateName = (labels.template_name || labels.singular_name).toLowerCase();
       
 35744     accumulator[templateName] = (accumulator[templateName] || 0) + 1;
       
 35745     return accumulator;
       
 35746   }, {});
       
 35747   const needsUniqueIdentifier = (labels, slug) => {
       
 35748     if (['category', 'post_tag'].includes(slug)) {
       
 35749       return false;
       
 35750     }
       
 35751     const templateName = (labels.template_name || labels.singular_name).toLowerCase();
       
 35752     return taxonomyLabels[templateName] > 1 && templateName !== slug;
       
 35753   };
       
 35754   const taxonomiesInfo = useEntitiesInfo('taxonomy', templatePrefixes);
       
 35755   const existingTemplateSlugs = (existingTemplates || []).map(({
       
 35756     slug
       
 35757   }) => slug);
       
 35758   const menuItems = (publicTaxonomies || []).reduce((accumulator, taxonomy) => {
       
 35759     const {
       
 35760       slug,
       
 35761       labels
       
 35762     } = taxonomy;
       
 35763     // We need to check if the general template is part of the
       
 35764     // defaultTemplateTypes. If it is, just use that info and
       
 35765     // augment it with the specific template functionality.
       
 35766     const generalTemplateSlug = templatePrefixes[slug];
       
 35767     const defaultTemplateType = defaultTemplateTypes?.find(({
       
 35768       slug: _slug
       
 35769     }) => _slug === generalTemplateSlug);
       
 35770     const hasGeneralTemplate = existingTemplateSlugs?.includes(generalTemplateSlug);
       
 35771     const _needsUniqueIdentifier = needsUniqueIdentifier(labels, slug);
       
 35772     let menuItemTitle = labels.template_name || labels.singular_name;
       
 35773     if (_needsUniqueIdentifier) {
       
 35774       menuItemTitle = labels.template_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35775       // translators: %1s: Name of the template e.g: "Products by Category"; %2s: Slug of the taxonomy e.g: "product_cat".
       
 35776       (0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), labels.template_name, slug) : (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35777       // translators: %1s: Name of the taxonomy e.g: "Category"; %2s: Slug of the taxonomy e.g: "product_cat".
       
 35778       (0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), labels.singular_name, slug);
       
 35779     }
       
 35780     const menuItem = defaultTemplateType ? {
       
 35781       ...defaultTemplateType,
       
 35782       templatePrefix: templatePrefixes[slug]
       
 35783     } : {
       
 35784       slug: generalTemplateSlug,
       
 35785       title: menuItemTitle,
       
 35786       description: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 35787       // translators: %s: Name of the taxonomy e.g: "Product Categories".
       
 35788       (0,external_wp_i18n_namespaceObject.__)('Displays taxonomy: %s.'), labels.singular_name),
       
 35789       icon: block_meta,
       
 35790       templatePrefix: templatePrefixes[slug]
       
 35791     };
       
 35792     const hasEntities = taxonomiesInfo?.[slug]?.hasEntities;
       
 35793     // We have a different template creation flow only if they have entities.
       
 35794     if (hasEntities) {
       
 35795       menuItem.onClick = template => {
       
 35796         onClickMenuItem({
       
 35797           type: 'taxonomy',
       
 35798           slug,
       
 35799           config: {
       
 35800             queryArgs: ({
       
 35801               search
       
 35802             }) => {
       
 35803               return {
       
 35804                 _fields: 'id,name,slug,link',
       
 35805                 orderBy: search ? 'name' : 'count',
       
 35806                 exclude: taxonomiesInfo[slug].existingEntitiesIds
       
 35807               };
       
 35808             },
       
 35809             getSpecificTemplate: suggestion => {
       
 35810               const templateSlug = `${templatePrefixes[slug]}-${suggestion.slug}`;
       
 35811               return {
       
 35812                 title: templateSlug,
       
 35813                 slug: templateSlug,
       
 35814                 templatePrefix: templatePrefixes[slug]
       
 35815               };
       
 35816             }
       
 35817           },
       
 35818           labels,
       
 35819           hasGeneralTemplate,
       
 35820           template
       
 35821         });
       
 35822       };
       
 35823     }
       
 35824     // We don't need to add the menu item if there are no
       
 35825     // entities and the general template exists.
       
 35826     if (!hasGeneralTemplate || hasEntities) {
       
 35827       accumulator.push(menuItem);
       
 35828     }
       
 35829     return accumulator;
       
 35830   }, []);
       
 35831   // Split menu items into two groups: one for the default taxonomies
       
 35832   // and one for the rest.
       
 35833   const taxonomiesMenuItems = (0,external_wp_element_namespaceObject.useMemo)(() => menuItems.reduce((accumulator, taxonomy) => {
       
 35834     const {
       
 35835       slug
       
 35836     } = taxonomy;
       
 35837     let key = 'taxonomiesMenuItems';
       
 35838     if (['category', 'tag'].includes(slug)) {
       
 35839       key = 'defaultTaxonomiesMenuItems';
       
 35840     }
       
 35841     accumulator[key].push(taxonomy);
       
 35842     return accumulator;
       
 35843   }, {
       
 35844     defaultTaxonomiesMenuItems: [],
       
 35845     taxonomiesMenuItems: []
       
 35846   }), [menuItems]);
       
 35847   return taxonomiesMenuItems;
       
 35848 };
       
 35849 const USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX = {
       
 35850   user: 'author'
       
 35851 };
       
 35852 const USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS = {
       
 35853   user: {
       
 35854     who: 'authors'
       
 35855   }
       
 35856 };
       
 35857 function useAuthorMenuItem(onClickMenuItem) {
       
 35858   const existingTemplates = useExistingTemplates();
       
 35859   const defaultTemplateTypes = useDefaultTemplateTypes();
       
 35860   const authorInfo = useEntitiesInfo('root', USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX, USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS);
       
 35861   let authorMenuItem = defaultTemplateTypes?.find(({
       
 35862     slug
       
 35863   }) => slug === 'author');
       
 35864   if (!authorMenuItem) {
       
 35865     authorMenuItem = {
       
 35866       description: (0,external_wp_i18n_namespaceObject.__)('Displays latest posts written by a single author.'),
       
 35867       slug: 'author',
       
 35868       title: 'Author'
       
 35869     };
       
 35870   }
       
 35871   const hasGeneralTemplate = !!existingTemplates?.find(({
       
 35872     slug
       
 35873   }) => slug === 'author');
       
 35874   if (authorInfo.user?.hasEntities) {
       
 35875     authorMenuItem = {
       
 35876       ...authorMenuItem,
       
 35877       templatePrefix: 'author'
       
 35878     };
       
 35879     authorMenuItem.onClick = template => {
       
 35880       onClickMenuItem({
       
 35881         type: 'root',
       
 35882         slug: 'user',
       
 35883         config: {
       
 35884           queryArgs: ({
       
 35885             search
       
 35886           }) => {
       
 35887             return {
       
 35888               _fields: 'id,name,slug,link',
       
 35889               orderBy: search ? 'name' : 'registered_date',
       
 35890               exclude: authorInfo.user.existingEntitiesIds,
       
 35891               who: 'authors'
       
 35892             };
       
 35893           },
       
 35894           getSpecificTemplate: suggestion => {
       
 35895             const templateSlug = `author-${suggestion.slug}`;
       
 35896             return {
       
 35897               title: templateSlug,
       
 35898               slug: templateSlug,
       
 35899               templatePrefix: 'author'
       
 35900             };
       
 35901           }
       
 35902         },
       
 35903         labels: {
       
 35904           singular_name: (0,external_wp_i18n_namespaceObject.__)('Author'),
       
 35905           search_items: (0,external_wp_i18n_namespaceObject.__)('Search Authors'),
       
 35906           not_found: (0,external_wp_i18n_namespaceObject.__)('No authors found.'),
       
 35907           all_items: (0,external_wp_i18n_namespaceObject.__)('All Authors')
       
 35908         },
       
 35909         hasGeneralTemplate,
       
 35910         template
       
 35911       });
       
 35912     };
       
 35913   }
       
 35914   if (!hasGeneralTemplate || authorInfo.user?.hasEntities) {
       
 35915     return authorMenuItem;
       
 35916   }
       
 35917 }
       
 35918 
       
 35919 /**
       
 35920  * Helper hook that filters all the existing templates by the given
       
 35921  * object with the entity's slug as key and the template prefix as value.
       
 35922  *
       
 35923  * Example:
       
 35924  * `existingTemplates` is: [ { slug: 'tag-apple' }, { slug: 'page-about' }, { slug: 'tag' } ]
       
 35925  * `templatePrefixes` is: { post_tag: 'tag' }
       
 35926  * It will return: { post_tag: ['apple'] }
       
 35927  *
       
 35928  * Note: We append the `-` to the given template prefix in this function for our checks.
       
 35929  *
       
 35930  * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.
       
 35931  * @return {Record<string,string[]>} An object with the entity's slug as key and an array with the existing template slugs as value.
       
 35932  */
       
 35933 const useExistingTemplateSlugs = templatePrefixes => {
       
 35934   const existingTemplates = useExistingTemplates();
       
 35935   const existingSlugs = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 35936     return Object.entries(templatePrefixes || {}).reduce((accumulator, [slug, prefix]) => {
       
 35937       const slugsWithTemplates = (existingTemplates || []).reduce((_accumulator, existingTemplate) => {
       
 35938         const _prefix = `${prefix}-`;
       
 35939         if (existingTemplate.slug.startsWith(_prefix)) {
       
 35940           _accumulator.push(existingTemplate.slug.substring(_prefix.length));
       
 35941         }
       
 35942         return _accumulator;
       
 35943       }, []);
       
 35944       if (slugsWithTemplates.length) {
       
 35945         accumulator[slug] = slugsWithTemplates;
       
 35946       }
       
 35947       return accumulator;
       
 35948     }, {});
       
 35949   }, [templatePrefixes, existingTemplates]);
       
 35950   return existingSlugs;
       
 35951 };
       
 35952 
       
 35953 /**
       
 35954  * Helper hook that finds the existing records with an associated template,
       
 35955  * as they need to be excluded from the template suggestions.
       
 35956  *
       
 35957  * @param {string}                entityName                The entity's name.
       
 35958  * @param {Record<string,string>} templatePrefixes          An object with the entity's slug as key and the template prefix as value.
       
 35959  * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.
       
 35960  * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the existing records as value.
       
 35961  */
       
 35962 const useTemplatesToExclude = (entityName, templatePrefixes, additionalQueryParameters = {}) => {
       
 35963   const slugsToExcludePerEntity = useExistingTemplateSlugs(templatePrefixes);
       
 35964   const recordsToExcludePerEntity = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 35965     return Object.entries(slugsToExcludePerEntity || {}).reduce((accumulator, [slug, slugsWithTemplates]) => {
       
 35966       const entitiesWithTemplates = select(external_wp_coreData_namespaceObject.store).getEntityRecords(entityName, slug, {
       
 35967         _fields: 'id',
       
 35968         context: 'view',
       
 35969         slug: slugsWithTemplates,
       
 35970         ...additionalQueryParameters[slug]
       
 35971       });
       
 35972       if (entitiesWithTemplates?.length) {
       
 35973         accumulator[slug] = entitiesWithTemplates;
       
 35974       }
       
 35975       return accumulator;
       
 35976     }, {});
       
 35977   }, [slugsToExcludePerEntity]);
       
 35978   return recordsToExcludePerEntity;
       
 35979 };
       
 35980 
       
 35981 /**
       
 35982  * Helper hook that returns information about an entity having
       
 35983  * records that we can create a specific template for.
       
 35984  *
       
 35985  * For example we can search for `terms` in `taxonomy` entity or
       
 35986  * `posts` in `postType` entity.
       
 35987  *
       
 35988  * First we need to find the existing records with an associated template,
       
 35989  * to query afterwards for any remaining record, by excluding them.
       
 35990  *
       
 35991  * @param {string}                entityName                The entity's name.
       
 35992  * @param {Record<string,string>} templatePrefixes          An object with the entity's slug as key and the template prefix as value.
       
 35993  * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.
       
 35994  * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the EntitiesInfo as value.
       
 35995  */
       
 35996 const useEntitiesInfo = (entityName, templatePrefixes, additionalQueryParameters = EMPTY_OBJECT) => {
       
 35997   const recordsToExcludePerEntity = useTemplatesToExclude(entityName, templatePrefixes, additionalQueryParameters);
       
 35998   const entitiesHasRecords = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 35999     return Object.keys(templatePrefixes || {}).reduce((accumulator, slug) => {
       
 36000       const existingEntitiesIds = recordsToExcludePerEntity?.[slug]?.map(({
       
 36001         id
       
 36002       }) => id) || [];
       
 36003       accumulator[slug] = !!select(external_wp_coreData_namespaceObject.store).getEntityRecords(entityName, slug, {
       
 36004         per_page: 1,
       
 36005         _fields: 'id',
       
 36006         context: 'view',
       
 36007         exclude: existingEntitiesIds,
       
 36008         ...additionalQueryParameters[slug]
       
 36009       })?.length;
       
 36010       return accumulator;
       
 36011     }, {});
       
 36012   }, [templatePrefixes, recordsToExcludePerEntity, entityName, additionalQueryParameters]);
       
 36013   const entitiesInfo = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 36014     return Object.keys(templatePrefixes || {}).reduce((accumulator, slug) => {
       
 36015       const existingEntitiesIds = recordsToExcludePerEntity?.[slug]?.map(({
       
 36016         id
       
 36017       }) => id) || [];
       
 36018       accumulator[slug] = {
       
 36019         hasEntities: entitiesHasRecords[slug],
       
 36020         existingEntitiesIds
       
 36021       };
       
 36022       return accumulator;
       
 36023     }, {});
       
 36024   }, [templatePrefixes, recordsToExcludePerEntity, entitiesHasRecords]);
       
 36025   return entitiesInfo;
       
 36026 };
       
 36027 
       
 36028 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/add-custom-template-modal-content.js
       
 36029 /**
       
 36030  * WordPress dependencies
       
 36031  */
       
 36032 
       
 36033 
       
 36034 
       
 36035 
       
 36036 
       
 36037 
       
 36038 
       
 36039 /**
       
 36040  * Internal dependencies
       
 36041  */
       
 36042 
       
 36043 
       
 36044 
       
 36045 
       
 36046 
       
 36047 const {
       
 36048   CompositeV2: add_custom_template_modal_content_Composite,
       
 36049   CompositeItemV2: add_custom_template_modal_content_CompositeItem,
       
 36050   useCompositeStoreV2: add_custom_template_modal_content_useCompositeStore
       
 36051 } = lock_unlock_unlock(external_wp_components_namespaceObject.privateApis);
       
 36052 const add_custom_template_modal_content_EMPTY_ARRAY = [];
       
 36053 function SuggestionListItem({
       
 36054   suggestion,
       
 36055   search,
       
 36056   onSelect,
       
 36057   entityForSuggestions
       
 36058 }) {
       
 36059   const baseCssClass = 'edit-site-custom-template-modal__suggestions_list__list-item';
       
 36060   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(add_custom_template_modal_content_CompositeItem, {
       
 36061     render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 36062       role: "option",
       
 36063       className: baseCssClass,
       
 36064       onClick: () => onSelect(entityForSuggestions.config.getSpecificTemplate(suggestion))
       
 36065     }),
       
 36066     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36067       size: "body",
       
 36068       lineHeight: 1.53846153846 // 20px
       
 36069       ,
       
 36070       weight: 500,
       
 36071       className: `${baseCssClass}__title`,
       
 36072       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextHighlight, {
       
 36073         text: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(suggestion.name),
       
 36074         highlight: search
       
 36075       })
       
 36076     }), suggestion.link && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36077       size: "body",
       
 36078       lineHeight: 1.53846153846 // 20px
       
 36079       ,
       
 36080       className: `${baseCssClass}__info`,
       
 36081       children: suggestion.link
       
 36082     })]
       
 36083   });
       
 36084 }
       
 36085 function useSearchSuggestions(entityForSuggestions, search) {
       
 36086   const {
       
 36087     config
       
 36088   } = entityForSuggestions;
       
 36089   const query = (0,external_wp_element_namespaceObject.useMemo)(() => ({
       
 36090     order: 'asc',
       
 36091     context: 'view',
       
 36092     search,
       
 36093     per_page: search ? 20 : 10,
       
 36094     ...config.queryArgs(search)
       
 36095   }), [search, config]);
       
 36096   const {
       
 36097     records: searchResults,
       
 36098     hasResolved: searchHasResolved
       
 36099   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(entityForSuggestions.type, entityForSuggestions.slug, query);
       
 36100   const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(add_custom_template_modal_content_EMPTY_ARRAY);
       
 36101   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 36102     if (!searchHasResolved) {
       
 36103       return;
       
 36104     }
       
 36105     let newSuggestions = add_custom_template_modal_content_EMPTY_ARRAY;
       
 36106     if (searchResults?.length) {
       
 36107       newSuggestions = searchResults;
       
 36108       if (config.recordNamePath) {
       
 36109         newSuggestions = mapToIHasNameAndId(newSuggestions, config.recordNamePath);
       
 36110       }
       
 36111     }
       
 36112     // Update suggestions only when the query has resolved, so as to keep
       
 36113     // the previous results in the UI.
       
 36114     setSuggestions(newSuggestions);
       
 36115   }, [searchResults, searchHasResolved]);
       
 36116   return suggestions;
       
 36117 }
       
 36118 function SuggestionList({
       
 36119   entityForSuggestions,
       
 36120   onSelect
       
 36121 }) {
       
 36122   const composite = add_custom_template_modal_content_useCompositeStore({
       
 36123     orientation: 'vertical'
       
 36124   });
       
 36125   const [search, setSearch, debouncedSearch] = (0,external_wp_compose_namespaceObject.useDebouncedInput)();
       
 36126   const suggestions = useSearchSuggestions(entityForSuggestions, debouncedSearch);
       
 36127   const {
       
 36128     labels
       
 36129   } = entityForSuggestions;
       
 36130   const [showSearchControl, setShowSearchControl] = (0,external_wp_element_namespaceObject.useState)(false);
       
 36131   if (!showSearchControl && suggestions?.length > 9) {
       
 36132     setShowSearchControl(true);
       
 36133   }
       
 36134   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 36135     children: [showSearchControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SearchControl, {
       
 36136       __nextHasNoMarginBottom: true,
       
 36137       onChange: setSearch,
       
 36138       value: search,
       
 36139       label: labels.search_items,
       
 36140       placeholder: labels.search_items
       
 36141     }), !!suggestions?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_custom_template_modal_content_Composite, {
       
 36142       store: composite,
       
 36143       role: "listbox",
       
 36144       className: "edit-site-custom-template-modal__suggestions_list",
       
 36145       "aria-label": (0,external_wp_i18n_namespaceObject.__)('Suggestions list'),
       
 36146       children: suggestions.map(suggestion => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SuggestionListItem, {
       
 36147         suggestion: suggestion,
       
 36148         search: debouncedSearch,
       
 36149         onSelect: onSelect,
       
 36150         entityForSuggestions: entityForSuggestions
       
 36151       }, suggestion.slug))
       
 36152     }), debouncedSearch && !suggestions?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36153       as: "p",
       
 36154       className: "edit-site-custom-template-modal__no-results",
       
 36155       children: labels.not_found
       
 36156     })]
       
 36157   });
       
 36158 }
       
 36159 function AddCustomTemplateModalContent({
       
 36160   onSelect,
       
 36161   entityForSuggestions
       
 36162 }) {
       
 36163   const [showSearchEntities, setShowSearchEntities] = (0,external_wp_element_namespaceObject.useState)(entityForSuggestions.hasGeneralTemplate);
       
 36164   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 36165     spacing: 4,
       
 36166     className: "edit-site-custom-template-modal__contents-wrapper",
       
 36167     alignment: "left",
       
 36168     children: [!showSearchEntities && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 36169       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36170         as: "p",
       
 36171         children: (0,external_wp_i18n_namespaceObject.__)('Select whether to create a single template for all items or a specific one.')
       
 36172       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 36173         className: "edit-site-custom-template-modal__contents",
       
 36174         gap: "4",
       
 36175         align: "initial",
       
 36176         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.FlexItem, {
       
 36177           isBlock: true,
       
 36178           as: external_wp_components_namespaceObject.Button,
       
 36179           onClick: () => {
       
 36180             const {
       
 36181               slug,
       
 36182               title,
       
 36183               description,
       
 36184               templatePrefix
       
 36185             } = entityForSuggestions.template;
       
 36186             onSelect({
       
 36187               slug,
       
 36188               title,
       
 36189               description,
       
 36190               templatePrefix
       
 36191             });
       
 36192           },
       
 36193           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36194             as: "span",
       
 36195             weight: 500,
       
 36196             lineHeight: 1.53846153846 // 20px
       
 36197             ,
       
 36198             children: entityForSuggestions.labels.all_items
       
 36199           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36200             as: "span",
       
 36201             lineHeight: 1.53846153846 // 20px
       
 36202             ,
       
 36203             children:
       
 36204             // translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
       
 36205             (0,external_wp_i18n_namespaceObject.__)('For all items')
       
 36206           })]
       
 36207         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.FlexItem, {
       
 36208           isBlock: true,
       
 36209           as: external_wp_components_namespaceObject.Button,
       
 36210           onClick: () => {
       
 36211             setShowSearchEntities(true);
       
 36212           },
       
 36213           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36214             as: "span",
       
 36215             weight: 500,
       
 36216             lineHeight: 1.53846153846 // 20px
       
 36217             ,
       
 36218             children: entityForSuggestions.labels.singular_name
       
 36219           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36220             as: "span",
       
 36221             lineHeight: 1.53846153846 // 20px
       
 36222             ,
       
 36223             children:
       
 36224             // translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
       
 36225             (0,external_wp_i18n_namespaceObject.__)('For a specific item')
       
 36226           })]
       
 36227         })]
       
 36228       })]
       
 36229     }), showSearchEntities && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 36230       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36231         as: "p",
       
 36232         children: (0,external_wp_i18n_namespaceObject.__)('This template will be used only for the specific item chosen.')
       
 36233       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SuggestionList, {
       
 36234         entityForSuggestions: entityForSuggestions,
       
 36235         onSelect: onSelect
       
 36236       })]
       
 36237     })]
       
 36238   });
       
 36239 }
       
 36240 /* harmony default export */ const add_custom_template_modal_content = (AddCustomTemplateModalContent);
       
 36241 
       
 36242 ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs
       
 36243 /******************************************************************************
       
 36244 Copyright (c) Microsoft Corporation.
       
 36245 
       
 36246 Permission to use, copy, modify, and/or distribute this software for any
       
 36247 purpose with or without fee is hereby granted.
       
 36248 
       
 36249 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
       
 36250 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
       
 36251 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
       
 36252 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
       
 36253 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
       
 36254 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
       
 36255 PERFORMANCE OF THIS SOFTWARE.
       
 36256 ***************************************************************************** */
       
 36257 /* global Reflect, Promise, SuppressedError, Symbol */
       
 36258 
       
 36259 var extendStatics = function(d, b) {
       
 36260   extendStatics = Object.setPrototypeOf ||
       
 36261       ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
       
 36262       function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
       
 36263   return extendStatics(d, b);
       
 36264 };
       
 36265 
       
 36266 function __extends(d, b) {
       
 36267   if (typeof b !== "function" && b !== null)
       
 36268       throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
       
 36269   extendStatics(d, b);
       
 36270   function __() { this.constructor = d; }
       
 36271   d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
       
 36272 }
       
 36273 
       
 36274 var __assign = function() {
       
 36275   __assign = Object.assign || function __assign(t) {
       
 36276       for (var s, i = 1, n = arguments.length; i < n; i++) {
       
 36277           s = arguments[i];
       
 36278           for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
       
 36279       }
       
 36280       return t;
       
 36281   }
       
 36282   return __assign.apply(this, arguments);
       
 36283 }
       
 36284 
       
 36285 function __rest(s, e) {
       
 36286   var t = {};
       
 36287   for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
       
 36288       t[p] = s[p];
       
 36289   if (s != null && typeof Object.getOwnPropertySymbols === "function")
       
 36290       for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
       
 36291           if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
       
 36292               t[p[i]] = s[p[i]];
       
 36293       }
       
 36294   return t;
       
 36295 }
       
 36296 
       
 36297 function __decorate(decorators, target, key, desc) {
       
 36298   var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
       
 36299   if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
       
 36300   else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
       
 36301   return c > 3 && r && Object.defineProperty(target, key, r), r;
       
 36302 }
       
 36303 
       
 36304 function __param(paramIndex, decorator) {
       
 36305   return function (target, key) { decorator(target, key, paramIndex); }
       
 36306 }
       
 36307 
       
 36308 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
       
 36309   function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
       
 36310   var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
       
 36311   var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
       
 36312   var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
       
 36313   var _, done = false;
       
 36314   for (var i = decorators.length - 1; i >= 0; i--) {
       
 36315       var context = {};
       
 36316       for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
       
 36317       for (var p in contextIn.access) context.access[p] = contextIn.access[p];
       
 36318       context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
       
 36319       var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
       
 36320       if (kind === "accessor") {
       
 36321           if (result === void 0) continue;
       
 36322           if (result === null || typeof result !== "object") throw new TypeError("Object expected");
       
 36323           if (_ = accept(result.get)) descriptor.get = _;
       
 36324           if (_ = accept(result.set)) descriptor.set = _;
       
 36325           if (_ = accept(result.init)) initializers.unshift(_);
       
 36326       }
       
 36327       else if (_ = accept(result)) {
       
 36328           if (kind === "field") initializers.unshift(_);
       
 36329           else descriptor[key] = _;
       
 36330       }
       
 36331   }
       
 36332   if (target) Object.defineProperty(target, contextIn.name, descriptor);
       
 36333   done = true;
       
 36334 };
       
 36335 
       
 36336 function __runInitializers(thisArg, initializers, value) {
       
 36337   var useValue = arguments.length > 2;
       
 36338   for (var i = 0; i < initializers.length; i++) {
       
 36339       value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
       
 36340   }
       
 36341   return useValue ? value : void 0;
       
 36342 };
       
 36343 
       
 36344 function __propKey(x) {
       
 36345   return typeof x === "symbol" ? x : "".concat(x);
       
 36346 };
       
 36347 
       
 36348 function __setFunctionName(f, name, prefix) {
       
 36349   if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
       
 36350   return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
       
 36351 };
       
 36352 
       
 36353 function __metadata(metadataKey, metadataValue) {
       
 36354   if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
       
 36355 }
       
 36356 
       
 36357 function __awaiter(thisArg, _arguments, P, generator) {
       
 36358   function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
       
 36359   return new (P || (P = Promise))(function (resolve, reject) {
       
 36360       function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
       
 36361       function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
       
 36362       function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
       
 36363       step((generator = generator.apply(thisArg, _arguments || [])).next());
       
 36364   });
       
 36365 }
       
 36366 
       
 36367 function __generator(thisArg, body) {
       
 36368   var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
       
 36369   return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
       
 36370   function verb(n) { return function (v) { return step([n, v]); }; }
       
 36371   function step(op) {
       
 36372       if (f) throw new TypeError("Generator is already executing.");
       
 36373       while (g && (g = 0, op[0] && (_ = 0)), _) try {
       
 36374           if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
       
 36375           if (y = 0, t) op = [op[0] & 2, t.value];
       
 36376           switch (op[0]) {
       
 36377               case 0: case 1: t = op; break;
       
 36378               case 4: _.label++; return { value: op[1], done: false };
       
 36379               case 5: _.label++; y = op[1]; op = [0]; continue;
       
 36380               case 7: op = _.ops.pop(); _.trys.pop(); continue;
       
 36381               default:
       
 36382                   if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
       
 36383                   if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
       
 36384                   if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
       
 36385                   if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
       
 36386                   if (t[2]) _.ops.pop();
       
 36387                   _.trys.pop(); continue;
       
 36388           }
       
 36389           op = body.call(thisArg, _);
       
 36390       } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
       
 36391       if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
       
 36392   }
       
 36393 }
       
 36394 
       
 36395 var __createBinding = Object.create ? (function(o, m, k, k2) {
       
 36396   if (k2 === undefined) k2 = k;
       
 36397   var desc = Object.getOwnPropertyDescriptor(m, k);
       
 36398   if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
       
 36399       desc = { enumerable: true, get: function() { return m[k]; } };
       
 36400   }
       
 36401   Object.defineProperty(o, k2, desc);
       
 36402 }) : (function(o, m, k, k2) {
       
 36403   if (k2 === undefined) k2 = k;
       
 36404   o[k2] = m[k];
       
 36405 });
       
 36406 
       
 36407 function __exportStar(m, o) {
       
 36408   for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
       
 36409 }
       
 36410 
       
 36411 function __values(o) {
       
 36412   var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
       
 36413   if (m) return m.call(o);
       
 36414   if (o && typeof o.length === "number") return {
       
 36415       next: function () {
       
 36416           if (o && i >= o.length) o = void 0;
       
 36417           return { value: o && o[i++], done: !o };
       
 36418       }
       
 36419   };
       
 36420   throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
       
 36421 }
       
 36422 
       
 36423 function __read(o, n) {
       
 36424   var m = typeof Symbol === "function" && o[Symbol.iterator];
       
 36425   if (!m) return o;
       
 36426   var i = m.call(o), r, ar = [], e;
       
 36427   try {
       
 36428       while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
       
 36429   }
       
 36430   catch (error) { e = { error: error }; }
       
 36431   finally {
       
 36432       try {
       
 36433           if (r && !r.done && (m = i["return"])) m.call(i);
       
 36434       }
       
 36435       finally { if (e) throw e.error; }
       
 36436   }
       
 36437   return ar;
       
 36438 }
       
 36439 
       
 36440 /** @deprecated */
       
 36441 function __spread() {
       
 36442   for (var ar = [], i = 0; i < arguments.length; i++)
       
 36443       ar = ar.concat(__read(arguments[i]));
       
 36444   return ar;
       
 36445 }
       
 36446 
       
 36447 /** @deprecated */
       
 36448 function __spreadArrays() {
       
 36449   for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
       
 36450   for (var r = Array(s), k = 0, i = 0; i < il; i++)
       
 36451       for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
       
 36452           r[k] = a[j];
       
 36453   return r;
       
 36454 }
       
 36455 
       
 36456 function __spreadArray(to, from, pack) {
       
 36457   if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
       
 36458       if (ar || !(i in from)) {
       
 36459           if (!ar) ar = Array.prototype.slice.call(from, 0, i);
       
 36460           ar[i] = from[i];
       
 36461       }
       
 36462   }
       
 36463   return to.concat(ar || Array.prototype.slice.call(from));
       
 36464 }
       
 36465 
       
 36466 function __await(v) {
       
 36467   return this instanceof __await ? (this.v = v, this) : new __await(v);
       
 36468 }
       
 36469 
       
 36470 function __asyncGenerator(thisArg, _arguments, generator) {
       
 36471   if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
       
 36472   var g = generator.apply(thisArg, _arguments || []), i, q = [];
       
 36473   return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
       
 36474   function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
       
 36475   function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
       
 36476   function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
       
 36477   function fulfill(value) { resume("next", value); }
       
 36478   function reject(value) { resume("throw", value); }
       
 36479   function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
       
 36480 }
       
 36481 
       
 36482 function __asyncDelegator(o) {
       
 36483   var i, p;
       
 36484   return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
       
 36485   function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
       
 36486 }
       
 36487 
       
 36488 function __asyncValues(o) {
       
 36489   if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
       
 36490   var m = o[Symbol.asyncIterator], i;
       
 36491   return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
       
 36492   function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
       
 36493   function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
       
 36494 }
       
 36495 
       
 36496 function __makeTemplateObject(cooked, raw) {
       
 36497   if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
       
 36498   return cooked;
       
 36499 };
       
 36500 
       
 36501 var __setModuleDefault = Object.create ? (function(o, v) {
       
 36502   Object.defineProperty(o, "default", { enumerable: true, value: v });
       
 36503 }) : function(o, v) {
       
 36504   o["default"] = v;
       
 36505 };
       
 36506 
       
 36507 function __importStar(mod) {
       
 36508   if (mod && mod.__esModule) return mod;
       
 36509   var result = {};
       
 36510   if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
       
 36511   __setModuleDefault(result, mod);
       
 36512   return result;
       
 36513 }
       
 36514 
       
 36515 function __importDefault(mod) {
       
 36516   return (mod && mod.__esModule) ? mod : { default: mod };
       
 36517 }
       
 36518 
       
 36519 function __classPrivateFieldGet(receiver, state, kind, f) {
       
 36520   if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
       
 36521   if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
       
 36522   return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
       
 36523 }
       
 36524 
       
 36525 function __classPrivateFieldSet(receiver, state, value, kind, f) {
       
 36526   if (kind === "m") throw new TypeError("Private method is not writable");
       
 36527   if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
       
 36528   if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
       
 36529   return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
       
 36530 }
       
 36531 
       
 36532 function __classPrivateFieldIn(state, receiver) {
       
 36533   if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
       
 36534   return typeof state === "function" ? receiver === state : state.has(receiver);
       
 36535 }
       
 36536 
       
 36537 function __addDisposableResource(env, value, async) {
       
 36538   if (value !== null && value !== void 0) {
       
 36539     if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
       
 36540     var dispose;
       
 36541     if (async) {
       
 36542         if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
       
 36543         dispose = value[Symbol.asyncDispose];
       
 36544     }
       
 36545     if (dispose === void 0) {
       
 36546         if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
       
 36547         dispose = value[Symbol.dispose];
       
 36548     }
       
 36549     if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
       
 36550     env.stack.push({ value: value, dispose: dispose, async: async });
       
 36551   }
       
 36552   else if (async) {
       
 36553     env.stack.push({ async: true });
       
 36554   }
       
 36555   return value;
       
 36556 }
       
 36557 
       
 36558 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
       
 36559   var e = new Error(message);
       
 36560   return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
       
 36561 };
       
 36562 
       
 36563 function __disposeResources(env) {
       
 36564   function fail(e) {
       
 36565     env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
       
 36566     env.hasError = true;
       
 36567   }
       
 36568   function next() {
       
 36569     while (env.stack.length) {
       
 36570       var rec = env.stack.pop();
       
 36571       try {
       
 36572         var result = rec.dispose && rec.dispose.call(rec.value);
       
 36573         if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
       
 36574       }
       
 36575       catch (e) {
       
 36576           fail(e);
       
 36577       }
       
 36578     }
       
 36579     if (env.hasError) throw env.error;
       
 36580   }
       
 36581   return next();
       
 36582 }
       
 36583 
       
 36584 /* harmony default export */ const tslib_es6 = ({
       
 36585   __extends,
       
 36586   __assign,
       
 36587   __rest,
       
 36588   __decorate,
       
 36589   __param,
       
 36590   __metadata,
       
 36591   __awaiter,
       
 36592   __generator,
       
 36593   __createBinding,
       
 36594   __exportStar,
       
 36595   __values,
       
 36596   __read,
       
 36597   __spread,
       
 36598   __spreadArrays,
       
 36599   __spreadArray,
       
 36600   __await,
       
 36601   __asyncGenerator,
       
 36602   __asyncDelegator,
       
 36603   __asyncValues,
       
 36604   __makeTemplateObject,
       
 36605   __importStar,
       
 36606   __importDefault,
       
 36607   __classPrivateFieldGet,
       
 36608   __classPrivateFieldSet,
       
 36609   __classPrivateFieldIn,
       
 36610   __addDisposableResource,
       
 36611   __disposeResources,
       
 36612 });
       
 36613 
       
 36614 ;// CONCATENATED MODULE: ./node_modules/lower-case/dist.es2015/index.js
       
 36615 /**
       
 36616  * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
       
 36617  */
       
 36618 var SUPPORTED_LOCALE = {
       
 36619     tr: {
       
 36620         regexp: /\u0130|\u0049|\u0049\u0307/g,
       
 36621         map: {
       
 36622             İ: "\u0069",
       
 36623             I: "\u0131",
       
 36624             İ: "\u0069",
       
 36625         },
 12242     },
 36626     },
 12243     className: showIconLabels && 'show-icon-labels',
 36627     az: {
 12244     secondarySidebar: secondarySidebar(),
 36628         regexp: /\u0130/g,
 12245     sidebar: sidebarIsOpened && (0,external_wp_element_namespaceObject.createElement)(complementary_area.Slot, {
 36629         map: {
 12246       scope: "core/edit-site"
 36630             İ: "\u0069",
 12247     }),
 36631             I: "\u0131",
 12248     drawer: (0,external_wp_element_namespaceObject.createElement)(navigation_sidebar.Slot, null),
 36632             İ: "\u0069",
 12249     header: (0,external_wp_element_namespaceObject.createElement)(Header, {
 36633         },
 12250       openEntitiesSavedStates: openEntitiesSavedStates,
 36634     },
 12251       showIconLabels: showIconLabels
 36635     lt: {
 12252     }),
 36636         regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
 12253     notices: (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorSnackbars, null),
 36637         map: {
 12254     content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorNotices, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockStyles.Slot, {
 36638             I: "\u0069\u0307",
 12255       scope: "core/block-inspector"
 36639             J: "\u006A\u0307",
 12256     }), editorMode === 'visual' && template && (0,external_wp_element_namespaceObject.createElement)(BlockEditor, {
 36640             Į: "\u012F\u0307",
 12257       setIsInserterOpen: setIsInserterOpened
 36641             Ì: "\u0069\u0307\u0300",
 12258     }), editorMode === 'text' && template && (0,external_wp_element_namespaceObject.createElement)(CodeEditor, null), templateResolved && !template && (settings === null || settings === void 0 ? void 0 : settings.siteUrl) && entityId && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, {
 36642             Í: "\u0069\u0307\u0301",
 12259       status: "warning",
 36643             Ĩ: "\u0069\u0307\u0303",
 12260       isDismissible: false
 36644         },
 12261     }, (0,external_wp_i18n_namespaceObject.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, {
 36645     },
 12262       openEntitiesSavedStates: openEntitiesSavedStates
 36646 };
 12263     })),
 36647 /**
 12264     actions: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isEntitiesSavedStatesOpen ? (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EntitiesSavedStates, {
 36648  * Localized lower case.
 12265       close: closeEntitiesSavedStates
 36649  */
 12266     }) : (0,external_wp_element_namespaceObject.createElement)("div", {
 36650 function localeLowerCase(str, locale) {
 12267       className: "edit-site-editor__toggle-save-panel"
 36651     var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
 12268     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
 36652     if (lang)
 12269       variant: "secondary",
 36653         return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
 12270       className: "edit-site-editor__toggle-save-panel-button",
 36654     return lowerCase(str);
 12271       onClick: openEntitiesSavedStates,
 36655 }
 12272       "aria-expanded": false
 36656 /**
 12273     }, (0,external_wp_i18n_namespaceObject.__)('Open save panel')))),
 36657  * Lower case as a function.
 12274     footer: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockBreadcrumb, {
 36658  */
 12275       rootLabelText: (0,external_wp_i18n_namespaceObject.__)('Template')
 36659 function lowerCase(str) {
 12276     }),
 36660     return str.toLowerCase();
 12277     shortcuts: {
 36661 }
 12278       previous: previousShortcut,
 36662 
 12279       next: nextShortcut
 36663 ;// CONCATENATED MODULE: ./node_modules/no-case/dist.es2015/index.js
       
 36664 
       
 36665 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
       
 36666 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
       
 36667 // Remove all non-word characters.
       
 36668 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
       
 36669 /**
       
 36670  * Normalize the string into something other libraries can manipulate easier.
       
 36671  */
       
 36672 function noCase(input, options) {
       
 36673     if (options === void 0) { options = {}; }
       
 36674     var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
       
 36675     var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
       
 36676     var start = 0;
       
 36677     var end = result.length;
       
 36678     // Trim the delimiter from around the output string.
       
 36679     while (result.charAt(start) === "\0")
       
 36680         start++;
       
 36681     while (result.charAt(end - 1) === "\0")
       
 36682         end--;
       
 36683     // Transform each token independently.
       
 36684     return result.slice(start, end).split("\0").map(transform).join(delimiter);
       
 36685 }
       
 36686 /**
       
 36687  * Replace `re` in the input string with the replacement value.
       
 36688  */
       
 36689 function replace(input, re, value) {
       
 36690     if (re instanceof RegExp)
       
 36691         return input.replace(re, value);
       
 36692     return re.reduce(function (input, re) { return input.replace(re, value); }, input);
       
 36693 }
       
 36694 
       
 36695 ;// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js
       
 36696 
       
 36697 
       
 36698 function dotCase(input, options) {
       
 36699     if (options === void 0) { options = {}; }
       
 36700     return noCase(input, __assign({ delimiter: "." }, options));
       
 36701 }
       
 36702 
       
 36703 ;// CONCATENATED MODULE: ./node_modules/param-case/dist.es2015/index.js
       
 36704 
       
 36705 
       
 36706 function paramCase(input, options) {
       
 36707     if (options === void 0) { options = {}; }
       
 36708     return dotCase(input, __assign({ delimiter: "-" }, options));
       
 36709 }
       
 36710 
       
 36711 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/add-custom-generic-template-modal-content.js
       
 36712 /**
       
 36713  * External dependencies
       
 36714  */
       
 36715 
       
 36716 
       
 36717 /**
       
 36718  * WordPress dependencies
       
 36719  */
       
 36720 
       
 36721 
       
 36722 
       
 36723 
       
 36724 
       
 36725 function AddCustomGenericTemplateModalContent({
       
 36726   onClose,
       
 36727   createTemplate
       
 36728 }) {
       
 36729   const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)('');
       
 36730   const defaultTitle = (0,external_wp_i18n_namespaceObject.__)('Custom Template');
       
 36731   const [isBusy, setIsBusy] = (0,external_wp_element_namespaceObject.useState)(false);
       
 36732   async function onCreateTemplate(event) {
       
 36733     event.preventDefault();
       
 36734     if (isBusy) {
       
 36735       return;
 12280     }
 36736     }
 12281   }), (0,external_wp_element_namespaceObject.createElement)(WelcomeGuide, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover.Slot, null))))))));
 36737     setIsBusy(true);
 12282 }
 36738     try {
 12283 
 36739       await createTemplate({
 12284 /* harmony default export */ var editor = (Editor);
 36740         slug: 'wp-custom-template-' + paramCase(title || defaultTitle),
 12285 
 36741         title: title || defaultTitle
 12286 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/use-register-shortcuts.js
 36742       }, false);
       
 36743     } finally {
       
 36744       setIsBusy(false);
       
 36745     }
       
 36746   }
       
 36747   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
       
 36748     onSubmit: onCreateTemplate,
       
 36749     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 36750       spacing: 6,
       
 36751       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
       
 36752         __next40pxDefaultSize: true,
       
 36753         __nextHasNoMarginBottom: true,
       
 36754         label: (0,external_wp_i18n_namespaceObject.__)('Name'),
       
 36755         value: title,
       
 36756         onChange: setTitle,
       
 36757         placeholder: defaultTitle,
       
 36758         disabled: isBusy,
       
 36759         help: (0,external_wp_i18n_namespaceObject.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')
       
 36760       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 36761         className: "edit-site-custom-generic-template__modal-actions",
       
 36762         justify: "right",
       
 36763         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 36764           __next40pxDefaultSize: true,
       
 36765           variant: "tertiary",
       
 36766           onClick: () => {
       
 36767             onClose();
       
 36768           },
       
 36769           children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
       
 36770         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 36771           __next40pxDefaultSize: true,
       
 36772           variant: "primary",
       
 36773           type: "submit",
       
 36774           isBusy: isBusy,
       
 36775           "aria-disabled": isBusy,
       
 36776           children: (0,external_wp_i18n_namespaceObject.__)('Create')
       
 36777         })]
       
 36778       })]
       
 36779     })
       
 36780   });
       
 36781 }
       
 36782 /* harmony default export */ const add_custom_generic_template_modal_content = (AddCustomGenericTemplateModalContent);
       
 36783 
       
 36784 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/index.js
       
 36785 /**
       
 36786  * External dependencies
       
 36787  */
       
 36788 
       
 36789 
 12287 /**
 36790 /**
 12288  * WordPress dependencies
 36791  * WordPress dependencies
 12289  */
 36792  */
 12290 
 36793 
 12291 
 36794 
 12292 
 36795 
 12293 
 36796 
 12294 function useRegisterShortcuts() {
       
 12295   const {
       
 12296     registerShortcut
       
 12297   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
       
 12298   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 12299     registerShortcut({
       
 12300       name: 'core/edit-site/next-region',
       
 12301       category: 'global',
       
 12302       description: (0,external_wp_i18n_namespaceObject.__)('Navigate to the next part of the editor.'),
       
 12303       keyCombination: {
       
 12304         modifier: 'ctrl',
       
 12305         character: '`'
       
 12306       },
       
 12307       aliases: [{
       
 12308         modifier: 'access',
       
 12309         character: 'n'
       
 12310       }]
       
 12311     });
       
 12312     registerShortcut({
       
 12313       name: 'core/edit-site/previous-region',
       
 12314       category: 'global',
       
 12315       description: (0,external_wp_i18n_namespaceObject.__)('Navigate to the previous part of the editor.'),
       
 12316       keyCombination: {
       
 12317         modifier: 'ctrlShift',
       
 12318         character: '`'
       
 12319       },
       
 12320       aliases: [{
       
 12321         modifier: 'access',
       
 12322         character: 'p'
       
 12323       }]
       
 12324     });
       
 12325   }, []);
       
 12326 }
       
 12327 
       
 12328 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post.js
       
 12329 
       
 12330 
       
 12331 /**
       
 12332  * WordPress dependencies
       
 12333  */
       
 12334 
       
 12335 const post = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12336   xmlns: "http://www.w3.org/2000/svg",
       
 12337   viewBox: "0 0 24 24"
       
 12338 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12339   d: "m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"
       
 12340 }));
       
 12341 /* harmony default export */ var library_post = (post);
       
 12342 
       
 12343 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
       
 12344 
       
 12345 
       
 12346 /**
       
 12347  * WordPress dependencies
       
 12348  */
       
 12349 
       
 12350 const page = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12351   xmlns: "http://www.w3.org/2000/svg",
       
 12352   viewBox: "0 0 24 24"
       
 12353 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12354   d: "M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"
       
 12355 }));
       
 12356 /* harmony default export */ var library_page = (page);
       
 12357 
       
 12358 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive.js
       
 12359 
       
 12360 
       
 12361 /**
       
 12362  * WordPress dependencies
       
 12363  */
       
 12364 
       
 12365 const archive = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12366   viewBox: "0 0 24 24",
       
 12367   xmlns: "http://www.w3.org/2000/svg"
       
 12368 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12369   d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"
       
 12370 }));
       
 12371 /* harmony default export */ var library_archive = (archive);
       
 12372 
       
 12373 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
       
 12374 
       
 12375 
       
 12376 /**
       
 12377  * WordPress dependencies
       
 12378  */
       
 12379 
       
 12380 const search = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12381   xmlns: "http://www.w3.org/2000/svg",
       
 12382   viewBox: "0 0 24 24"
       
 12383 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12384   d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"
       
 12385 }));
       
 12386 /* harmony default export */ var library_search = (search);
       
 12387 
       
 12388 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/not-found.js
       
 12389 
       
 12390 
       
 12391 /**
       
 12392  * WordPress dependencies
       
 12393  */
       
 12394 
       
 12395 const notFound = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12396   xmlns: "http://www.w3.org/2000/svg",
       
 12397   viewBox: "0 0 24 24"
       
 12398 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12399   d: "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"
       
 12400 }));
       
 12401 /* harmony default export */ var not_found = (notFound);
       
 12402 
       
 12403 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list.js
       
 12404 
       
 12405 
       
 12406 /**
       
 12407  * WordPress dependencies
       
 12408  */
       
 12409 
       
 12410 const list = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12411   viewBox: "0 0 24 24",
       
 12412   xmlns: "http://www.w3.org/2000/svg"
       
 12413 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12414   d: "M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"
       
 12415 }));
       
 12416 /* harmony default export */ var library_list = (list);
       
 12417 
       
 12418 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/category.js
       
 12419 
       
 12420 
       
 12421 /**
       
 12422  * WordPress dependencies
       
 12423  */
       
 12424 
       
 12425 const category = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12426   viewBox: "0 0 24 24",
       
 12427   xmlns: "http://www.w3.org/2000/svg"
       
 12428 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12429   d: "M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",
       
 12430   fillRule: "evenodd",
       
 12431   clipRule: "evenodd"
       
 12432 }));
       
 12433 /* harmony default export */ var library_category = (category);
       
 12434 
       
 12435 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-author.js
       
 12436 
       
 12437 
       
 12438 /**
       
 12439  * WordPress dependencies
       
 12440  */
       
 12441 
       
 12442 const postAuthor = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12443   viewBox: "0 0 24 24",
       
 12444   xmlns: "http://www.w3.org/2000/svg"
       
 12445 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12446   d: "M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",
       
 12447   fillRule: "evenodd",
       
 12448   clipRule: "evenodd"
       
 12449 }));
       
 12450 /* harmony default export */ var post_author = (postAuthor);
       
 12451 
       
 12452 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-meta.js
       
 12453 
       
 12454 
       
 12455 /**
       
 12456  * WordPress dependencies
       
 12457  */
       
 12458 
       
 12459 const blockMeta = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12460   xmlns: "http://www.w3.org/2000/svg",
       
 12461   viewBox: "0 0 24 24"
       
 12462 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12463   fillRule: "evenodd",
       
 12464   d: "M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",
       
 12465   clipRule: "evenodd"
       
 12466 }));
       
 12467 /* harmony default export */ var block_meta = (blockMeta);
       
 12468 
       
 12469 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-date.js
       
 12470 
       
 12471 
       
 12472 /**
       
 12473  * WordPress dependencies
       
 12474  */
       
 12475 
       
 12476 const postDate = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12477   xmlns: "http://www.w3.org/2000/svg",
       
 12478   viewBox: "0 0 24 24"
       
 12479 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12480   d: "M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"
       
 12481 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12482   d: "M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"
       
 12483 }));
       
 12484 /* harmony default export */ var post_date = (postDate);
       
 12485 
       
 12486 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/tag.js
       
 12487 
       
 12488 
       
 12489 /**
       
 12490  * WordPress dependencies
       
 12491  */
       
 12492 
       
 12493 const tag = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12494   xmlns: "http://www.w3.org/2000/svg",
       
 12495   viewBox: "0 0 24 24"
       
 12496 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12497   d: "M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"
       
 12498 }));
       
 12499 /* harmony default export */ var library_tag = (tag);
       
 12500 
       
 12501 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js
       
 12502 
       
 12503 
       
 12504 /**
       
 12505  * WordPress dependencies
       
 12506  */
       
 12507 
       
 12508 const media = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 12509   xmlns: "http://www.w3.org/2000/svg",
       
 12510   viewBox: "0 0 24 24"
       
 12511 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 12512   d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"
       
 12513 }));
       
 12514 /* harmony default export */ var library_media = (media);
       
 12515 
       
 12516 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/new-template.js
       
 12517 
       
 12518 
       
 12519 /**
       
 12520  * External dependencies
       
 12521  */
       
 12522 
       
 12523 /**
       
 12524  * WordPress dependencies
       
 12525  */
       
 12526 
       
 12527 
       
 12528 
 36797 
 12529 
 36798 
 12530 
 36799 
 12531 
 36800 
 12532 
 36801 
 12534 /**
 36803 /**
 12535  * Internal dependencies
 36804  * Internal dependencies
 12536  */
 36805  */
 12537 
 36806 
 12538 
 36807 
 12539 
 36808 /**
 12540 const DEFAULT_TEMPLATE_SLUGS = ['front-page', 'single-post', 'page', 'index', 'archive', 'author', 'category', 'date', 'tag', 'taxonomy', 'search', '404'];
 36809  * Internal dependencies
       
 36810  */
       
 36811 
       
 36812 
       
 36813 
       
 36814 
       
 36815 
       
 36816 
       
 36817 
       
 36818 const {
       
 36819   useHistory: add_new_template_useHistory
       
 36820 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 36821 const DEFAULT_TEMPLATE_SLUGS = ['front-page', 'home', 'single', 'page', 'index', 'archive', 'author', 'category', 'date', 'tag', 'search', '404'];
 12541 const TEMPLATE_ICONS = {
 36822 const TEMPLATE_ICONS = {
 12542   'front-page': library_home,
 36823   'front-page': library_home,
 12543   'single-post': library_post,
 36824   home: library_verse,
       
 36825   single: library_pin,
 12544   page: library_page,
 36826   page: library_page,
 12545   archive: library_archive,
 36827   archive: library_archive,
 12546   search: library_search,
 36828   search: library_search,
 12547   404: not_found,
 36829   404: not_found,
 12548   index: library_list,
 36830   index: library_list,
 12549   category: library_category,
 36831   category: library_category,
 12550   author: post_author,
 36832   author: comment_author_avatar,
 12551   taxonomy: block_meta,
 36833   taxonomy: block_meta,
 12552   date: post_date,
 36834   date: library_calendar,
 12553   tag: library_tag,
 36835   tag: library_tag,
 12554   attachment: library_media
 36836   attachment: library_media
 12555 };
 36837 };
 12556 function NewTemplate(_ref) {
 36838 function TemplateListItem({
 12557   let {
 36839   title,
 12558     postType
 36840   direction,
 12559   } = _ref;
 36841   className,
 12560   const history = useHistory();
 36842   description,
 12561   const {
 36843   icon,
 12562     templates,
 36844   onClick,
 12563     defaultTemplateTypes
 36845   children
 12564   } = (0,external_wp_data_namespaceObject.useSelect)(select => ({
 36846 }) {
 12565     templates: select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', 'wp_template', {
 36847   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 12566       per_page: -1
 36848     className: className,
 12567     }),
 36849     onClick: onClick,
 12568     defaultTemplateTypes: select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplateTypes()
 36850     label: description,
 12569   }), []);
 36851     showTooltip: !!description,
       
 36852     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
       
 36853       as: "span",
       
 36854       spacing: 2,
       
 36855       align: "center",
       
 36856       justify: "center",
       
 36857       style: {
       
 36858         width: '100%'
       
 36859       },
       
 36860       direction: direction,
       
 36861       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 36862         className: "edit-site-add-new-template__template-icon",
       
 36863         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 36864           icon: icon
       
 36865         })
       
 36866       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 36867         className: "edit-site-add-new-template__template-name",
       
 36868         alignment: "center",
       
 36869         spacing: 0,
       
 36870         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 36871           align: "center",
       
 36872           weight: 500,
       
 36873           lineHeight: 1.53846153846 // 20px
       
 36874           ,
       
 36875           children: title
       
 36876         }), children]
       
 36877       })]
       
 36878     })
       
 36879   });
       
 36880 }
       
 36881 const modalContentMap = {
       
 36882   templatesList: 1,
       
 36883   customTemplate: 2,
       
 36884   customGenericTemplate: 3
       
 36885 };
       
 36886 function NewTemplateModal({
       
 36887   onClose
       
 36888 }) {
       
 36889   const [modalContent, setModalContent] = (0,external_wp_element_namespaceObject.useState)(modalContentMap.templatesList);
       
 36890   const [entityForSuggestions, setEntityForSuggestions] = (0,external_wp_element_namespaceObject.useState)({});
       
 36891   const [isSubmitting, setIsSubmitting] = (0,external_wp_element_namespaceObject.useState)(false);
       
 36892   const missingTemplates = useMissingTemplates(setEntityForSuggestions, () => setModalContent(modalContentMap.customTemplate));
       
 36893   const history = add_new_template_useHistory();
 12570   const {
 36894   const {
 12571     saveEntityRecord
 36895     saveEntityRecord
 12572   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
 36896   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
 12573   const {
 36897   const {
 12574     createErrorNotice
 36898     createErrorNotice,
       
 36899     createSuccessNotice
 12575   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 36900   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 12576   const {
 36901   const {
 12577     setTemplate
 36902     homeUrl
 12578   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
 36903   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 12579 
 36904     const {
 12580   async function createTemplate(_ref2) {
 36905       getUnstableBase // Site index.
 12581     let {
 36906     } = select(external_wp_coreData_namespaceObject.store);
 12582       slug
 36907     return {
 12583     } = _ref2;
 36908       homeUrl: getUnstableBase()?.home
 12584 
 36909     };
       
 36910   }, []);
       
 36911   const TEMPLATE_SHORT_DESCRIPTIONS = {
       
 36912     'front-page': homeUrl,
       
 36913     date: (0,external_wp_i18n_namespaceObject.sprintf)(
       
 36914     // translators: %s: The homepage url.
       
 36915     (0,external_wp_i18n_namespaceObject.__)('E.g. %s'), homeUrl + '/' + new Date().getFullYear())
       
 36916   };
       
 36917   async function createTemplate(template, isWPSuggestion = true) {
       
 36918     if (isSubmitting) {
       
 36919       return;
       
 36920     }
       
 36921     setIsSubmitting(true);
 12585     try {
 36922     try {
 12586       const {
 36923       const {
 12587         title,
 36924         title,
 12588         description
 36925         description,
 12589       } = (0,external_lodash_namespaceObject.find)(defaultTemplateTypes, {
       
 12590         slug
 36926         slug
 12591       });
 36927       } = template;
 12592       const template = await saveEntityRecord('postType', 'wp_template', {
 36928       const newTemplate = await saveEntityRecord('postType', TEMPLATE_POST_TYPE, {
 12593         excerpt: description,
 36929         description,
 12594         // Slugs need to be strings, so this is for template `404`
 36930         // Slugs need to be strings, so this is for template `404`
 12595         slug: slug.toString(),
 36931         slug: slug.toString(),
 12596         status: 'publish',
 36932         status: 'publish',
 12597         title
 36933         title,
       
 36934         // This adds a post meta field in template that is part of `is_custom` value calculation.
       
 36935         is_wp_suggestion: isWPSuggestion
 12598       }, {
 36936       }, {
 12599         throwOnError: true
 36937         throwOnError: true
 12600       }); // Set template before navigating away to avoid initial stale value.
 36938       });
 12601 
 36939 
 12602       setTemplate(template.id, template.slug); // Navigate to the created template editor.
 36940       // Navigate to the created template editor.
 12603 
       
 12604       history.push({
 36941       history.push({
 12605         postId: template.id,
 36942         postId: newTemplate.id,
 12606         postType: template.type
 36943         postType: TEMPLATE_POST_TYPE,
 12607       }); // TODO: Add a success notice?
 36944         canvas: 'edit'
       
 36945       });
       
 36946       createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
       
 36947       // translators: %s: Title of the created template e.g: "Category".
       
 36948       (0,external_wp_i18n_namespaceObject.__)('"%s" successfully created.'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(newTemplate.title?.rendered || title)), {
       
 36949         type: 'snackbar'
       
 36950       });
 12608     } catch (error) {
 36951     } catch (error) {
 12609       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while creating the template.');
 36952       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while creating the template.');
 12610       createErrorNotice(errorMessage, {
 36953       createErrorNotice(errorMessage, {
 12611         type: 'snackbar'
 36954         type: 'snackbar'
 12612       });
 36955       });
       
 36956     } finally {
       
 36957       setIsSubmitting(false);
 12613     }
 36958     }
 12614   }
 36959   }
 12615 
 36960   const onModalClose = () => {
 12616   const existingTemplateSlugs = (0,external_lodash_namespaceObject.map)(templates, 'slug');
 36961     onClose();
 12617   const missingTemplates = (0,external_lodash_namespaceObject.filter)(defaultTemplateTypes, template => (0,external_lodash_namespaceObject.includes)(DEFAULT_TEMPLATE_SLUGS, template.slug) && !(0,external_lodash_namespaceObject.includes)(existingTemplateSlugs, template.slug));
 36962     setModalContent(modalContentMap.templatesList);
 12618 
 36963   };
 12619   if (!missingTemplates.length) {
 36964   let modalTitle = (0,external_wp_i18n_namespaceObject.__)('Add template');
 12620     return null;
 36965   if (modalContent === modalContentMap.customTemplate) {
 12621   } // Update the sort order to match the DEFAULT_TEMPLATE_SLUGS order.
 36966     modalTitle = (0,external_wp_i18n_namespaceObject.sprintf)(
 12622 
 36967     // translators: %s: Name of the post type e.g: "Post".
 12623 
 36968     (0,external_wp_i18n_namespaceObject.__)('Add template: %s'), entityForSuggestions.labels.singular_name);
 12624   missingTemplates.sort((template1, template2) => {
 36969   } else if (modalContent === modalContentMap.customGenericTemplate) {
 12625     return DEFAULT_TEMPLATE_SLUGS.indexOf(template1.slug) - DEFAULT_TEMPLATE_SLUGS.indexOf(template2.slug);
 36970     modalTitle = (0,external_wp_i18n_namespaceObject.__)('Create custom template');
       
 36971   }
       
 36972   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Modal, {
       
 36973     title: modalTitle,
       
 36974     className: dist_clsx('edit-site-add-new-template__modal', {
       
 36975       'edit-site-add-new-template__modal_template_list': modalContent === modalContentMap.templatesList,
       
 36976       'edit-site-custom-template-modal': modalContent === modalContentMap.customTemplate
       
 36977     }),
       
 36978     onRequestClose: onModalClose,
       
 36979     overlayClassName: modalContent === modalContentMap.customGenericTemplate ? 'edit-site-custom-generic-template__modal' : undefined,
       
 36980     children: [modalContent === modalContentMap.templatesList && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalGrid, {
       
 36981       columns: 3,
       
 36982       gap: 4,
       
 36983       align: "flex-start",
       
 36984       justify: "center",
       
 36985       className: "edit-site-add-new-template__template-list__contents",
       
 36986       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
       
 36987         className: "edit-site-add-new-template__template-list__prompt",
       
 36988         children: (0,external_wp_i18n_namespaceObject.__)('Select what the new template should apply to:')
       
 36989       }), missingTemplates.map(template => {
       
 36990         const {
       
 36991           title,
       
 36992           slug,
       
 36993           onClick
       
 36994         } = template;
       
 36995         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplateListItem, {
       
 36996           title: title,
       
 36997           direction: "column",
       
 36998           className: "edit-site-add-new-template__template-button",
       
 36999           description: TEMPLATE_SHORT_DESCRIPTIONS[slug],
       
 37000           icon: TEMPLATE_ICONS[slug] || library_layout,
       
 37001           onClick: () => onClick ? onClick(template) : createTemplate(template)
       
 37002         }, slug);
       
 37003       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplateListItem, {
       
 37004         title: (0,external_wp_i18n_namespaceObject.__)('Custom template'),
       
 37005         direction: "row",
       
 37006         className: "edit-site-add-new-template__custom-template-button",
       
 37007         icon: edit,
       
 37008         onClick: () => setModalContent(modalContentMap.customGenericTemplate),
       
 37009         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 37010           lineHeight: 1.53846153846 // 20px
       
 37011           ,
       
 37012           children: (0,external_wp_i18n_namespaceObject.__)('A custom template can be manually applied to any post or page.')
       
 37013         })
       
 37014       })]
       
 37015     }), modalContent === modalContentMap.customTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_custom_template_modal_content, {
       
 37016       onSelect: createTemplate,
       
 37017       entityForSuggestions: entityForSuggestions
       
 37018     }), modalContent === modalContentMap.customGenericTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_custom_generic_template_modal_content, {
       
 37019       onClose: onModalClose,
       
 37020       createTemplate: createTemplate
       
 37021     })]
 12626   });
 37022   });
 12627   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, {
 37023 }
 12628     className: "edit-site-new-template-dropdown",
 37024 function NewTemplate() {
 12629     icon: null,
 37025   const [showModal, setShowModal] = (0,external_wp_element_namespaceObject.useState)(false);
 12630     text: postType.labels.add_new,
 37026   const {
 12631     label: postType.labels.add_new_item,
       
 12632     popoverProps: {
       
 12633       noArrow: false
       
 12634     },
       
 12635     toggleProps: {
       
 12636       variant: 'primary'
       
 12637     }
       
 12638   }, () => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.NavigableMenu, {
       
 12639     className: "edit-site-new-template-dropdown__popover"
       
 12640   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
       
 12641     label: postType.labels.add_new_item
       
 12642   }, (0,external_lodash_namespaceObject.map)(missingTemplates, _ref3 => {
       
 12643     let {
       
 12644       title,
       
 12645       description,
       
 12646       slug
       
 12647     } = _ref3;
       
 12648     return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
       
 12649       icon: TEMPLATE_ICONS[slug],
       
 12650       iconPosition: "left",
       
 12651       info: description,
       
 12652       key: slug,
       
 12653       onClick: () => {
       
 12654         createTemplate({
       
 12655           slug
       
 12656         }); // We will be navigated way so no need to close the dropdown.
       
 12657       }
       
 12658     }, title);
       
 12659   }))));
       
 12660 }
       
 12661 
       
 12662 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/new-template-part.js
       
 12663 
       
 12664 
       
 12665 /**
       
 12666  * External dependencies
       
 12667  */
       
 12668 
       
 12669 /**
       
 12670  * WordPress dependencies
       
 12671  */
       
 12672 
       
 12673 
       
 12674 
       
 12675 
       
 12676 
       
 12677 
       
 12678 
       
 12679 /**
       
 12680  * Internal dependencies
       
 12681  */
       
 12682 
       
 12683 
       
 12684 
       
 12685 function NewTemplatePart(_ref) {
       
 12686   let {
       
 12687     postType
 37027     postType
 12688   } = _ref;
 37028   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 12689   const history = useHistory();
 37029     const {
 12690   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
 37030       getPostType
 12691   const {
 37031     } = select(external_wp_coreData_namespaceObject.store);
 12692     createErrorNotice
 37032     return {
 12693   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 37033       postType: getPostType(TEMPLATE_POST_TYPE)
 12694   const {
 37034     };
 12695     saveEntityRecord
 37035   }, []);
 12696   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 12697 
       
 12698   async function createTemplatePart(_ref2) {
       
 12699     let {
       
 12700       title,
       
 12701       area
       
 12702     } = _ref2;
       
 12703 
       
 12704     if (!title) {
       
 12705       createErrorNotice((0,external_wp_i18n_namespaceObject.__)('Title is not defined.'), {
       
 12706         type: 'snackbar'
       
 12707       });
       
 12708       return;
       
 12709     }
       
 12710 
       
 12711     try {
       
 12712       // Currently template parts only allow latin chars.
       
 12713       // Fallback slug will receive suffix by default.
       
 12714       const cleanSlug = (0,external_lodash_namespaceObject.kebabCase)(title).replace(/[^\w-]+/g, '') || 'wp-custom-part';
       
 12715       const templatePart = await saveEntityRecord('postType', 'wp_template_part', {
       
 12716         slug: cleanSlug,
       
 12717         title,
       
 12718         content: '',
       
 12719         area
       
 12720       }, {
       
 12721         throwOnError: true
       
 12722       });
       
 12723       setIsModalOpen(false); // Navigate to the created template part editor.
       
 12724 
       
 12725       history.push({
       
 12726         postId: templatePart.id,
       
 12727         postType: templatePart.type
       
 12728       }); // TODO: Add a success notice?
       
 12729     } catch (error) {
       
 12730       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while creating the template part.');
       
 12731       createErrorNotice(errorMessage, {
       
 12732         type: 'snackbar'
       
 12733       });
       
 12734       setIsModalOpen(false);
       
 12735     }
       
 12736   }
       
 12737 
       
 12738   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 12739     variant: "primary",
       
 12740     onClick: () => {
       
 12741       setIsModalOpen(true);
       
 12742     }
       
 12743   }, postType.labels.add_new), isModalOpen && (0,external_wp_element_namespaceObject.createElement)(CreateTemplatePartModal, {
       
 12744     closeModal: () => setIsModalOpen(false),
       
 12745     onCreate: createTemplatePart
       
 12746   }));
       
 12747 }
       
 12748 
       
 12749 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/index.js
       
 12750 
       
 12751 
       
 12752 /**
       
 12753  * WordPress dependencies
       
 12754  */
       
 12755 
       
 12756 
       
 12757 /**
       
 12758  * Internal dependencies
       
 12759  */
       
 12760 
       
 12761 
       
 12762 
       
 12763 function AddNewTemplate(_ref) {
       
 12764   let {
       
 12765     templateType = 'wp_template'
       
 12766   } = _ref;
       
 12767   const postType = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getPostType(templateType), [templateType]);
       
 12768 
       
 12769   if (!postType) {
 37036   if (!postType) {
 12770     return null;
 37037     return null;
 12771   }
 37038   }
 12772 
 37039   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 12773   if (templateType === 'wp_template') {
 37040     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 12774     return (0,external_wp_element_namespaceObject.createElement)(NewTemplate, {
 37041       variant: "primary",
 12775       postType: postType
 37042       onClick: () => setShowModal(true),
       
 37043       label: postType.labels.add_new_item,
       
 37044       __next40pxDefaultSize: true,
       
 37045       children: postType.labels.add_new_item
       
 37046     }), showModal && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NewTemplateModal, {
       
 37047       onClose: () => setShowModal(false)
       
 37048     })]
       
 37049   });
       
 37050 }
       
 37051 function useMissingTemplates(setEntityForSuggestions, onClick) {
       
 37052   const existingTemplates = useExistingTemplates();
       
 37053   const defaultTemplateTypes = useDefaultTemplateTypes();
       
 37054   const existingTemplateSlugs = (existingTemplates || []).map(({
       
 37055     slug
       
 37056   }) => slug);
       
 37057   const missingDefaultTemplates = (defaultTemplateTypes || []).filter(template => DEFAULT_TEMPLATE_SLUGS.includes(template.slug) && !existingTemplateSlugs.includes(template.slug));
       
 37058   const onClickMenuItem = _entityForSuggestions => {
       
 37059     onClick?.();
       
 37060     setEntityForSuggestions(_entityForSuggestions);
       
 37061   };
       
 37062   // We need to replace existing default template types with
       
 37063   // the create specific template functionality. The original
       
 37064   // info (title, description, etc.) is preserved in the
       
 37065   // used hooks.
       
 37066   const enhancedMissingDefaultTemplateTypes = [...missingDefaultTemplates];
       
 37067   const {
       
 37068     defaultTaxonomiesMenuItems,
       
 37069     taxonomiesMenuItems
       
 37070   } = useTaxonomiesMenuItems(onClickMenuItem);
       
 37071   const {
       
 37072     defaultPostTypesMenuItems,
       
 37073     postTypesMenuItems
       
 37074   } = usePostTypeMenuItems(onClickMenuItem);
       
 37075   const authorMenuItem = useAuthorMenuItem(onClickMenuItem);
       
 37076   [...defaultTaxonomiesMenuItems, ...defaultPostTypesMenuItems, authorMenuItem].forEach(menuItem => {
       
 37077     if (!menuItem) {
       
 37078       return;
       
 37079     }
       
 37080     const matchIndex = enhancedMissingDefaultTemplateTypes.findIndex(template => template.slug === menuItem.slug);
       
 37081     // Some default template types might have been filtered above from
       
 37082     // `missingDefaultTemplates` because they only check for the general
       
 37083     // template. So here we either replace or append the item, augmented
       
 37084     // with the check if it has available specific item to create a
       
 37085     // template for.
       
 37086     if (matchIndex > -1) {
       
 37087       enhancedMissingDefaultTemplateTypes[matchIndex] = menuItem;
       
 37088     } else {
       
 37089       enhancedMissingDefaultTemplateTypes.push(menuItem);
       
 37090     }
       
 37091   });
       
 37092   // Update the sort order to match the DEFAULT_TEMPLATE_SLUGS order.
       
 37093   enhancedMissingDefaultTemplateTypes?.sort((template1, template2) => {
       
 37094     return DEFAULT_TEMPLATE_SLUGS.indexOf(template1.slug) - DEFAULT_TEMPLATE_SLUGS.indexOf(template2.slug);
       
 37095   });
       
 37096   const missingTemplates = [...enhancedMissingDefaultTemplateTypes, ...usePostTypeArchiveMenuItems(), ...postTypesMenuItems, ...taxonomiesMenuItems];
       
 37097   return missingTemplates;
       
 37098 }
       
 37099 /* harmony default export */ const add_new_template = ((0,external_wp_element_namespaceObject.memo)(NewTemplate));
       
 37100 
       
 37101 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-templates/index.js
       
 37102 /**
       
 37103  * External dependencies
       
 37104  */
       
 37105 
       
 37106 
       
 37107 /**
       
 37108  * WordPress dependencies
       
 37109  */
       
 37110 
       
 37111 
       
 37112 
       
 37113 
       
 37114 
       
 37115 
       
 37116 
       
 37117 
       
 37118 
       
 37119 
       
 37120 
       
 37121 /**
       
 37122  * Internal dependencies
       
 37123  */
       
 37124 
       
 37125 
       
 37126 
       
 37127 
       
 37128 
       
 37129 
       
 37130 
       
 37131 
       
 37132 
       
 37133 
       
 37134 
       
 37135 
       
 37136 const {
       
 37137   usePostActions: page_templates_usePostActions
       
 37138 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 37139 const {
       
 37140   ExperimentalBlockEditorProvider: page_templates_ExperimentalBlockEditorProvider,
       
 37141   useGlobalStyle: page_templates_useGlobalStyle
       
 37142 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 37143 const {
       
 37144   useHistory: page_templates_useHistory,
       
 37145   useLocation: page_templates_useLocation
       
 37146 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 37147 const page_templates_EMPTY_ARRAY = [];
       
 37148 const page_templates_defaultConfigPerViewType = {
       
 37149   [LAYOUT_TABLE]: {
       
 37150     primaryField: 'title'
       
 37151   },
       
 37152   [LAYOUT_GRID]: {
       
 37153     mediaField: 'preview',
       
 37154     primaryField: 'title',
       
 37155     columnFields: ['description']
       
 37156   },
       
 37157   [LAYOUT_LIST]: {
       
 37158     primaryField: 'title',
       
 37159     mediaField: 'preview'
       
 37160   }
       
 37161 };
       
 37162 const page_templates_DEFAULT_VIEW = {
       
 37163   type: LAYOUT_GRID,
       
 37164   search: '',
       
 37165   page: 1,
       
 37166   perPage: 20,
       
 37167   sort: {
       
 37168     field: 'title',
       
 37169     direction: 'asc'
       
 37170   },
       
 37171   // All fields are visible by default, so it's
       
 37172   // better to keep track of the hidden ones.
       
 37173   hiddenFields: ['preview'],
       
 37174   layout: page_templates_defaultConfigPerViewType[LAYOUT_GRID],
       
 37175   filters: []
       
 37176 };
       
 37177 function page_templates_Title({
       
 37178   item,
       
 37179   viewType
       
 37180 }) {
       
 37181   if (viewType === LAYOUT_LIST) {
       
 37182     return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title?.rendered) || (0,external_wp_i18n_namespaceObject.__)('(no title)');
       
 37183   }
       
 37184   const linkProps = {
       
 37185     params: {
       
 37186       postId: item.id,
       
 37187       postType: item.type,
       
 37188       canvas: 'edit'
       
 37189     }
       
 37190   };
       
 37191   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Link, {
       
 37192     ...linkProps,
       
 37193     children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title?.rendered) || (0,external_wp_i18n_namespaceObject.__)('(no title)')
       
 37194   });
       
 37195 }
       
 37196 function AuthorField({
       
 37197   item,
       
 37198   viewType
       
 37199 }) {
       
 37200   const [isImageLoaded, setIsImageLoaded] = (0,external_wp_element_namespaceObject.useState)(false);
       
 37201   const {
       
 37202     text,
       
 37203     icon,
       
 37204     imageUrl
       
 37205   } = useAddedBy(item.type, item.id);
       
 37206   const withIcon = viewType !== LAYOUT_LIST;
       
 37207   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 37208     alignment: "left",
       
 37209     spacing: 1,
       
 37210     children: [withIcon && imageUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 37211       className: dist_clsx('page-templates-author-field__avatar', {
       
 37212         'is-loaded': isImageLoaded
       
 37213       }),
       
 37214       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
       
 37215         onLoad: () => setIsImageLoaded(true),
       
 37216         alt: "",
       
 37217         src: imageUrl
       
 37218       })
       
 37219     }), withIcon && !imageUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 37220       className: "page-templates-author-field__icon",
       
 37221       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 37222         icon: icon
       
 37223       })
       
 37224     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 37225       className: "page-templates-author-field__name",
       
 37226       children: text
       
 37227     })]
       
 37228   });
       
 37229 }
       
 37230 function page_templates_Preview({
       
 37231   item,
       
 37232   viewType
       
 37233 }) {
       
 37234   const settings = usePatternSettings();
       
 37235   const [backgroundColor = 'white'] = page_templates_useGlobalStyle('color.background');
       
 37236   const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 37237     return (0,external_wp_blocks_namespaceObject.parse)(item.content.raw);
       
 37238   }, [item.content.raw]);
       
 37239   const {
       
 37240     onClick
       
 37241   } = useLink({
       
 37242     postId: item.id,
       
 37243     postType: item.type,
       
 37244     canvas: 'edit'
       
 37245   });
       
 37246   const isEmpty = !blocks?.length;
       
 37247   // Wrap everything in a block editor provider to ensure 'styles' that are needed
       
 37248   // for the previews are synced between the site editor store and the block editor store.
       
 37249   // Additionally we need to have the `__experimentalBlockPatterns` setting in order to
       
 37250   // render patterns inside the previews.
       
 37251   // TODO: Same approach is used in the patterns list and it becomes obvious that some of
       
 37252   // the block editor settings are needed in context where we don't have the block editor.
       
 37253   // Explore how we can solve this in a better way.
       
 37254   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(page_templates_ExperimentalBlockEditorProvider, {
       
 37255     settings: settings,
       
 37256     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 37257       className: `page-templates-preview-field is-viewtype-${viewType}`,
       
 37258       style: {
       
 37259         backgroundColor
       
 37260       },
       
 37261       children: [viewType === LAYOUT_LIST && !isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Async, {
       
 37262         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockPreview, {
       
 37263           blocks: blocks
       
 37264         })
       
 37265       }), viewType !== LAYOUT_LIST && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("button", {
       
 37266         className: "page-templates-preview-field__button",
       
 37267         type: "button",
       
 37268         onClick: onClick,
       
 37269         "aria-label": item.title?.rendered || item.title,
       
 37270         children: [isEmpty && (0,external_wp_i18n_namespaceObject.__)('Empty template'), !isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Async, {
       
 37271           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockPreview, {
       
 37272             blocks: blocks
       
 37273           })
       
 37274         })]
       
 37275       })]
       
 37276     })
       
 37277   });
       
 37278 }
       
 37279 function PageTemplates() {
       
 37280   const {
       
 37281     params
       
 37282   } = page_templates_useLocation();
       
 37283   const {
       
 37284     activeView = 'all',
       
 37285     layout,
       
 37286     postId
       
 37287   } = params;
       
 37288   const [selection, setSelection] = (0,external_wp_element_namespaceObject.useState)([postId]);
       
 37289   const defaultView = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 37290     const usedType = layout !== null && layout !== void 0 ? layout : page_templates_DEFAULT_VIEW.type;
       
 37291     return {
       
 37292       ...page_templates_DEFAULT_VIEW,
       
 37293       type: usedType,
       
 37294       layout: page_templates_defaultConfigPerViewType[usedType],
       
 37295       filters: activeView !== 'all' ? [{
       
 37296         field: 'author',
       
 37297         operator: 'isAny',
       
 37298         value: [activeView]
       
 37299       }] : []
       
 37300     };
       
 37301   }, [layout, activeView]);
       
 37302   const [view, setView] = (0,external_wp_element_namespaceObject.useState)(defaultView);
       
 37303   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 37304     setView(currentView => ({
       
 37305       ...currentView,
       
 37306       filters: activeView !== 'all' ? [{
       
 37307         field: 'author',
       
 37308         operator: OPERATOR_IS_ANY,
       
 37309         value: [activeView]
       
 37310       }] : []
       
 37311     }));
       
 37312   }, [activeView]);
       
 37313   const {
       
 37314     records,
       
 37315     isResolving: isLoadingData
       
 37316   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', TEMPLATE_POST_TYPE, {
       
 37317     per_page: -1
       
 37318   });
       
 37319   const history = page_templates_useHistory();
       
 37320   const onSelectionChange = (0,external_wp_element_namespaceObject.useCallback)(items => {
       
 37321     if (view?.type === LAYOUT_LIST) {
       
 37322       history.push({
       
 37323         ...params,
       
 37324         postId: items.length === 1 ? items[0].id : undefined
       
 37325       });
       
 37326     }
       
 37327   }, [history, params, view?.type]);
       
 37328   const authors = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 37329     if (!records) {
       
 37330       return page_templates_EMPTY_ARRAY;
       
 37331     }
       
 37332     const authorsSet = new Set();
       
 37333     records.forEach(template => {
       
 37334       authorsSet.add(template.author_text);
 12776     });
 37335     });
 12777   } else if (templateType === 'wp_template_part') {
 37336     return Array.from(authorsSet).map(author => ({
 12778     return (0,external_wp_element_namespaceObject.createElement)(NewTemplatePart, {
 37337       value: author,
 12779       postType: postType
 37338       label: author
       
 37339     }));
       
 37340   }, [records]);
       
 37341   const fields = (0,external_wp_element_namespaceObject.useMemo)(() => [{
       
 37342     header: (0,external_wp_i18n_namespaceObject.__)('Preview'),
       
 37343     id: 'preview',
       
 37344     render: ({
       
 37345       item
       
 37346     }) => {
       
 37347       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(page_templates_Preview, {
       
 37348         item: item,
       
 37349         viewType: view.type
       
 37350       });
       
 37351     },
       
 37352     minWidth: 120,
       
 37353     maxWidth: 120,
       
 37354     enableSorting: false
       
 37355   }, {
       
 37356     header: (0,external_wp_i18n_namespaceObject.__)('Template'),
       
 37357     id: 'title',
       
 37358     getValue: ({
       
 37359       item
       
 37360     }) => item.title?.rendered,
       
 37361     render: ({
       
 37362       item
       
 37363     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(page_templates_Title, {
       
 37364       item: item,
       
 37365       viewType: view.type
       
 37366     }),
       
 37367     maxWidth: 400,
       
 37368     enableHiding: false,
       
 37369     enableGlobalSearch: true
       
 37370   }, {
       
 37371     header: (0,external_wp_i18n_namespaceObject.__)('Description'),
       
 37372     id: 'description',
       
 37373     render: ({
       
 37374       item
       
 37375     }) => {
       
 37376       return item.description ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 37377         className: "page-templates-description",
       
 37378         children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.description)
       
 37379       }) : view.type === LAYOUT_TABLE && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 37380         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 37381           variant: "muted",
       
 37382           "aria-hidden": "true",
       
 37383           children: "\u2014"
       
 37384         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
       
 37385           children: (0,external_wp_i18n_namespaceObject.__)('No description.')
       
 37386         })]
       
 37387       });
       
 37388     },
       
 37389     maxWidth: 400,
       
 37390     minWidth: 320,
       
 37391     enableSorting: false,
       
 37392     enableGlobalSearch: true
       
 37393   }, {
       
 37394     header: (0,external_wp_i18n_namespaceObject.__)('Author'),
       
 37395     id: 'author',
       
 37396     getValue: ({
       
 37397       item
       
 37398     }) => item.author_text,
       
 37399     render: ({
       
 37400       item
       
 37401     }) => {
       
 37402       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AuthorField, {
       
 37403         viewType: view.type,
       
 37404         item: item
       
 37405       });
       
 37406     },
       
 37407     elements: authors,
       
 37408     width: '1%'
       
 37409   }], [authors, view.type]);
       
 37410   const {
       
 37411     data,
       
 37412     paginationInfo
       
 37413   } = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 37414     return filterSortAndPaginate(records, view, fields);
       
 37415   }, [records, view, fields]);
       
 37416   const postTypeActions = page_templates_usePostActions({
       
 37417     postType: TEMPLATE_POST_TYPE,
       
 37418     context: 'list'
       
 37419   });
       
 37420   const editAction = useEditPostAction();
       
 37421   const actions = (0,external_wp_element_namespaceObject.useMemo)(() => [editAction, ...postTypeActions], [postTypeActions, editAction]);
       
 37422   const onChangeView = (0,external_wp_element_namespaceObject.useCallback)(newView => {
       
 37423     if (newView.type !== view.type) {
       
 37424       newView = {
       
 37425         ...newView,
       
 37426         layout: {
       
 37427           ...page_templates_defaultConfigPerViewType[newView.type]
       
 37428         }
       
 37429       };
       
 37430       history.push({
       
 37431         ...params,
       
 37432         layout: newView.type
       
 37433       });
       
 37434     }
       
 37435     setView(newView);
       
 37436   }, [view.type, setView, history, params]);
       
 37437   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Page, {
       
 37438     className: "edit-site-page-templates",
       
 37439     title: (0,external_wp_i18n_namespaceObject.__)('Templates'),
       
 37440     actions: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(add_new_template, {}),
       
 37441     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViews, {
       
 37442       paginationInfo: paginationInfo,
       
 37443       fields: fields,
       
 37444       actions: actions,
       
 37445       data: data,
       
 37446       isLoading: isLoadingData,
       
 37447       view: view,
       
 37448       onChangeView: onChangeView,
       
 37449       onSelectionChange: onSelectionChange,
       
 37450       selection: selection,
       
 37451       setSelection: setSelection
       
 37452     })
       
 37453   });
       
 37454 }
       
 37455 
       
 37456 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-button/index.js
       
 37457 /**
       
 37458  * External dependencies
       
 37459  */
       
 37460 
       
 37461 
       
 37462 /**
       
 37463  * WordPress dependencies
       
 37464  */
       
 37465 
       
 37466 
       
 37467 function SidebarButton(props) {
       
 37468   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 37469     ...props,
       
 37470     className: dist_clsx('edit-site-sidebar-button', props.className)
       
 37471   });
       
 37472 }
       
 37473 
       
 37474 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen/index.js
       
 37475 /**
       
 37476  * External dependencies
       
 37477  */
       
 37478 
       
 37479 
       
 37480 /**
       
 37481  * WordPress dependencies
       
 37482  */
       
 37483 
       
 37484 
       
 37485 
       
 37486 
       
 37487 
       
 37488 
       
 37489 
       
 37490 
       
 37491 /**
       
 37492  * Internal dependencies
       
 37493  */
       
 37494 
       
 37495 
       
 37496 
       
 37497 
       
 37498 
       
 37499 
       
 37500 
       
 37501 
       
 37502 const {
       
 37503   useHistory: sidebar_navigation_screen_useHistory,
       
 37504   useLocation: sidebar_navigation_screen_useLocation
       
 37505 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 37506 function SidebarNavigationScreen({
       
 37507   isRoot,
       
 37508   title,
       
 37509   actions,
       
 37510   meta,
       
 37511   content,
       
 37512   footer,
       
 37513   description,
       
 37514   backPath: backPathProp
       
 37515 }) {
       
 37516   const {
       
 37517     dashboardLink,
       
 37518     dashboardLinkText,
       
 37519     previewingThemeName
       
 37520   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 37521     const {
       
 37522       getSettings
       
 37523     } = lock_unlock_unlock(select(store));
       
 37524     const currentlyPreviewingThemeId = currentlyPreviewingTheme();
       
 37525     return {
       
 37526       dashboardLink: getSettings().__experimentalDashboardLink,
       
 37527       dashboardLinkText: getSettings().__experimentalDashboardLinkText,
       
 37528       // Do not call `getTheme` with null, it will cause a request to
       
 37529       // the server.
       
 37530       previewingThemeName: currentlyPreviewingThemeId ? select(external_wp_coreData_namespaceObject.store).getTheme(currentlyPreviewingThemeId)?.name?.rendered : undefined
       
 37531     };
       
 37532   }, []);
       
 37533   const location = sidebar_navigation_screen_useLocation();
       
 37534   const history = sidebar_navigation_screen_useHistory();
       
 37535   const {
       
 37536     navigate
       
 37537   } = (0,external_wp_element_namespaceObject.useContext)(SidebarNavigationContext);
       
 37538   const backPath = backPathProp !== null && backPathProp !== void 0 ? backPathProp : location.state?.backPath;
       
 37539   const icon = (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right : chevron_left;
       
 37540   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 37541     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 37542       className: dist_clsx('edit-site-sidebar-navigation-screen__main', {
       
 37543         'has-footer': !!footer
       
 37544       }),
       
 37545       spacing: 0,
       
 37546       justify: "flex-start",
       
 37547       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 37548         spacing: 3,
       
 37549         alignment: "flex-start",
       
 37550         className: "edit-site-sidebar-navigation-screen__title-icon",
       
 37551         children: [!isRoot && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarButton, {
       
 37552           onClick: () => {
       
 37553             history.push(backPath);
       
 37554             navigate('back');
       
 37555           },
       
 37556           icon: icon,
       
 37557           label: (0,external_wp_i18n_namespaceObject.__)('Back'),
       
 37558           showTooltip: false
       
 37559         }), isRoot && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarButton, {
       
 37560           icon: icon,
       
 37561           label: dashboardLinkText || (0,external_wp_i18n_namespaceObject.__)('Go to the Dashboard'),
       
 37562           href: dashboardLink || 'index.php'
       
 37563         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 37564           className: "edit-site-sidebar-navigation-screen__title",
       
 37565           color: '#e0e0e0' /* $gray-200 */,
       
 37566           level: 1,
       
 37567           size: 20,
       
 37568           children: !isPreviewingTheme() ? title : (0,external_wp_i18n_namespaceObject.sprintf)('Previewing %1$s: %2$s', previewingThemeName, title)
       
 37569         }), actions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 37570           className: "edit-site-sidebar-navigation-screen__actions",
       
 37571           children: actions
       
 37572         })]
       
 37573       }), meta && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 37574         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 37575           className: "edit-site-sidebar-navigation-screen__meta",
       
 37576           children: meta
       
 37577         })
       
 37578       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
 37579         className: "edit-site-sidebar-navigation-screen__content",
       
 37580         children: [description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
 37581           className: "edit-site-sidebar-navigation-screen__description",
       
 37582           children: description
       
 37583         }), content]
       
 37584       })]
       
 37585     }), footer && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("footer", {
       
 37586       className: "edit-site-sidebar-navigation-screen__footer",
       
 37587       children: footer
       
 37588     })]
       
 37589   });
       
 37590 }
       
 37591 
       
 37592 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left-small.js
       
 37593 /**
       
 37594  * WordPress dependencies
       
 37595  */
       
 37596 
       
 37597 
       
 37598 const chevronLeftSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 37599   xmlns: "http://www.w3.org/2000/svg",
       
 37600   viewBox: "0 0 24 24",
       
 37601   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 37602     d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"
       
 37603   })
       
 37604 });
       
 37605 /* harmony default export */ const chevron_left_small = (chevronLeftSmall);
       
 37606 
       
 37607 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right-small.js
       
 37608 /**
       
 37609  * WordPress dependencies
       
 37610  */
       
 37611 
       
 37612 
       
 37613 const chevronRightSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 37614   xmlns: "http://www.w3.org/2000/svg",
       
 37615   viewBox: "0 0 24 24",
       
 37616   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 37617     d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"
       
 37618   })
       
 37619 });
       
 37620 /* harmony default export */ const chevron_right_small = (chevronRightSmall);
       
 37621 
       
 37622 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-item/index.js
       
 37623 /**
       
 37624  * External dependencies
       
 37625  */
       
 37626 
       
 37627 
       
 37628 /**
       
 37629  * WordPress dependencies
       
 37630  */
       
 37631 
       
 37632 
       
 37633 
       
 37634 
       
 37635 
       
 37636 
       
 37637 /**
       
 37638  * Internal dependencies
       
 37639  */
       
 37640 
       
 37641 
       
 37642 
       
 37643 
       
 37644 const {
       
 37645   useHistory: sidebar_navigation_item_useHistory
       
 37646 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 37647 function SidebarNavigationItem({
       
 37648   className,
       
 37649   icon,
       
 37650   withChevron = false,
       
 37651   suffix,
       
 37652   uid,
       
 37653   params,
       
 37654   onClick,
       
 37655   children,
       
 37656   ...props
       
 37657 }) {
       
 37658   const history = sidebar_navigation_item_useHistory();
       
 37659   const {
       
 37660     navigate
       
 37661   } = (0,external_wp_element_namespaceObject.useContext)(SidebarNavigationContext);
       
 37662   // If there is no custom click handler, create one that navigates to `params`.
       
 37663   function handleClick(e) {
       
 37664     if (onClick) {
       
 37665       onClick(e);
       
 37666       navigate('forward');
       
 37667     } else if (params) {
       
 37668       e.preventDefault();
       
 37669       history.push(params);
       
 37670       navigate('forward', `[id="${uid}"]`);
       
 37671     }
       
 37672   }
       
 37673   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItem, {
       
 37674     className: dist_clsx('edit-site-sidebar-navigation-item', {
       
 37675       'with-suffix': !withChevron && suffix
       
 37676     }, className),
       
 37677     onClick: handleClick,
       
 37678     id: uid,
       
 37679     ...props,
       
 37680     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 37681       justify: "flex-start",
       
 37682       children: [icon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
       
 37683         style: {
       
 37684           fill: 'currentcolor'
       
 37685         },
       
 37686         icon: icon,
       
 37687         size: 24
       
 37688       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexBlock, {
       
 37689         children: children
       
 37690       }), withChevron && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
       
 37691         icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left_small : chevron_right_small,
       
 37692         className: "edit-site-sidebar-navigation-item__drilldown-indicator",
       
 37693         size: 24
       
 37694       }), !withChevron && suffix]
       
 37695     })
       
 37696   });
       
 37697 }
       
 37698 
       
 37699 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js
       
 37700 /**
       
 37701  * WordPress dependencies
       
 37702  */
       
 37703 
       
 37704 
       
 37705 function SidebarNavigationScreenDetailsPanelLabel({
       
 37706   children
       
 37707 }) {
       
 37708   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 37709     className: "edit-site-sidebar-navigation-details-screen-panel__label",
       
 37710     children: children
       
 37711   });
       
 37712 }
       
 37713 
       
 37714 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js
       
 37715 /**
       
 37716  * External dependencies
       
 37717  */
       
 37718 
       
 37719 
       
 37720 /**
       
 37721  * WordPress dependencies
       
 37722  */
       
 37723 
       
 37724 
       
 37725 function SidebarNavigationScreenDetailsPanelRow({
       
 37726   label,
       
 37727   children,
       
 37728   className,
       
 37729   ...extraProps
       
 37730 }) {
       
 37731   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 37732     spacing: 5,
       
 37733     alignment: "left",
       
 37734     className: dist_clsx('edit-site-sidebar-navigation-details-screen-panel__row', className),
       
 37735     ...extraProps,
       
 37736     children: children
       
 37737   }, label);
       
 37738 }
       
 37739 
       
 37740 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js
       
 37741 /**
       
 37742  * WordPress dependencies
       
 37743  */
       
 37744 
       
 37745 
       
 37746 function SidebarNavigationScreenDetailsPanelValue({
       
 37747   children
       
 37748 }) {
       
 37749   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
       
 37750     className: "edit-site-sidebar-navigation-details-screen-panel__value",
       
 37751     children: children
       
 37752   });
       
 37753 }
       
 37754 
       
 37755 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-details-panel/index.js
       
 37756 /**
       
 37757  * WordPress dependencies
       
 37758  */
       
 37759 
       
 37760 
       
 37761 /**
       
 37762  * Internal dependencies
       
 37763  */
       
 37764 
       
 37765 
       
 37766 
       
 37767 
       
 37768 
       
 37769 function SidebarNavigationScreenDetailsPanel({
       
 37770   title,
       
 37771   children,
       
 37772   spacing
       
 37773 }) {
       
 37774   return /*#__PURE__*/_jsxs(VStack, {
       
 37775     className: "edit-site-sidebar-navigation-details-screen-panel",
       
 37776     spacing: spacing,
       
 37777     children: [title && /*#__PURE__*/_jsx(Heading, {
       
 37778       className: "edit-site-sidebar-navigation-details-screen-panel__heading",
       
 37779       level: 2,
       
 37780       children: title
       
 37781     }), children]
       
 37782   });
       
 37783 }
       
 37784 
       
 37785 
       
 37786 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-details-footer/index.js
       
 37787 /**
       
 37788  * WordPress dependencies
       
 37789  */
       
 37790 
       
 37791 
       
 37792 
       
 37793 
       
 37794 
       
 37795 
       
 37796 
       
 37797 /**
       
 37798  * Internal dependencies
       
 37799  */
       
 37800 
       
 37801 
       
 37802 
       
 37803 
       
 37804 function SidebarNavigationScreenDetailsFooter({
       
 37805   record,
       
 37806   ...otherProps
       
 37807 }) {
       
 37808   var _record$_links$predec, _record$_links$versio;
       
 37809   /*
       
 37810    * There might be other items in the future,
       
 37811    * but for now it's just modified date.
       
 37812    * Later we might render a list of items and isolate
       
 37813    * the following logic.
       
 37814    */
       
 37815   const hrefProps = {};
       
 37816   const lastRevisionId = (_record$_links$predec = record?._links?.['predecessor-version']?.[0]?.id) !== null && _record$_links$predec !== void 0 ? _record$_links$predec : null;
       
 37817   const revisionsCount = (_record$_links$versio = record?._links?.['version-history']?.[0]?.count) !== null && _record$_links$versio !== void 0 ? _record$_links$versio : 0;
       
 37818   // Enable the revisions link if there is a last revision and there are more than one revisions.
       
 37819   if (lastRevisionId && revisionsCount > 1) {
       
 37820     hrefProps.href = (0,external_wp_url_namespaceObject.addQueryArgs)('revision.php', {
       
 37821       revision: record?._links['predecessor-version'][0].id
       
 37822     });
       
 37823     hrefProps.as = 'a';
       
 37824   }
       
 37825   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 37826     className: "edit-site-sidebar-navigation-screen-details-footer",
       
 37827     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 37828       "aria-label": (0,external_wp_i18n_namespaceObject.__)('Revisions'),
       
 37829       ...hrefProps,
       
 37830       ...otherProps,
       
 37831       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(SidebarNavigationScreenDetailsPanelRow, {
       
 37832         justify: "space-between",
       
 37833         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenDetailsPanelLabel, {
       
 37834           children: (0,external_wp_i18n_namespaceObject.__)('Last modified')
       
 37835         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenDetailsPanelValue, {
       
 37836           children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: is the relative time when the post was last modified. */
       
 37837           (0,external_wp_i18n_namespaceObject.__)('<time>%s</time>'), (0,external_wp_date_namespaceObject.humanTimeDiff)(record.modified)), {
       
 37838             time: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
       
 37839               dateTime: record.modified
       
 37840             })
       
 37841           })
       
 37842         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
       
 37843           className: "edit-site-sidebar-navigation-screen-details-footer__icon",
       
 37844           icon: library_backup
       
 37845         })]
       
 37846       })
       
 37847     })
       
 37848   });
       
 37849 }
       
 37850 
       
 37851 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-global-styles/index.js
       
 37852 /**
       
 37853  * WordPress dependencies
       
 37854  */
       
 37855 
       
 37856 
       
 37857 
       
 37858 
       
 37859 
       
 37860 
       
 37861 
       
 37862 
       
 37863 
       
 37864 
       
 37865 
       
 37866 /**
       
 37867  * Internal dependencies
       
 37868  */
       
 37869 
       
 37870 
       
 37871 
       
 37872 
       
 37873 
       
 37874 
       
 37875 
       
 37876 
       
 37877 
       
 37878 
       
 37879 
       
 37880 
       
 37881 
       
 37882 
       
 37883 
       
 37884 const sidebar_navigation_screen_global_styles_noop = () => {};
       
 37885 function SidebarNavigationItemGlobalStyles(props) {
       
 37886   const {
       
 37887     openGeneralSidebar
       
 37888   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 37889   const {
       
 37890     setCanvasMode
       
 37891   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 37892   const hasGlobalStyleVariations = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, []);
       
 37893   if (hasGlobalStyleVariations) {
       
 37894     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 37895       ...props,
       
 37896       params: {
       
 37897         path: '/wp_global_styles'
       
 37898       },
       
 37899       uid: "global-styles-navigation-item"
 12780     });
 37900     });
 12781   }
 37901   }
 12782 
 37902   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
 12783   return null;
 37903     ...props,
 12784 }
 37904     onClick: () => {
 12785 
 37905       // Switch to edit mode.
 12786 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/header.js
 37906       setCanvasMode('edit');
 12787 
 37907       // Open global styles sidebar.
 12788 
 37908       openGeneralSidebar('edit-site/global-styles');
       
 37909     }
       
 37910   });
       
 37911 }
       
 37912 function SidebarNavigationScreenGlobalStylesContent() {
       
 37913   const {
       
 37914     storedSettings
       
 37915   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 37916     const {
       
 37917       getSettings
       
 37918     } = lock_unlock_unlock(select(store));
       
 37919     return {
       
 37920       storedSettings: getSettings()
       
 37921     };
       
 37922   }, []);
       
 37923   const colorVariations = useColorVariations();
       
 37924   const typographyVariations = useTypographyVariations();
       
 37925   const gap = 3;
       
 37926 
       
 37927   // Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
       
 37928   // loaded. This is necessary because the Iframe component waits until
       
 37929   // the block editor store's `__internalIsInitialized` is true before
       
 37930   // rendering the iframe. Without this, the iframe previews will not render
       
 37931   // in mobile viewport sizes, where the editor canvas is hidden.
       
 37932   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockEditorProvider, {
       
 37933     settings: storedSettings,
       
 37934     onChange: sidebar_navigation_screen_global_styles_noop,
       
 37935     onInput: sidebar_navigation_screen_global_styles_noop,
       
 37936     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 37937       spacing: 10,
       
 37938       className: "edit-site-global-styles-variation-container",
       
 37939       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyleVariationsContainer, {
       
 37940         gap: gap
       
 37941       }), colorVariations?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorVariations, {
       
 37942         title: (0,external_wp_i18n_namespaceObject.__)('Palettes'),
       
 37943         gap: gap
       
 37944       }), typographyVariations?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TypographyVariations, {
       
 37945         title: (0,external_wp_i18n_namespaceObject.__)('Typography'),
       
 37946         gap: gap
       
 37947       })]
       
 37948     })
       
 37949   });
       
 37950 }
       
 37951 function SidebarNavigationScreenGlobalStyles({
       
 37952   backPath
       
 37953 }) {
       
 37954   const {
       
 37955     revisions,
       
 37956     isLoading: isLoadingRevisions
       
 37957   } = useGlobalStylesRevisions();
       
 37958   const {
       
 37959     openGeneralSidebar
       
 37960   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
 37961   const {
       
 37962     setIsListViewOpened
       
 37963   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
       
 37964   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
       
 37965   const {
       
 37966     setCanvasMode,
       
 37967     setEditorCanvasContainerView
       
 37968   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 37969   const {
       
 37970     isViewMode,
       
 37971     isStyleBookOpened,
       
 37972     revisionsCount
       
 37973   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 37974     var _globalStyles$_links$;
       
 37975     const {
       
 37976       getCanvasMode,
       
 37977       getEditorCanvasContainerView
       
 37978     } = lock_unlock_unlock(select(store));
       
 37979     const {
       
 37980       getEntityRecord,
       
 37981       __experimentalGetCurrentGlobalStylesId
       
 37982     } = select(external_wp_coreData_namespaceObject.store);
       
 37983     const globalStylesId = __experimentalGetCurrentGlobalStylesId();
       
 37984     const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
       
 37985     return {
       
 37986       isViewMode: 'view' === getCanvasMode(),
       
 37987       isStyleBookOpened: 'style-book' === getEditorCanvasContainerView(),
       
 37988       revisionsCount: (_globalStyles$_links$ = globalStyles?._links?.['version-history']?.[0]?.count) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : 0
       
 37989     };
       
 37990   }, []);
       
 37991   const {
       
 37992     set: setPreference
       
 37993   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
       
 37994   const openGlobalStyles = (0,external_wp_element_namespaceObject.useCallback)(async () => {
       
 37995     return Promise.all([setPreference('core', 'distractionFree', false), setCanvasMode('edit'), openGeneralSidebar('edit-site/global-styles')]);
       
 37996   }, [setCanvasMode, openGeneralSidebar, setPreference]);
       
 37997   const openStyleBook = (0,external_wp_element_namespaceObject.useCallback)(async () => {
       
 37998     await openGlobalStyles();
       
 37999     // Open the Style Book once the canvas mode is set to edit,
       
 38000     // and the global styles sidebar is open. This ensures that
       
 38001     // the Style Book is not prematurely closed.
       
 38002     setEditorCanvasContainerView('style-book');
       
 38003     setIsListViewOpened(false);
       
 38004   }, [openGlobalStyles, setEditorCanvasContainerView, setIsListViewOpened]);
       
 38005   const openRevisions = (0,external_wp_element_namespaceObject.useCallback)(async () => {
       
 38006     await openGlobalStyles();
       
 38007     // Open the global styles revisions once the canvas mode is set to edit,
       
 38008     // and the global styles sidebar is open. The global styles UI is responsible
       
 38009     // for redirecting to the revisions screen once the editor canvas container
       
 38010     // has been set to 'global-styles-revisions'.
       
 38011     setEditorCanvasContainerView('global-styles-revisions');
       
 38012   }, [openGlobalStyles, setEditorCanvasContainerView]);
       
 38013 
       
 38014   // If there are no revisions, do not render a footer.
       
 38015   const hasRevisions = revisionsCount > 0;
       
 38016   const modifiedDateTime = revisions?.[0]?.modified;
       
 38017   const shouldShowGlobalStylesFooter = hasRevisions && !isLoadingRevisions && modifiedDateTime;
       
 38018   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 38019     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreen, {
       
 38020       title: (0,external_wp_i18n_namespaceObject.__)('Styles'),
       
 38021       description: (0,external_wp_i18n_namespaceObject.__)('Choose a different style combination for the theme styles.'),
       
 38022       backPath: backPath,
       
 38023       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenGlobalStylesContent, {}),
       
 38024       footer: shouldShowGlobalStylesFooter && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenDetailsFooter, {
       
 38025         record: revisions?.[0],
       
 38026         onClick: openRevisions
       
 38027       }),
       
 38028       actions: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 38029         children: [!isMobileViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarButton, {
       
 38030           icon: library_seen,
       
 38031           label: (0,external_wp_i18n_namespaceObject.__)('Style Book'),
       
 38032           onClick: () => setEditorCanvasContainerView(!isStyleBookOpened ? 'style-book' : undefined),
       
 38033           isPressed: isStyleBookOpened
       
 38034         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarButton, {
       
 38035           icon: edit,
       
 38036           label: (0,external_wp_i18n_namespaceObject.__)('Edit styles'),
       
 38037           onClick: async () => await openGlobalStyles()
       
 38038         })]
       
 38039       })
       
 38040     }), isStyleBookOpened && !isMobileViewport && isViewMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(style_book, {
       
 38041       enableResizing: false,
       
 38042       isSelected: () => false,
       
 38043       onClick: openStyleBook,
       
 38044       onSelect: openStyleBook,
       
 38045       showCloseButton: false,
       
 38046       showTabs: false
       
 38047     })]
       
 38048   });
       
 38049 }
       
 38050 
       
 38051 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/navigation.js
 12789 /**
 38052 /**
 12790  * WordPress dependencies
 38053  * WordPress dependencies
 12791  */
 38054  */
 12792 
 38055 
 12793 
 38056 
       
 38057 const navigation = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 38058   viewBox: "0 0 24 24",
       
 38059   xmlns: "http://www.w3.org/2000/svg",
       
 38060   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 38061     d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"
       
 38062   })
       
 38063 });
       
 38064 /* harmony default export */ const library_navigation = (navigation);
       
 38065 
       
 38066 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-main/index.js
       
 38067 /**
       
 38068  * WordPress dependencies
       
 38069  */
       
 38070 
       
 38071 
       
 38072 
       
 38073 
       
 38074 
 12794 
 38075 
 12795 /**
 38076 /**
 12796  * Internal dependencies
 38077  * Internal dependencies
 12797  */
 38078  */
 12798 
 38079 
 12799 
 38080 
 12800 function header_Header(_ref) {
 38081 
 12801   var _postType$labels;
 38082 
 12802 
 38083 
 12803   let {
 38084 
 12804     templateType
 38085 
 12805   } = _ref;
 38086 
 12806   const postType = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getPostType(templateType), [templateType]);
 38087 
 12807 
 38088 function SidebarNavigationScreenMain() {
 12808   if (!postType) {
 38089   const {
       
 38090     setEditorCanvasContainerView
       
 38091   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
       
 38092 
       
 38093   // Clear the editor canvas container view when accessing the main navigation screen.
       
 38094   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 38095     setEditorCanvasContainerView(undefined);
       
 38096   }, [setEditorCanvasContainerView]);
       
 38097   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreen, {
       
 38098     isRoot: true,
       
 38099     title: (0,external_wp_i18n_namespaceObject.__)('Design'),
       
 38100     description: (0,external_wp_i18n_namespaceObject.__)('Customize the appearance of your website using the block editor.'),
       
 38101     content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 38102       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 38103         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 38104           uid: "navigation-navigation-item",
       
 38105           params: {
       
 38106             postType: NAVIGATION_POST_TYPE
       
 38107           },
       
 38108           withChevron: true,
       
 38109           icon: library_navigation,
       
 38110           children: (0,external_wp_i18n_namespaceObject.__)('Navigation')
       
 38111         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItemGlobalStyles, {
       
 38112           uid: "styles-navigation-item",
       
 38113           withChevron: true,
       
 38114           icon: library_styles,
       
 38115           children: (0,external_wp_i18n_namespaceObject.__)('Styles')
       
 38116         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 38117           uid: "page-navigation-item",
       
 38118           params: {
       
 38119             postType: 'page'
       
 38120           },
       
 38121           withChevron: true,
       
 38122           icon: library_page,
       
 38123           children: (0,external_wp_i18n_namespaceObject.__)('Pages')
       
 38124         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 38125           uid: "template-navigation-item",
       
 38126           params: {
       
 38127             postType: TEMPLATE_POST_TYPE
       
 38128           },
       
 38129           withChevron: true,
       
 38130           icon: library_layout,
       
 38131           children: (0,external_wp_i18n_namespaceObject.__)('Templates')
       
 38132         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 38133           uid: "patterns-navigation-item",
       
 38134           params: {
       
 38135             postType: PATTERN_TYPES.user
       
 38136           },
       
 38137           withChevron: true,
       
 38138           icon: library_symbol,
       
 38139           children: (0,external_wp_i18n_namespaceObject.__)('Patterns')
       
 38140         })]
       
 38141       })
       
 38142     })
       
 38143   });
       
 38144 }
       
 38145 
       
 38146 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js
       
 38147 // This requested is preloaded in `gutenberg_preload_navigation_posts`.
       
 38148 // As unbounded queries are limited to 100 by `fetchAllMiddleware`
       
 38149 // on apiFetch this query is limited to 100.
       
 38150 // These parameters must be kept aligned with those in
       
 38151 // lib/compat/wordpress-6.3/navigation-block-preloading.php
       
 38152 // and
       
 38153 // block-library/src/navigation/constants.js
       
 38154 const PRELOADED_NAVIGATION_MENUS_QUERY = {
       
 38155   per_page: 100,
       
 38156   status: ['publish', 'draft'],
       
 38157   order: 'desc',
       
 38158   orderby: 'date'
       
 38159 };
       
 38160 
       
 38161 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js
       
 38162 /**
       
 38163  * WordPress dependencies
       
 38164  */
       
 38165 
       
 38166 
       
 38167 
       
 38168 
       
 38169 
       
 38170 const notEmptyString = testString => testString?.trim()?.length > 0;
       
 38171 function rename_modal_RenameModal({
       
 38172   menuTitle,
       
 38173   onClose,
       
 38174   onSave
       
 38175 }) {
       
 38176   const [editedMenuTitle, setEditedMenuTitle] = (0,external_wp_element_namespaceObject.useState)(menuTitle);
       
 38177   const titleHasChanged = editedMenuTitle !== menuTitle;
       
 38178   const isEditedMenuTitleValid = titleHasChanged && notEmptyString(editedMenuTitle);
       
 38179   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 38180     title: (0,external_wp_i18n_namespaceObject.__)('Rename'),
       
 38181     onRequestClose: onClose,
       
 38182     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
       
 38183       className: "sidebar-navigation__rename-modal-form",
       
 38184       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 38185         spacing: "3",
       
 38186         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
       
 38187           __nextHasNoMarginBottom: true,
       
 38188           __next40pxDefaultSize: true,
       
 38189           value: editedMenuTitle,
       
 38190           placeholder: (0,external_wp_i18n_namespaceObject.__)('Navigation title'),
       
 38191           onChange: setEditedMenuTitle
       
 38192         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 38193           justify: "right",
       
 38194           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 38195             __next40pxDefaultSize: true,
       
 38196             variant: "tertiary",
       
 38197             onClick: onClose,
       
 38198             children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
       
 38199           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 38200             __next40pxDefaultSize: true,
       
 38201             __experimentalIsFocusable: true,
       
 38202             disabled: !isEditedMenuTitleValid,
       
 38203             variant: "primary",
       
 38204             type: "submit",
       
 38205             onClick: e => {
       
 38206               e.preventDefault();
       
 38207               if (!isEditedMenuTitleValid) {
       
 38208                 return;
       
 38209               }
       
 38210               onSave({
       
 38211                 title: editedMenuTitle
       
 38212               });
       
 38213 
       
 38214               // Immediate close avoids ability to hit save multiple times.
       
 38215               onClose();
       
 38216             },
       
 38217             children: (0,external_wp_i18n_namespaceObject.__)('Save')
       
 38218           })]
       
 38219         })]
       
 38220       })
       
 38221     })
       
 38222   });
       
 38223 }
       
 38224 
       
 38225 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js
       
 38226 /**
       
 38227  * WordPress dependencies
       
 38228  */
       
 38229 
       
 38230 
       
 38231 
       
 38232 function DeleteConfirmDialog({
       
 38233   onClose,
       
 38234   onConfirm
       
 38235 }) {
       
 38236   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
       
 38237     isOpen: true,
       
 38238     onConfirm: () => {
       
 38239       onConfirm();
       
 38240 
       
 38241       // Immediate close avoids ability to hit delete multiple times.
       
 38242       onClose();
       
 38243     },
       
 38244     onCancel: onClose,
       
 38245     confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Delete'),
       
 38246     size: "medium",
       
 38247     children: (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete this Navigation Menu?')
       
 38248   });
       
 38249 }
       
 38250 
       
 38251 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js
       
 38252 /**
       
 38253  * WordPress dependencies
       
 38254  */
       
 38255 
       
 38256 
       
 38257 
       
 38258 
       
 38259 
       
 38260 
       
 38261 /**
       
 38262  * Internal dependencies
       
 38263  */
       
 38264 
       
 38265 
       
 38266 
       
 38267 
       
 38268 
       
 38269 
       
 38270 const {
       
 38271   useHistory: more_menu_useHistory
       
 38272 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 38273 const POPOVER_PROPS = {
       
 38274   position: 'bottom right'
       
 38275 };
       
 38276 function ScreenNavigationMoreMenu(props) {
       
 38277   const {
       
 38278     onDelete,
       
 38279     onSave,
       
 38280     onDuplicate,
       
 38281     menuTitle,
       
 38282     menuId
       
 38283   } = props;
       
 38284   const [renameModalOpen, setRenameModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 38285   const [deleteConfirmDialogOpen, setDeleteConfirmDialogOpen] = (0,external_wp_element_namespaceObject.useState)(false);
       
 38286   const history = more_menu_useHistory();
       
 38287   const closeModals = () => {
       
 38288     setRenameModalOpen(false);
       
 38289     setDeleteConfirmDialogOpen(false);
       
 38290   };
       
 38291   const openRenameModal = () => setRenameModalOpen(true);
       
 38292   const openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen(true);
       
 38293   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 38294     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
       
 38295       className: "sidebar-navigation__more-menu",
       
 38296       label: (0,external_wp_i18n_namespaceObject.__)('Actions'),
       
 38297       icon: more_vertical,
       
 38298       popoverProps: POPOVER_PROPS,
       
 38299       children: ({
       
 38300         onClose
       
 38301       }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 38302         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
       
 38303           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38304             onClick: () => {
       
 38305               openRenameModal();
       
 38306               // Close the dropdown after opening the modal.
       
 38307               onClose();
       
 38308             },
       
 38309             children: (0,external_wp_i18n_namespaceObject.__)('Rename')
       
 38310           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38311             onClick: () => {
       
 38312               history.push({
       
 38313                 postId: menuId,
       
 38314                 postType: 'wp_navigation',
       
 38315                 canvas: 'edit'
       
 38316               });
       
 38317             },
       
 38318             children: (0,external_wp_i18n_namespaceObject.__)('Edit')
       
 38319           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38320             onClick: () => {
       
 38321               onDuplicate();
       
 38322               onClose();
       
 38323             },
       
 38324             children: (0,external_wp_i18n_namespaceObject.__)('Duplicate')
       
 38325           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38326             isDestructive: true,
       
 38327             onClick: () => {
       
 38328               openDeleteConfirmDialog();
       
 38329 
       
 38330               // Close the dropdown after opening the modal.
       
 38331               onClose();
       
 38332             },
       
 38333             children: (0,external_wp_i18n_namespaceObject.__)('Delete')
       
 38334           })]
       
 38335         })
       
 38336       })
       
 38337     }), deleteConfirmDialogOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DeleteConfirmDialog, {
       
 38338       onClose: closeModals,
       
 38339       onConfirm: onDelete
       
 38340     }), renameModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(rename_modal_RenameModal, {
       
 38341       onClose: closeModals,
       
 38342       menuTitle: menuTitle,
       
 38343       onSave: onSave
       
 38344     })]
       
 38345   });
       
 38346 }
       
 38347 
       
 38348 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
       
 38349 /**
       
 38350  * WordPress dependencies
       
 38351  */
       
 38352 
       
 38353 
       
 38354 const chevronUp = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 38355   viewBox: "0 0 24 24",
       
 38356   xmlns: "http://www.w3.org/2000/svg",
       
 38357   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 38358     d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"
       
 38359   })
       
 38360 });
       
 38361 /* harmony default export */ const chevron_up = (chevronUp);
       
 38362 
       
 38363 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
       
 38364 /**
       
 38365  * WordPress dependencies
       
 38366  */
       
 38367 
       
 38368 
       
 38369 const chevronDown = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 38370   viewBox: "0 0 24 24",
       
 38371   xmlns: "http://www.w3.org/2000/svg",
       
 38372   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 38373     d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
       
 38374   })
       
 38375 });
       
 38376 /* harmony default export */ const chevron_down = (chevronDown);
       
 38377 
       
 38378 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js
       
 38379 /**
       
 38380  * WordPress dependencies
       
 38381  */
       
 38382 
       
 38383 
       
 38384 
       
 38385 
       
 38386 
       
 38387 
       
 38388 
       
 38389 
       
 38390 const leaf_more_menu_POPOVER_PROPS = {
       
 38391   className: 'block-editor-block-settings-menu__popover',
       
 38392   placement: 'bottom-start'
       
 38393 };
       
 38394 
       
 38395 /**
       
 38396  * Internal dependencies
       
 38397  */
       
 38398 
       
 38399 
       
 38400 
       
 38401 
       
 38402 const {
       
 38403   useHistory: leaf_more_menu_useHistory
       
 38404 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 38405 function LeafMoreMenu(props) {
       
 38406   const history = leaf_more_menu_useHistory();
       
 38407   const {
       
 38408     block
       
 38409   } = props;
       
 38410   const {
       
 38411     clientId
       
 38412   } = block;
       
 38413   const {
       
 38414     moveBlocksDown,
       
 38415     moveBlocksUp,
       
 38416     removeBlocks
       
 38417   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
 38418   const removeLabel = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: block name */
       
 38419   (0,external_wp_i18n_namespaceObject.__)('Remove %s'), (0,external_wp_blockEditor_namespaceObject.BlockTitle)({
       
 38420     clientId,
       
 38421     maximumLength: 25
       
 38422   }));
       
 38423   const goToLabel = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: block name */
       
 38424   (0,external_wp_i18n_namespaceObject.__)('Go to %s'), (0,external_wp_blockEditor_namespaceObject.BlockTitle)({
       
 38425     clientId,
       
 38426     maximumLength: 25
       
 38427   }));
       
 38428   const rootClientId = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 38429     const {
       
 38430       getBlockRootClientId
       
 38431     } = select(external_wp_blockEditor_namespaceObject.store);
       
 38432     return getBlockRootClientId(clientId);
       
 38433   }, [clientId]);
       
 38434   const onGoToPage = (0,external_wp_element_namespaceObject.useCallback)(selectedBlock => {
       
 38435     const {
       
 38436       attributes,
       
 38437       name
       
 38438     } = selectedBlock;
       
 38439     if (attributes.kind === 'post-type' && attributes.id && attributes.type && history) {
       
 38440       const {
       
 38441         params
       
 38442       } = history.getLocationWithParams();
       
 38443       history.push({
       
 38444         postType: attributes.type,
       
 38445         postId: attributes.id,
       
 38446         canvas: 'edit'
       
 38447       }, {
       
 38448         backPath: params
       
 38449       });
       
 38450     }
       
 38451     if (name === 'core/page-list-item' && attributes.id && history) {
       
 38452       const {
       
 38453         params
       
 38454       } = history.getLocationWithParams();
       
 38455       history.push({
       
 38456         postType: 'page',
       
 38457         postId: attributes.id,
       
 38458         canvas: 'edit'
       
 38459       }, {
       
 38460         backPath: params
       
 38461       });
       
 38462     }
       
 38463   }, [history]);
       
 38464   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
       
 38465     icon: more_vertical,
       
 38466     label: (0,external_wp_i18n_namespaceObject.__)('Options'),
       
 38467     className: "block-editor-block-settings-menu",
       
 38468     popoverProps: leaf_more_menu_POPOVER_PROPS,
       
 38469     noIcons: true,
       
 38470     ...props,
       
 38471     children: ({
       
 38472       onClose
       
 38473     }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 38474       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
       
 38475         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38476           icon: chevron_up,
       
 38477           onClick: () => {
       
 38478             moveBlocksUp([clientId], rootClientId);
       
 38479             onClose();
       
 38480           },
       
 38481           children: (0,external_wp_i18n_namespaceObject.__)('Move up')
       
 38482         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38483           icon: chevron_down,
       
 38484           onClick: () => {
       
 38485             moveBlocksDown([clientId], rootClientId);
       
 38486             onClose();
       
 38487           },
       
 38488           children: (0,external_wp_i18n_namespaceObject.__)('Move down')
       
 38489         }), block.attributes?.type === 'page' && block.attributes?.id && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38490           onClick: () => {
       
 38491             onGoToPage(block);
       
 38492             onClose();
       
 38493           },
       
 38494           children: goToLabel
       
 38495         })]
       
 38496       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
       
 38497         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 38498           onClick: () => {
       
 38499             removeBlocks([clientId], false);
       
 38500             onClose();
       
 38501           },
       
 38502           children: removeLabel
       
 38503         })
       
 38504       })]
       
 38505     })
       
 38506   });
       
 38507 }
       
 38508 
       
 38509 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js
       
 38510 /**
       
 38511  * WordPress dependencies
       
 38512  */
       
 38513 
       
 38514 
       
 38515 
       
 38516 
       
 38517 
       
 38518 
       
 38519 /**
       
 38520  * Internal dependencies
       
 38521  */
       
 38522 
       
 38523 
       
 38524 
       
 38525 
       
 38526 
       
 38527 const {
       
 38528   PrivateListView
       
 38529 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 38530 
       
 38531 // Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.
       
 38532 const MAX_PAGE_COUNT = 100;
       
 38533 const PAGES_QUERY = ['postType', 'page', {
       
 38534   per_page: MAX_PAGE_COUNT,
       
 38535   _fields: ['id', 'link', 'menu_order', 'parent', 'title', 'type'],
       
 38536   // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
       
 38537   // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
       
 38538   // sort.
       
 38539   orderby: 'menu_order',
       
 38540   order: 'asc'
       
 38541 }];
       
 38542 function NavigationMenuContent({
       
 38543   rootClientId
       
 38544 }) {
       
 38545   const {
       
 38546     listViewRootClientId,
       
 38547     isLoading
       
 38548   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 38549     const {
       
 38550       areInnerBlocksControlled,
       
 38551       getBlockName,
       
 38552       getBlockCount,
       
 38553       getBlockOrder
       
 38554     } = select(external_wp_blockEditor_namespaceObject.store);
       
 38555     const {
       
 38556       isResolving
       
 38557     } = select(external_wp_coreData_namespaceObject.store);
       
 38558     const blockClientIds = getBlockOrder(rootClientId);
       
 38559     const hasOnlyPageListBlock = blockClientIds.length === 1 && getBlockName(blockClientIds[0]) === 'core/page-list';
       
 38560     const pageListHasBlocks = hasOnlyPageListBlock && getBlockCount(blockClientIds[0]) > 0;
       
 38561     const isLoadingPages = isResolving('getEntityRecords', PAGES_QUERY);
       
 38562     return {
       
 38563       listViewRootClientId: pageListHasBlocks ? blockClientIds[0] : rootClientId,
       
 38564       // This is a small hack to wait for the navigation block
       
 38565       // to actually load its inner blocks.
       
 38566       isLoading: !areInnerBlocksControlled(rootClientId) || isLoadingPages
       
 38567     };
       
 38568   }, [rootClientId]);
       
 38569   const {
       
 38570     replaceBlock,
       
 38571     __unstableMarkNextChangeAsNotPersistent
       
 38572   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
       
 38573   const offCanvasOnselect = (0,external_wp_element_namespaceObject.useCallback)(block => {
       
 38574     if (block.name === 'core/navigation-link' && !block.attributes.url) {
       
 38575       __unstableMarkNextChangeAsNotPersistent();
       
 38576       replaceBlock(block.clientId, (0,external_wp_blocks_namespaceObject.createBlock)('core/navigation-link', block.attributes));
       
 38577     }
       
 38578   }, [__unstableMarkNextChangeAsNotPersistent, replaceBlock]);
       
 38579 
       
 38580   // The hidden block is needed because it makes block edit side effects trigger.
       
 38581   // For example a navigation page list load its items has an effect on edit to load its items.
       
 38582   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 38583     children: [!isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivateListView, {
       
 38584       rootClientId: listViewRootClientId,
       
 38585       onSelect: offCanvasOnselect,
       
 38586       blockSettingsMenu: LeafMoreMenu,
       
 38587       showAppender: false
       
 38588     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 38589       className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",
       
 38590       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, {})
       
 38591     })]
       
 38592   });
       
 38593 }
       
 38594 
       
 38595 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js
       
 38596 /**
       
 38597  * WordPress dependencies
       
 38598  */
       
 38599 
       
 38600 
       
 38601 
       
 38602 
       
 38603 
       
 38604 /**
       
 38605  * Internal dependencies
       
 38606  */
       
 38607 
       
 38608 
       
 38609 
       
 38610 
       
 38611 const navigation_menu_editor_noop = () => {};
       
 38612 function NavigationMenuEditor({
       
 38613   navigationMenuId
       
 38614 }) {
       
 38615   const {
       
 38616     storedSettings
       
 38617   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 38618     const {
       
 38619       getSettings
       
 38620     } = lock_unlock_unlock(select(store));
       
 38621     return {
       
 38622       storedSettings: getSettings()
       
 38623     };
       
 38624   }, []);
       
 38625   const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 38626     if (!navigationMenuId) {
       
 38627       return [];
       
 38628     }
       
 38629     return [(0,external_wp_blocks_namespaceObject.createBlock)('core/navigation', {
       
 38630       ref: navigationMenuId
       
 38631     })];
       
 38632   }, [navigationMenuId]);
       
 38633   if (!navigationMenuId || !blocks?.length) {
 12809     return null;
 38634     return null;
 12810   }
 38635   }
 12811 
 38636   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockEditorProvider, {
 12812   return (0,external_wp_element_namespaceObject.createElement)("header", {
 38637     settings: storedSettings,
 12813     className: "edit-site-list-header"
 38638     value: blocks,
 12814   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
 38639     onChange: navigation_menu_editor_noop,
 12815     level: 1,
 38640     onInput: navigation_menu_editor_noop,
 12816     className: "edit-site-list-header__title"
 38641     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 12817   }, (_postType$labels = postType.labels) === null || _postType$labels === void 0 ? void 0 : _postType$labels.name), (0,external_wp_element_namespaceObject.createElement)("div", {
 38642       className: "edit-site-sidebar-navigation-screen-navigation-menus__content",
 12818     className: "edit-site-list-header__right"
 38643       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationMenuContent, {
 12819   }, (0,external_wp_element_namespaceObject.createElement)(AddNewTemplate, {
 38644         rootClientId: blocks[0].clientId
 12820     templateType: templateType
 38645       })
 12821   })));
 38646     })
 12822 }
 38647   });
 12823 
 38648 }
 12824 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/is-template-removable.js
 38649 
 12825 /**
 38650 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js
 12826  * Check if a template is removable.
 38651 /**
 12827  *
 38652  * WordPress dependencies
 12828  * @param {Object} template The template entity to check.
 38653  */
 12829  * @return {boolean} Whether the template is revertable.
 38654 
 12830  */
 38655 
 12831 function isTemplateRemovable(template) {
 38656 
 12832   if (!template) {
 38657 // Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.
 12833     return false;
 38658 function buildNavigationLabel(title, id, status) {
       
 38659   if (!title?.rendered) {
       
 38660     /* translators: %s is the index of the menu in the list of menus. */
       
 38661     return (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('(no title %s)'), id);
 12834   }
 38662   }
 12835 
 38663   if (status === 'publish') {
 12836   return template.source === 'custom' && !template.has_theme_file;
 38664     return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title?.rendered);
 12837 }
 38665   }
 12838 
 38666   return (0,external_wp_i18n_namespaceObject.sprintf)(
 12839 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/actions/rename-menu-item.js
 38667   // translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).
 12840 
 38668   (0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title?.rendered), status);
 12841 
 38669 }
       
 38670 
       
 38671 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js
 12842 /**
 38672 /**
 12843  * WordPress dependencies
 38673  * WordPress dependencies
 12844  */
 38674  */
 12845 
 38675 
 12846 
 38676 
 12847 
 38677 /**
 12848 
 38678  * Internal dependencies
 12849 
 38679  */
 12850 
 38680 
 12851 function RenameMenuItem(_ref) {
 38681 
 12852   let {
 38682 
 12853     template,
 38683 
 12854     onClose
 38684 
 12855   } = _ref;
 38685 
 12856   const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)(() => template.title.rendered);
 38686 function SingleNavigationMenu({
 12857   const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
 38687   navigationMenu,
       
 38688   backPath,
       
 38689   handleDelete,
       
 38690   handleDuplicate,
       
 38691   handleSave
       
 38692 }) {
       
 38693   const menuTitle = navigationMenu?.title?.rendered;
       
 38694   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenWrapper, {
       
 38695     actions: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 38696       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ScreenNavigationMoreMenu, {
       
 38697         menuId: navigationMenu?.id,
       
 38698         menuTitle: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menuTitle),
       
 38699         onDelete: handleDelete,
       
 38700         onSave: handleSave,
       
 38701         onDuplicate: handleDuplicate
       
 38702       })
       
 38703     }),
       
 38704     backPath: backPath,
       
 38705     title: buildNavigationLabel(navigationMenu?.title, navigationMenu?.id, navigationMenu?.status),
       
 38706     description: (0,external_wp_i18n_namespaceObject.__)('Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'),
       
 38707     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationMenuEditor, {
       
 38708       navigationMenuId: navigationMenu?.id
       
 38709     })
       
 38710   });
       
 38711 }
       
 38712 
       
 38713 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/index.js
       
 38714 /**
       
 38715  * WordPress dependencies
       
 38716  */
       
 38717 
       
 38718 
       
 38719 
       
 38720 
       
 38721 
       
 38722 
       
 38723 
       
 38724 /**
       
 38725  * Internal dependencies
       
 38726  */
       
 38727 
       
 38728 
       
 38729 
       
 38730 
       
 38731 
       
 38732 
       
 38733 
       
 38734 const {
       
 38735   useLocation: sidebar_navigation_screen_navigation_menu_useLocation
       
 38736 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 38737 const postType = `wp_navigation`;
       
 38738 function SidebarNavigationScreenNavigationMenu({
       
 38739   backPath
       
 38740 }) {
 12858   const {
 38741   const {
 12859     editEntityRecord,
 38742     params: {
 12860     saveEditedEntityRecord
 38743       postId
       
 38744     }
       
 38745   } = sidebar_navigation_screen_navigation_menu_useLocation();
       
 38746   const {
       
 38747     record: navigationMenu,
       
 38748     isResolving
       
 38749   } = (0,external_wp_coreData_namespaceObject.useEntityRecord)('postType', postType, postId);
       
 38750   const {
       
 38751     isSaving,
       
 38752     isDeleting
       
 38753   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 38754     const {
       
 38755       isSavingEntityRecord,
       
 38756       isDeletingEntityRecord
       
 38757     } = select(external_wp_coreData_namespaceObject.store);
       
 38758     return {
       
 38759       isSaving: isSavingEntityRecord('postType', postType, postId),
       
 38760       isDeleting: isDeletingEntityRecord('postType', postType, postId)
       
 38761     };
       
 38762   }, [postId]);
       
 38763   const isLoading = isResolving || isSaving || isDeleting;
       
 38764   const menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;
       
 38765   const {
       
 38766     handleSave,
       
 38767     handleDelete,
       
 38768     handleDuplicate
       
 38769   } = useNavigationMenuHandlers();
       
 38770   const _handleDelete = () => handleDelete(navigationMenu);
       
 38771   const _handleSave = edits => handleSave(navigationMenu, edits);
       
 38772   const _handleDuplicate = () => handleDuplicate(navigationMenu);
       
 38773   if (isLoading) {
       
 38774     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenWrapper, {
       
 38775       description: (0,external_wp_i18n_namespaceObject.__)('Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'),
       
 38776       backPath: backPath,
       
 38777       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {
       
 38778         className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
       
 38779       })
       
 38780     });
       
 38781   }
       
 38782   if (!isLoading && !navigationMenu) {
       
 38783     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenWrapper, {
       
 38784       description: (0,external_wp_i18n_namespaceObject.__)('Navigation Menu missing.'),
       
 38785       backPath: backPath
       
 38786     });
       
 38787   }
       
 38788   if (!navigationMenu?.content?.raw) {
       
 38789     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenWrapper, {
       
 38790       actions: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ScreenNavigationMoreMenu, {
       
 38791         menuId: navigationMenu?.id,
       
 38792         menuTitle: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menuTitle),
       
 38793         onDelete: _handleDelete,
       
 38794         onSave: _handleSave,
       
 38795         onDuplicate: _handleDuplicate
       
 38796       }),
       
 38797       backPath: backPath,
       
 38798       title: buildNavigationLabel(navigationMenu?.title, navigationMenu?.id, navigationMenu?.status),
       
 38799       description: (0,external_wp_i18n_namespaceObject.__)('This Navigation Menu is empty.')
       
 38800     });
       
 38801   }
       
 38802   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SingleNavigationMenu, {
       
 38803     navigationMenu: navigationMenu,
       
 38804     backPath: backPath,
       
 38805     handleDelete: _handleDelete,
       
 38806     handleSave: _handleSave,
       
 38807     handleDuplicate: _handleDuplicate
       
 38808   });
       
 38809 }
       
 38810 
       
 38811 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js
       
 38812 /**
       
 38813  * WordPress dependencies
       
 38814  */
       
 38815 
       
 38816 
       
 38817 
       
 38818 
       
 38819 
       
 38820 
       
 38821 /**
       
 38822  * Internal dependencies
       
 38823  */
       
 38824 
       
 38825 
       
 38826 
       
 38827 const {
       
 38828   useHistory: use_navigation_menu_handlers_useHistory
       
 38829 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 38830 function useDeleteNavigationMenu() {
       
 38831   const {
       
 38832     deleteEntityRecord
 12861   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
 38833   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
 12862   const {
 38834   const {
 12863     createSuccessNotice,
 38835     createSuccessNotice,
 12864     createErrorNotice
 38836     createErrorNotice
 12865   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 38837   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 12866 
 38838   const history = use_navigation_menu_handlers_useHistory();
 12867   if (!template.is_custom) {
 38839   const handleDelete = async navigationMenu => {
 12868     return null;
 38840     const postId = navigationMenu?.id;
 12869   }
       
 12870 
       
 12871   async function onTemplateRename(event) {
       
 12872     event.preventDefault();
       
 12873 
       
 12874     try {
 38841     try {
 12875       await editEntityRecord('postType', template.type, template.id, {
 38842       await deleteEntityRecord('postType', postType, postId, {
 12876         title
 38843         force: true
 12877       }); // Update state before saving rerenders the list.
 38844       }, {
 12878 
       
 12879       setTitle('');
       
 12880       setIsModalOpen(false);
       
 12881       onClose(); // Persist edited entity.
       
 12882 
       
 12883       await saveEditedEntityRecord('postType', template.type, template.id, {
       
 12884         throwOnError: true
 38845         throwOnError: true
 12885       });
 38846       });
 12886       createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Entity renamed.'), {
 38847       createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Navigation Menu successfully deleted.'), {
 12887         type: 'snackbar'
 38848         type: 'snackbar'
 12888       });
 38849       });
       
 38850       history.push({
       
 38851         postType: 'wp_navigation'
       
 38852       });
 12889     } catch (error) {
 38853     } catch (error) {
 12890       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while renaming the entity.');
 38854       createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: error message describing why the navigation menu could not be deleted. */
 12891       createErrorNotice(errorMessage, {
 38855       (0,external_wp_i18n_namespaceObject.__)(`Unable to delete Navigation Menu (%s).`), error?.message), {
 12892         type: 'snackbar'
 38856         type: 'snackbar'
 12893       });
 38857       });
 12894     }
 38858     }
 12895   }
 38859   };
 12896 
 38860   return handleDelete;
 12897   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
 38861 }
 12898     onClick: () => {
 38862 function useSaveNavigationMenu() {
 12899       setIsModalOpen(true);
       
 12900       setTitle(template.title.rendered);
       
 12901     }
       
 12902   }, (0,external_wp_i18n_namespaceObject.__)('Rename')), isModalOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
       
 12903     title: (0,external_wp_i18n_namespaceObject.__)('Rename'),
       
 12904     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close'),
       
 12905     onRequestClose: () => {
       
 12906       setIsModalOpen(false);
       
 12907     },
       
 12908     overlayClassName: "edit-site-list__rename-modal"
       
 12909   }, (0,external_wp_element_namespaceObject.createElement)("form", {
       
 12910     onSubmit: onTemplateRename
       
 12911   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, {
       
 12912     align: "flex-start",
       
 12913     gap: 8
       
 12914   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
       
 12915     label: (0,external_wp_i18n_namespaceObject.__)('Name'),
       
 12916     value: title,
       
 12917     onChange: setTitle,
       
 12918     required: true
       
 12919   }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, {
       
 12920     className: "edit-site-list__rename-modal-actions",
       
 12921     justify: "flex-end",
       
 12922     expanded: false
       
 12923   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 12924     variant: "tertiary",
       
 12925     onClick: () => {
       
 12926       setIsModalOpen(false);
       
 12927     }
       
 12928   }, (0,external_wp_i18n_namespaceObject.__)('Cancel'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
       
 12929     variant: "primary",
       
 12930     type: "submit"
       
 12931   }, (0,external_wp_i18n_namespaceObject.__)('Save')))))));
       
 12932 }
       
 12933 
       
 12934 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/actions/index.js
       
 12935 
       
 12936 
       
 12937 /**
       
 12938  * WordPress dependencies
       
 12939  */
       
 12940 
       
 12941 
       
 12942 
       
 12943 
       
 12944 
       
 12945 
       
 12946 /**
       
 12947  * Internal dependencies
       
 12948  */
       
 12949 
       
 12950 
       
 12951 
       
 12952 
       
 12953 
       
 12954 function Actions(_ref) {
       
 12955   let {
       
 12956     template
       
 12957   } = _ref;
       
 12958   const {
 38863   const {
 12959     removeTemplate,
 38864     getEditedEntityRecord
 12960     revertTemplate
 38865   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 12961   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
 38866     const {
       
 38867       getEditedEntityRecord: getEditedEntityRecordSelector
       
 38868     } = select(external_wp_coreData_namespaceObject.store);
       
 38869     return {
       
 38870       getEditedEntityRecord: getEditedEntityRecordSelector
       
 38871     };
       
 38872   }, []);
 12962   const {
 38873   const {
 12963     saveEditedEntityRecord
 38874     editEntityRecord,
       
 38875     __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
 12964   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
 38876   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
 12965   const {
 38877   const {
 12966     createSuccessNotice,
 38878     createSuccessNotice,
 12967     createErrorNotice
 38879     createErrorNotice
 12968   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 38880   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 12969   const isRemovable = isTemplateRemovable(template);
 38881   const handleSave = async (navigationMenu, edits) => {
 12970   const isRevertable = isTemplateRevertable(template);
 38882     if (!edits) {
 12971 
 38883       return;
 12972   if (!isRemovable && !isRevertable) {
 38884     }
 12973     return null;
 38885     const postId = navigationMenu?.id;
 12974   }
 38886     // Prepare for revert in case of error.
 12975 
 38887     const originalRecord = getEditedEntityRecord('postType', NAVIGATION_POST_TYPE, postId);
 12976   async function revertAndSaveTemplate() {
 38888 
       
 38889     // Apply the edits.
       
 38890     editEntityRecord('postType', postType, postId, edits);
       
 38891     const recordPropertiesToSave = Object.keys(edits);
       
 38892 
       
 38893     // Attempt to persist.
 12977     try {
 38894     try {
 12978       await revertTemplate(template, {
 38895       await saveSpecifiedEntityEdits('postType', postType, postId, recordPropertiesToSave, {
 12979         allowUndo: false
 38896         throwOnError: true
 12980       });
 38897       });
 12981       await saveEditedEntityRecord('postType', template.type, template.id);
 38898       createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Renamed Navigation Menu'), {
 12982       createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Entity reverted.'), {
       
 12983         type: 'snackbar'
 38899         type: 'snackbar'
 12984       });
 38900       });
 12985     } catch (error) {
 38901     } catch (error) {
 12986       const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while reverting the entity.');
 38902       // Revert to original in case of error.
 12987       createErrorNotice(errorMessage, {
 38903       editEntityRecord('postType', postType, postId, originalRecord);
       
 38904       createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: error message describing why the navigation menu could not be renamed. */
       
 38905       (0,external_wp_i18n_namespaceObject.__)(`Unable to rename Navigation Menu (%s).`), error?.message), {
 12988         type: 'snackbar'
 38906         type: 'snackbar'
 12989       });
 38907       });
 12990     }
 38908     }
       
 38909   };
       
 38910   return handleSave;
       
 38911 }
       
 38912 function useDuplicateNavigationMenu() {
       
 38913   const history = use_navigation_menu_handlers_useHistory();
       
 38914   const {
       
 38915     saveEntityRecord
       
 38916   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 38917   const {
       
 38918     createSuccessNotice,
       
 38919     createErrorNotice
       
 38920   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
       
 38921   const handleDuplicate = async navigationMenu => {
       
 38922     const menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;
       
 38923     try {
       
 38924       const savedRecord = await saveEntityRecord('postType', postType, {
       
 38925         title: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Navigation menu title */
       
 38926         (0,external_wp_i18n_namespaceObject.__)('%s (Copy)'), menuTitle),
       
 38927         content: navigationMenu?.content?.raw,
       
 38928         status: 'publish'
       
 38929       }, {
       
 38930         throwOnError: true
       
 38931       });
       
 38932       if (savedRecord) {
       
 38933         createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Duplicated Navigation Menu'), {
       
 38934           type: 'snackbar'
       
 38935         });
       
 38936         history.push({
       
 38937           postType: postType,
       
 38938           postId: savedRecord.id
       
 38939         });
       
 38940       }
       
 38941     } catch (error) {
       
 38942       createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: error message describing why the navigation menu could not be deleted. */
       
 38943       (0,external_wp_i18n_namespaceObject.__)(`Unable to duplicate Navigation Menu (%s).`), error?.message), {
       
 38944         type: 'snackbar'
       
 38945       });
       
 38946     }
       
 38947   };
       
 38948   return handleDuplicate;
       
 38949 }
       
 38950 function useNavigationMenuHandlers() {
       
 38951   return {
       
 38952     handleDelete: useDeleteNavigationMenu(),
       
 38953     handleSave: useSaveNavigationMenu(),
       
 38954     handleDuplicate: useDuplicateNavigationMenu()
       
 38955   };
       
 38956 }
       
 38957 
       
 38958 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/index.js
       
 38959 /**
       
 38960  * WordPress dependencies
       
 38961  */
       
 38962 
       
 38963 
       
 38964 
       
 38965 
       
 38966 
       
 38967 
       
 38968 
       
 38969 /**
       
 38970  * Internal dependencies
       
 38971  */
       
 38972 
       
 38973 
       
 38974 
       
 38975 
       
 38976 
       
 38977 
       
 38978 
       
 38979 
       
 38980 
       
 38981 // Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.
       
 38982 
       
 38983 function buildMenuLabel(title, id, status) {
       
 38984   if (!title) {
       
 38985     /* translators: %s is the index of the menu in the list of menus. */
       
 38986     return (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('(no title %s)'), id);
 12991   }
 38987   }
 12992 
 38988   if (status === 'publish') {
 12993   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, {
 38989     return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title);
 12994     icon: more_vertical,
 38990   }
 12995     label: (0,external_wp_i18n_namespaceObject.__)('Actions'),
 38991   return (0,external_wp_i18n_namespaceObject.sprintf)(
 12996     className: "edit-site-list-table__actions"
 38992   // translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).
 12997   }, _ref2 => {
 38993   (0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), status);
 12998     let {
 38994 }
 12999       onClose
 38995 
 13000     } = _ref2;
 38996 // Save a boolean to prevent us creating a fallback more than once per session.
 13001     return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, isRemovable && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(RenameMenuItem, {
 38997 let hasCreatedFallback = false;
 13002       template: template,
 38998 function SidebarNavigationScreenNavigationMenus({
 13003       onClose: onClose
 38999   backPath
 13004     }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
 39000 }) {
 13005       isDestructive: true,
 39001   const {
 13006       isTertiary: true,
 39002     records: navigationMenus,
       
 39003     isResolving: isResolvingNavigationMenus,
       
 39004     hasResolved: hasResolvedNavigationMenus
       
 39005   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', NAVIGATION_POST_TYPE, PRELOADED_NAVIGATION_MENUS_QUERY);
       
 39006   const isLoading = isResolvingNavigationMenus && !hasResolvedNavigationMenus;
       
 39007   const {
       
 39008     getNavigationFallbackId
       
 39009   } = lock_unlock_unlock((0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store));
       
 39010   const firstNavigationMenu = navigationMenus?.[0];
       
 39011 
       
 39012   // Save a boolean to prevent us creating a fallback more than once per session.
       
 39013   if (firstNavigationMenu) {
       
 39014     hasCreatedFallback = true;
       
 39015   }
       
 39016 
       
 39017   // If there is no navigation menu found
       
 39018   // then trigger fallback algorithm to create one.
       
 39019   if (!firstNavigationMenu && !isResolvingNavigationMenus && hasResolvedNavigationMenus && !hasCreatedFallback) {
       
 39020     getNavigationFallbackId();
       
 39021   }
       
 39022   const {
       
 39023     handleSave,
       
 39024     handleDelete,
       
 39025     handleDuplicate
       
 39026   } = useNavigationMenuHandlers();
       
 39027   const hasNavigationMenus = !!navigationMenus?.length;
       
 39028   if (isLoading) {
       
 39029     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenWrapper, {
       
 39030       backPath: backPath,
       
 39031       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {
       
 39032         className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
       
 39033       })
       
 39034     });
       
 39035   }
       
 39036   if (!isLoading && !hasNavigationMenus) {
       
 39037     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenWrapper, {
       
 39038       description: (0,external_wp_i18n_namespaceObject.__)('No Navigation Menus found.'),
       
 39039       backPath: backPath
       
 39040     });
       
 39041   }
       
 39042 
       
 39043   // if single menu then render it
       
 39044   if (navigationMenus?.length === 1) {
       
 39045     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SingleNavigationMenu, {
       
 39046       navigationMenu: firstNavigationMenu,
       
 39047       backPath: backPath,
       
 39048       handleDelete: () => handleDelete(firstNavigationMenu),
       
 39049       handleDuplicate: () => handleDuplicate(firstNavigationMenu),
       
 39050       handleSave: edits => handleSave(firstNavigationMenu, edits)
       
 39051     });
       
 39052   }
       
 39053   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenWrapper, {
       
 39054     backPath: backPath,
       
 39055     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 39056       children: navigationMenus?.map(({
       
 39057         id,
       
 39058         title,
       
 39059         status
       
 39060       }, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavMenuItem, {
       
 39061         postId: id,
       
 39062         withChevron: true,
       
 39063         icon: library_navigation,
       
 39064         children: buildMenuLabel(title?.rendered, index + 1, status)
       
 39065       }, id))
       
 39066     })
       
 39067   });
       
 39068 }
       
 39069 function SidebarNavigationScreenWrapper({
       
 39070   children,
       
 39071   actions,
       
 39072   title,
       
 39073   description,
       
 39074   backPath
       
 39075 }) {
       
 39076   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreen, {
       
 39077     title: title || (0,external_wp_i18n_namespaceObject.__)('Navigation'),
       
 39078     actions: actions,
       
 39079     description: description || (0,external_wp_i18n_namespaceObject.__)('Manage your Navigation Menus.'),
       
 39080     backPath: backPath,
       
 39081     content: children
       
 39082   });
       
 39083 }
       
 39084 const NavMenuItem = ({
       
 39085   postId,
       
 39086   ...props
       
 39087 }) => {
       
 39088   const linkInfo = useLink({
       
 39089     postId,
       
 39090     postType: 'wp_navigation'
       
 39091   });
       
 39092   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 39093     ...linkInfo,
       
 39094     ...props
       
 39095   });
       
 39096 };
       
 39097 
       
 39098 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-dataviews/dataview-item.js
       
 39099 /**
       
 39100  * External dependencies
       
 39101  */
       
 39102 
       
 39103 
       
 39104 /**
       
 39105  * WordPress dependencies
       
 39106  */
       
 39107 
       
 39108 
       
 39109 
       
 39110 
       
 39111 /**
       
 39112  * Internal dependencies
       
 39113  */
       
 39114 
       
 39115 
       
 39116 
       
 39117 
       
 39118 
       
 39119 const {
       
 39120   useLocation: dataview_item_useLocation
       
 39121 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 39122 function DataViewItem({
       
 39123   title,
       
 39124   slug,
       
 39125   customViewId,
       
 39126   type,
       
 39127   icon,
       
 39128   isActive,
       
 39129   isCustom,
       
 39130   suffix
       
 39131 }) {
       
 39132   const {
       
 39133     params: {
       
 39134       postType,
       
 39135       layout
       
 39136     }
       
 39137   } = dataview_item_useLocation();
       
 39138   const iconToUse = icon || VIEW_LAYOUTS.find(v => v.type === type).icon;
       
 39139   let activeView = isCustom ? customViewId : slug;
       
 39140   if (activeView === 'all') {
       
 39141     activeView = undefined;
       
 39142   }
       
 39143   const linkInfo = useLink({
       
 39144     postType,
       
 39145     layout,
       
 39146     activeView,
       
 39147     isCustom: isCustom ? 'true' : undefined
       
 39148   });
       
 39149   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 39150     justify: "flex-start",
       
 39151     className: dist_clsx('edit-site-sidebar-dataviews-dataview-item', {
       
 39152       'is-selected': isActive
       
 39153     }),
       
 39154     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 39155       icon: iconToUse,
       
 39156       ...linkInfo,
       
 39157       "aria-current": isActive ? 'true' : undefined,
       
 39158       children: title
       
 39159     }), suffix]
       
 39160   });
       
 39161 }
       
 39162 
       
 39163 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/content.js
       
 39164 /**
       
 39165  * WordPress dependencies
       
 39166  */
       
 39167 
       
 39168 
       
 39169 
       
 39170 
       
 39171 /**
       
 39172  * Internal dependencies
       
 39173  */
       
 39174 
       
 39175 
       
 39176 
       
 39177 
       
 39178 
       
 39179 
       
 39180 const content_EMPTY_ARRAY = [];
       
 39181 function TemplateDataviewItem({
       
 39182   template,
       
 39183   isActive
       
 39184 }) {
       
 39185   const {
       
 39186     text,
       
 39187     icon
       
 39188   } = useAddedBy(template.type, template.id);
       
 39189   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViewItem, {
       
 39190     slug: text,
       
 39191     title: text,
       
 39192     icon: icon,
       
 39193     isActive: isActive,
       
 39194     isCustom: false
       
 39195   }, text);
       
 39196 }
       
 39197 function DataviewsTemplatesSidebarContent({
       
 39198   activeView,
       
 39199   title
       
 39200 }) {
       
 39201   const {
       
 39202     records
       
 39203   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', TEMPLATE_POST_TYPE, {
       
 39204     per_page: -1
       
 39205   });
       
 39206   const firstItemPerAuthorText = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 39207     var _ref;
       
 39208     const firstItemPerAuthor = records?.reduce((acc, template) => {
       
 39209       const author = template.author_text;
       
 39210       if (author && !acc[author]) {
       
 39211         acc[author] = template;
       
 39212       }
       
 39213       return acc;
       
 39214     }, {});
       
 39215     return (_ref = firstItemPerAuthor && Object.values(firstItemPerAuthor)) !== null && _ref !== void 0 ? _ref : content_EMPTY_ARRAY;
       
 39216   }, [records]);
       
 39217   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 39218     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViewItem, {
       
 39219       slug: "all",
       
 39220       title: title,
       
 39221       icon: library_layout,
       
 39222       isActive: activeView === 'all',
       
 39223       isCustom: false
       
 39224     }), firstItemPerAuthorText.map(template => {
       
 39225       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplateDataviewItem, {
       
 39226         template: template,
       
 39227         isActive: activeView === template.author_text
       
 39228       }, template.author_text);
       
 39229     })]
       
 39230   });
       
 39231 }
       
 39232 
       
 39233 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/index.js
       
 39234 /**
       
 39235  * WordPress dependencies
       
 39236  */
       
 39237 
       
 39238 
       
 39239 
       
 39240 /**
       
 39241  * Internal dependencies
       
 39242  */
       
 39243 
       
 39244 
       
 39245 
       
 39246 
       
 39247 const {
       
 39248   useLocation: sidebar_navigation_screen_templates_browse_useLocation
       
 39249 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 39250 function SidebarNavigationScreenTemplatesBrowse({
       
 39251   backPath
       
 39252 }) {
       
 39253   const {
       
 39254     params: {
       
 39255       activeView = 'all'
       
 39256     }
       
 39257   } = sidebar_navigation_screen_templates_browse_useLocation();
       
 39258   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreen, {
       
 39259     title: (0,external_wp_i18n_namespaceObject.__)('Templates'),
       
 39260     description: (0,external_wp_i18n_namespaceObject.__)('Create new templates, or reset any customizations made to the templates supplied by your theme.'),
       
 39261     backPath: backPath,
       
 39262     content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataviewsTemplatesSidebarContent, {
       
 39263       activeView: activeView,
       
 39264       title: (0,external_wp_i18n_namespaceObject.__)('All templates')
       
 39265     })
       
 39266   });
       
 39267 }
       
 39268 
       
 39269 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/file.js
       
 39270 /**
       
 39271  * WordPress dependencies
       
 39272  */
       
 39273 
       
 39274 
       
 39275 const file = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
 39276   viewBox: "0 0 24 24",
       
 39277   xmlns: "http://www.w3.org/2000/svg",
       
 39278   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
 39279     fillRule: "evenodd",
       
 39280     clipRule: "evenodd",
       
 39281     d: "M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"
       
 39282   })
       
 39283 });
       
 39284 /* harmony default export */ const library_file = (file);
       
 39285 
       
 39286 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-patterns/category-item.js
       
 39287 /**
       
 39288  * Internal dependencies
       
 39289  */
       
 39290 
       
 39291 
       
 39292 
       
 39293 
       
 39294 function CategoryItem({
       
 39295   count,
       
 39296   icon,
       
 39297   id,
       
 39298   isActive,
       
 39299   label,
       
 39300   type
       
 39301 }) {
       
 39302   const linkInfo = useLink({
       
 39303     categoryId: id !== TEMPLATE_PART_ALL_AREAS_CATEGORY && id !== PATTERN_DEFAULT_CATEGORY ? id : undefined,
       
 39304     postType: type === TEMPLATE_PART_POST_TYPE ? TEMPLATE_PART_POST_TYPE : PATTERN_TYPES.user
       
 39305   });
       
 39306   if (!count) {
       
 39307     return;
       
 39308   }
       
 39309   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 39310     ...linkInfo,
       
 39311     icon: icon,
       
 39312     suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
 39313       children: count
       
 39314     }),
       
 39315     "aria-current": isActive ? 'true' : undefined,
       
 39316     children: label
       
 39317   });
       
 39318 }
       
 39319 
       
 39320 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js
       
 39321 /**
       
 39322  * WordPress dependencies
       
 39323  */
       
 39324 
       
 39325 
       
 39326 
       
 39327 
       
 39328 /**
       
 39329  * Internal dependencies
       
 39330  */
       
 39331 
       
 39332 const useTemplatePartsGroupedByArea = items => {
       
 39333   const allItems = items || [];
       
 39334   const templatePartAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplatePartAreas(), []);
       
 39335 
       
 39336   // Create map of template areas ensuring that default areas are displayed before
       
 39337   // any custom registered template part areas.
       
 39338   const knownAreas = {
       
 39339     header: {},
       
 39340     footer: {},
       
 39341     sidebar: {},
       
 39342     uncategorized: {}
       
 39343   };
       
 39344   templatePartAreas.forEach(templatePartArea => knownAreas[templatePartArea.area] = {
       
 39345     ...templatePartArea,
       
 39346     templateParts: []
       
 39347   });
       
 39348   const groupedByArea = allItems.reduce((accumulator, item) => {
       
 39349     const key = accumulator[item.area] ? item.area : TEMPLATE_PART_AREA_DEFAULT_CATEGORY;
       
 39350     accumulator[key].templateParts.push(item);
       
 39351     return accumulator;
       
 39352   }, knownAreas);
       
 39353   return groupedByArea;
       
 39354 };
       
 39355 function useTemplatePartAreas() {
       
 39356   const {
       
 39357     records: templateParts,
       
 39358     isResolving: isLoading
       
 39359   } = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', TEMPLATE_PART_POST_TYPE, {
       
 39360     per_page: -1
       
 39361   });
       
 39362   return {
       
 39363     hasTemplateParts: templateParts ? !!templateParts.length : false,
       
 39364     isLoading,
       
 39365     templatePartAreas: useTemplatePartsGroupedByArea(templateParts)
       
 39366   };
       
 39367 }
       
 39368 
       
 39369 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-patterns/index.js
       
 39370 /**
       
 39371  * WordPress dependencies
       
 39372  */
       
 39373 
       
 39374 
       
 39375 
       
 39376 
       
 39377 
       
 39378 
       
 39379 
       
 39380 
       
 39381 /**
       
 39382  * Internal dependencies
       
 39383  */
       
 39384 
       
 39385 
       
 39386 
       
 39387 
       
 39388 
       
 39389 
       
 39390 
       
 39391 
       
 39392 
       
 39393 const {
       
 39394   useLocation: sidebar_navigation_screen_patterns_useLocation
       
 39395 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 39396 function CategoriesGroup({
       
 39397   templatePartAreas,
       
 39398   patternCategories,
       
 39399   currentCategory,
       
 39400   currentType
       
 39401 }) {
       
 39402   const [allPatterns, ...otherPatterns] = patternCategories;
       
 39403   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 39404     className: "edit-site-sidebar-navigation-screen-patterns__group",
       
 39405     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CategoryItem, {
       
 39406       count: Object.values(templatePartAreas).map(({
       
 39407         templateParts
       
 39408       }) => templateParts?.length || 0).reduce((acc, val) => acc + val, 0),
       
 39409       icon: (0,external_wp_editor_namespaceObject.getTemplatePartIcon)() /* no name, so it provides the fallback icon */,
       
 39410       label: (0,external_wp_i18n_namespaceObject.__)('All template parts'),
       
 39411       id: TEMPLATE_PART_ALL_AREAS_CATEGORY,
       
 39412       type: TEMPLATE_PART_POST_TYPE,
       
 39413       isActive: currentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY && currentType === TEMPLATE_PART_POST_TYPE
       
 39414     }, "all"), Object.entries(templatePartAreas).map(([area, {
       
 39415       label,
       
 39416       templateParts
       
 39417     }]) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CategoryItem, {
       
 39418       count: templateParts?.length,
       
 39419       icon: (0,external_wp_editor_namespaceObject.getTemplatePartIcon)(area),
       
 39420       label: label,
       
 39421       id: area,
       
 39422       type: TEMPLATE_PART_POST_TYPE,
       
 39423       isActive: currentCategory === area && currentType === TEMPLATE_PART_POST_TYPE
       
 39424     }, area)), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 39425       className: "edit-site-sidebar-navigation-screen-patterns__divider"
       
 39426     }), allPatterns && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CategoryItem, {
       
 39427       count: allPatterns.count,
       
 39428       label: allPatterns.label,
       
 39429       icon: library_file,
       
 39430       id: allPatterns.name,
       
 39431       type: PATTERN_TYPES.user,
       
 39432       isActive: currentCategory === `${allPatterns.name}` && currentType === PATTERN_TYPES.user
       
 39433     }, allPatterns.name), otherPatterns.map(category => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CategoryItem, {
       
 39434       count: category.count,
       
 39435       label: category.label,
       
 39436       icon: library_file,
       
 39437       id: category.name,
       
 39438       type: PATTERN_TYPES.user,
       
 39439       isActive: currentCategory === `${category.name}` && currentType === PATTERN_TYPES.user
       
 39440     }, category.name))]
       
 39441   });
       
 39442 }
       
 39443 function SidebarNavigationScreenPatterns({
       
 39444   backPath
       
 39445 }) {
       
 39446   const {
       
 39447     params: {
       
 39448       postType,
       
 39449       categoryId
       
 39450     }
       
 39451   } = sidebar_navigation_screen_patterns_useLocation();
       
 39452   const currentType = postType || PATTERN_TYPES.user;
       
 39453   const currentCategory = categoryId || (currentType === PATTERN_TYPES.user ? PATTERN_DEFAULT_CATEGORY : TEMPLATE_PART_ALL_AREAS_CATEGORY);
       
 39454   const {
       
 39455     templatePartAreas,
       
 39456     hasTemplateParts,
       
 39457     isLoading
       
 39458   } = useTemplatePartAreas();
       
 39459   const {
       
 39460     patternCategories,
       
 39461     hasPatterns
       
 39462   } = usePatternCategories();
       
 39463   const isBlockBasedTheme = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.is_block_theme, []);
       
 39464   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreen, {
       
 39465     isRoot: !isBlockBasedTheme,
       
 39466     title: (0,external_wp_i18n_namespaceObject.__)('Patterns'),
       
 39467     description: (0,external_wp_i18n_namespaceObject.__)('Manage what patterns are available when editing the site.'),
       
 39468     backPath: backPath,
       
 39469     content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 39470       children: [isLoading && (0,external_wp_i18n_namespaceObject.__)('Loading items…'), !isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 39471         children: [!hasTemplateParts && !hasPatterns && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 39472           className: "edit-site-sidebar-navigation-screen-patterns__group",
       
 39473           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItem, {
       
 39474             children: (0,external_wp_i18n_namespaceObject.__)('No items found')
       
 39475           })
       
 39476         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CategoriesGroup, {
       
 39477           templatePartAreas: templatePartAreas,
       
 39478           patternCategories: patternCategories,
       
 39479           currentCategory: currentCategory,
       
 39480           currentType: currentType
       
 39481         })]
       
 39482       })]
       
 39483     })
       
 39484   });
       
 39485 }
       
 39486 
       
 39487 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-dataviews/add-new-view.js
       
 39488 /**
       
 39489  * WordPress dependencies
       
 39490  */
       
 39491 
       
 39492 
       
 39493 
       
 39494 
       
 39495 
       
 39496 
       
 39497 
       
 39498 
       
 39499 /**
       
 39500  * Internal dependencies
       
 39501  */
       
 39502 
       
 39503 
       
 39504 
       
 39505 
       
 39506 
       
 39507 
       
 39508 const {
       
 39509   useHistory: add_new_view_useHistory
       
 39510 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 39511 function AddNewItemModalContent({
       
 39512   type,
       
 39513   setIsAdding
       
 39514 }) {
       
 39515   const history = add_new_view_useHistory();
       
 39516   const {
       
 39517     saveEntityRecord
       
 39518   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 39519   const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)('');
       
 39520   const [isSaving, setIsSaving] = (0,external_wp_element_namespaceObject.useState)(false);
       
 39521   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
       
 39522     onSubmit: async event => {
       
 39523       event.preventDefault();
       
 39524       setIsSaving(true);
       
 39525       const {
       
 39526         getEntityRecords
       
 39527       } = (0,external_wp_data_namespaceObject.resolveSelect)(external_wp_coreData_namespaceObject.store);
       
 39528       let dataViewTaxonomyId;
       
 39529       const dataViewTypeRecords = await getEntityRecords('taxonomy', 'wp_dataviews_type', {
       
 39530         slug: type
       
 39531       });
       
 39532       if (dataViewTypeRecords && dataViewTypeRecords.length > 0) {
       
 39533         dataViewTaxonomyId = dataViewTypeRecords[0].id;
       
 39534       } else {
       
 39535         const record = await saveEntityRecord('taxonomy', 'wp_dataviews_type', {
       
 39536           name: type
       
 39537         });
       
 39538         if (record && record.id) {
       
 39539           dataViewTaxonomyId = record.id;
       
 39540         }
       
 39541       }
       
 39542       const savedRecord = await saveEntityRecord('postType', 'wp_dataviews', {
       
 39543         title,
       
 39544         status: 'publish',
       
 39545         wp_dataviews_type: dataViewTaxonomyId,
       
 39546         content: JSON.stringify(DEFAULT_VIEWS[type][0].view)
       
 39547       });
       
 39548       const {
       
 39549         params: {
       
 39550           postType
       
 39551         }
       
 39552       } = history.getLocationWithParams();
       
 39553       history.push({
       
 39554         postType,
       
 39555         activeView: savedRecord.id,
       
 39556         isCustom: 'true'
       
 39557       });
       
 39558       setIsSaving(false);
       
 39559       setIsAdding(false);
       
 39560     },
       
 39561     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 39562       spacing: "5",
       
 39563       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
       
 39564         __nextHasNoMarginBottom: true,
       
 39565         label: (0,external_wp_i18n_namespaceObject.__)('Name'),
       
 39566         value: title,
       
 39567         onChange: setTitle,
       
 39568         placeholder: (0,external_wp_i18n_namespaceObject.__)('My view'),
       
 39569         className: "patterns-create-modal__name-input"
       
 39570       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 39571         justify: "right",
       
 39572         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 39573           variant: "tertiary",
       
 39574           onClick: () => {
       
 39575             setIsAdding(false);
       
 39576           },
       
 39577           children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
       
 39578         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 39579           variant: "primary",
       
 39580           type: "submit",
       
 39581           "aria-disabled": !title || isSaving,
       
 39582           isBusy: isSaving,
       
 39583           children: (0,external_wp_i18n_namespaceObject.__)('Create')
       
 39584         })]
       
 39585       })]
       
 39586     })
       
 39587   });
       
 39588 }
       
 39589 function AddNewItem({
       
 39590   type
       
 39591 }) {
       
 39592   const [isAdding, setIsAdding] = (0,external_wp_element_namespaceObject.useState)(false);
       
 39593   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 39594     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
       
 39595       icon: library_plus,
 13007       onClick: () => {
 39596       onClick: () => {
 13008         removeTemplate(template);
 39597         setIsAdding(true);
 13009         onClose();
 39598       },
       
 39599       className: "dataviews__siderbar-content-add-new-item",
       
 39600       children: (0,external_wp_i18n_namespaceObject.__)('New view')
       
 39601     }), isAdding && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 39602       title: (0,external_wp_i18n_namespaceObject.__)('Add new view'),
       
 39603       onRequestClose: () => {
       
 39604         setIsAdding(false);
       
 39605       },
       
 39606       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AddNewItemModalContent, {
       
 39607         type: type,
       
 39608         setIsAdding: setIsAdding
       
 39609       })
       
 39610     })]
       
 39611   });
       
 39612 }
       
 39613 
       
 39614 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-dataviews/custom-dataviews-list.js
       
 39615 /**
       
 39616  * WordPress dependencies
       
 39617  */
       
 39618 
       
 39619 
       
 39620 
       
 39621 
       
 39622 
       
 39623 
       
 39624 
       
 39625 
       
 39626 /**
       
 39627  * Internal dependencies
       
 39628  */
       
 39629 
       
 39630 
       
 39631 
       
 39632 
       
 39633 
       
 39634 
       
 39635 const {
       
 39636   useHistory: custom_dataviews_list_useHistory
       
 39637 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 39638 const custom_dataviews_list_EMPTY_ARRAY = [];
       
 39639 function RenameItemModalContent({
       
 39640   dataviewId,
       
 39641   currentTitle,
       
 39642   setIsRenaming
       
 39643 }) {
       
 39644   const {
       
 39645     editEntityRecord
       
 39646   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 39647   const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)(currentTitle);
       
 39648   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
       
 39649     onSubmit: async event => {
       
 39650       event.preventDefault();
       
 39651       await editEntityRecord('postType', 'wp_dataviews', dataviewId, {
       
 39652         title
       
 39653       });
       
 39654       setIsRenaming(false);
       
 39655     },
       
 39656     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
       
 39657       spacing: "5",
       
 39658       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
       
 39659         __nextHasNoMarginBottom: true,
       
 39660         label: (0,external_wp_i18n_namespaceObject.__)('Name'),
       
 39661         value: title,
       
 39662         onChange: setTitle,
       
 39663         placeholder: (0,external_wp_i18n_namespaceObject.__)('My view'),
       
 39664         className: "patterns-create-modal__name-input"
       
 39665       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 39666         justify: "right",
       
 39667         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 39668           variant: "tertiary",
       
 39669           onClick: () => {
       
 39670             setIsRenaming(false);
       
 39671           },
       
 39672           children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
       
 39673         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
 39674           variant: "primary",
       
 39675           type: "submit",
       
 39676           "aria-disabled": !title,
       
 39677           children: (0,external_wp_i18n_namespaceObject.__)('Rename')
       
 39678         })]
       
 39679       })]
       
 39680     })
       
 39681   });
       
 39682 }
       
 39683 function CustomDataViewItem({
       
 39684   dataviewId,
       
 39685   isActive
       
 39686 }) {
       
 39687   const history = custom_dataviews_list_useHistory();
       
 39688   const {
       
 39689     dataview
       
 39690   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 39691     const {
       
 39692       getEditedEntityRecord
       
 39693     } = select(external_wp_coreData_namespaceObject.store);
       
 39694     return {
       
 39695       dataview: getEditedEntityRecord('postType', 'wp_dataviews', dataviewId)
       
 39696     };
       
 39697   }, [dataviewId]);
       
 39698   const {
       
 39699     deleteEntityRecord
       
 39700   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
 39701   const type = (0,external_wp_element_namespaceObject.useMemo)(() => {
       
 39702     const viewContent = JSON.parse(dataview.content);
       
 39703     return viewContent.type;
       
 39704   }, [dataview.content]);
       
 39705   const [isRenaming, setIsRenaming] = (0,external_wp_element_namespaceObject.useState)(false);
       
 39706   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 39707     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViewItem, {
       
 39708       title: dataview.title,
       
 39709       type: type,
       
 39710       isActive: isActive,
       
 39711       isCustom: true,
       
 39712       customViewId: dataviewId,
       
 39713       suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
       
 39714         icon: more_vertical,
       
 39715         label: (0,external_wp_i18n_namespaceObject.__)('Actions'),
       
 39716         className: "edit-site-sidebar-dataviews-dataview-item__dropdown-menu",
       
 39717         toggleProps: {
       
 39718           style: {
       
 39719             color: 'inherit'
       
 39720           },
       
 39721           size: 'small'
       
 39722         },
       
 39723         children: ({
       
 39724           onClose
       
 39725         }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
       
 39726           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 39727             onClick: () => {
       
 39728               setIsRenaming(true);
       
 39729               onClose();
       
 39730             },
       
 39731             children: (0,external_wp_i18n_namespaceObject.__)('Rename')
       
 39732           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
       
 39733             onClick: async () => {
       
 39734               await deleteEntityRecord('postType', 'wp_dataviews', dataview.id, {
       
 39735                 force: true
       
 39736               });
       
 39737               if (isActive) {
       
 39738                 const {
       
 39739                   params: {
       
 39740                     postType
       
 39741                   }
       
 39742                 } = history.getLocationWithParams();
       
 39743                 history.replace({
       
 39744                   postType
       
 39745                 });
       
 39746               }
       
 39747               onClose();
       
 39748             },
       
 39749             isDestructive: true,
       
 39750             children: (0,external_wp_i18n_namespaceObject.__)('Delete')
       
 39751           })]
       
 39752         })
       
 39753       })
       
 39754     }), isRenaming && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
       
 39755       title: (0,external_wp_i18n_namespaceObject.__)('Rename view'),
       
 39756       onRequestClose: () => {
       
 39757         setIsRenaming(false);
       
 39758       },
       
 39759       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RenameItemModalContent, {
       
 39760         dataviewId: dataviewId,
       
 39761         setIsRenaming: setIsRenaming,
       
 39762         currentTitle: dataview.title
       
 39763       })
       
 39764     })]
       
 39765   });
       
 39766 }
       
 39767 function useCustomDataViews(type) {
       
 39768   const customDataViews = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 39769     const {
       
 39770       getEntityRecords
       
 39771     } = select(external_wp_coreData_namespaceObject.store);
       
 39772     const dataViewTypeRecords = getEntityRecords('taxonomy', 'wp_dataviews_type', {
       
 39773       slug: type
       
 39774     });
       
 39775     if (!dataViewTypeRecords || dataViewTypeRecords.length === 0) {
       
 39776       return custom_dataviews_list_EMPTY_ARRAY;
       
 39777     }
       
 39778     const dataViews = getEntityRecords('postType', 'wp_dataviews', {
       
 39779       wp_dataviews_type: dataViewTypeRecords[0].id,
       
 39780       orderby: 'date',
       
 39781       order: 'asc'
       
 39782     });
       
 39783     if (!dataViews) {
       
 39784       return custom_dataviews_list_EMPTY_ARRAY;
       
 39785     }
       
 39786     return dataViews;
       
 39787   });
       
 39788   return customDataViews;
       
 39789 }
       
 39790 function CustomDataViewsList({
       
 39791   type,
       
 39792   activeView,
       
 39793   isCustom
       
 39794 }) {
       
 39795   const customDataViews = useCustomDataViews(type);
       
 39796   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 39797     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
 39798       className: "edit-site-sidebar-navigation-screen-dataviews__group-header",
       
 39799       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
       
 39800         level: 2,
       
 39801         children: (0,external_wp_i18n_namespaceObject.__)('Custom Views')
       
 39802       })
       
 39803     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 39804       children: [customDataViews.map(customViewRecord => {
       
 39805         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomDataViewItem, {
       
 39806           dataviewId: customViewRecord.id,
       
 39807           isActive: isCustom && Number(activeView) === customViewRecord.id
       
 39808         }, customViewRecord.id);
       
 39809       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AddNewItem, {
       
 39810         type: type
       
 39811       })]
       
 39812     })]
       
 39813   });
       
 39814 }
       
 39815 
       
 39816 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-dataviews/index.js
       
 39817 /**
       
 39818  * WordPress dependencies
       
 39819  */
       
 39820 
       
 39821 
       
 39822 /**
       
 39823  * Internal dependencies
       
 39824  */
       
 39825 
       
 39826 
       
 39827 
       
 39828 const {
       
 39829   useLocation: sidebar_dataviews_useLocation
       
 39830 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 39831 
       
 39832 
       
 39833 
       
 39834 
       
 39835 
       
 39836 function DataViewsSidebarContent() {
       
 39837   const {
       
 39838     params: {
       
 39839       postType,
       
 39840       activeView = 'all',
       
 39841       isCustom = 'false'
       
 39842     }
       
 39843   } = sidebar_dataviews_useLocation();
       
 39844   if (!postType) {
       
 39845     return null;
       
 39846   }
       
 39847   const isCustomBoolean = isCustom === 'true';
       
 39848   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
 39849     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
       
 39850       children: DEFAULT_VIEWS[postType].map(dataview => {
       
 39851         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViewItem, {
       
 39852           slug: dataview.slug,
       
 39853           title: dataview.title,
       
 39854           icon: dataview.icon,
       
 39855           type: dataview.view.type,
       
 39856           isActive: !isCustomBoolean && dataview.slug === activeView,
       
 39857           isCustom: false
       
 39858         }, dataview.slug);
       
 39859       })
       
 39860     }), window?.__experimentalCustomViews && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomDataViewsList, {
       
 39861       activeView: activeView,
       
 39862       type: postType,
       
 39863       isCustom: true
       
 39864     })]
       
 39865   });
       
 39866 }
       
 39867 
       
 39868 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/layout/router.js
       
 39869 /**
       
 39870  * WordPress dependencies
       
 39871  */
       
 39872 
       
 39873 
       
 39874 
       
 39875 /**
       
 39876  * Internal dependencies
       
 39877  */
       
 39878 
       
 39879 
       
 39880 
       
 39881 
       
 39882 
       
 39883 
       
 39884 
       
 39885 
       
 39886 
       
 39887 
       
 39888 
       
 39889 
       
 39890 
       
 39891 
       
 39892 
       
 39893 
       
 39894 const {
       
 39895   useLocation: router_useLocation,
       
 39896   useHistory: router_useHistory
       
 39897 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
       
 39898 function useRedirectOldPaths() {
       
 39899   const history = router_useHistory();
       
 39900   const {
       
 39901     params
       
 39902   } = router_useLocation();
       
 39903   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
 39904     const {
       
 39905       postType,
       
 39906       path,
       
 39907       categoryType,
       
 39908       ...rest
       
 39909     } = params;
       
 39910     if (path === '/wp_template_part/all') {
       
 39911       history.replace({
       
 39912         postType: TEMPLATE_PART_POST_TYPE
       
 39913       });
       
 39914     }
       
 39915     if (path === '/page') {
       
 39916       history.replace({
       
 39917         postType: 'page',
       
 39918         ...rest
       
 39919       });
       
 39920     }
       
 39921     if (path === '/wp_template') {
       
 39922       history.replace({
       
 39923         postType: TEMPLATE_POST_TYPE,
       
 39924         ...rest
       
 39925       });
       
 39926     }
       
 39927     if (path === '/patterns') {
       
 39928       history.replace({
       
 39929         postType: categoryType === TEMPLATE_PART_POST_TYPE ? TEMPLATE_PART_POST_TYPE : PATTERN_TYPES.user,
       
 39930         ...rest
       
 39931       });
       
 39932     }
       
 39933     if (path === '/navigation') {
       
 39934       history.replace({
       
 39935         postType: NAVIGATION_POST_TYPE,
       
 39936         ...rest
       
 39937       });
       
 39938     }
       
 39939   }, [history, params]);
       
 39940 }
       
 39941 function useLayoutAreas() {
       
 39942   const isSiteEditorLoading = useIsSiteEditorLoading();
       
 39943   const {
       
 39944     params
       
 39945   } = router_useLocation();
       
 39946   const {
       
 39947     postType,
       
 39948     postId,
       
 39949     path,
       
 39950     layout,
       
 39951     isCustom,
       
 39952     canvas
       
 39953   } = params;
       
 39954   const hasEditCanvasMode = canvas === 'edit';
       
 39955   useRedirectOldPaths();
       
 39956 
       
 39957   // Page list
       
 39958   if (postType === 'page') {
       
 39959     const isListLayout = layout === 'list' || !layout;
       
 39960     return {
       
 39961       key: 'pages',
       
 39962       areas: {
       
 39963         sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreen, {
       
 39964           title: (0,external_wp_i18n_namespaceObject.__)('Pages'),
       
 39965           backPath: {},
       
 39966           content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataViewsSidebarContent, {})
       
 39967         }),
       
 39968         content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PagePages, {}),
       
 39969         preview: (isListLayout || hasEditCanvasMode) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 39970           isLoading: isSiteEditorLoading
       
 39971         }),
       
 39972         mobile: hasEditCanvasMode ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 39973           isLoading: isSiteEditorLoading
       
 39974         }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PagePages, {})
       
 39975       },
       
 39976       widths: {
       
 39977         content: isListLayout ? 380 : undefined
 13010       }
 39978       }
 13011     }, (0,external_wp_i18n_namespaceObject.__)('Delete'))), isRevertable && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
 39979     };
 13012       info: (0,external_wp_i18n_namespaceObject.__)('Restore to default state'),
 39980   }
 13013       onClick: () => {
 39981 
 13014         revertAndSaveTemplate();
 39982   // Templates
 13015         onClose();
 39983   if (postType === TEMPLATE_POST_TYPE) {
       
 39984     const isListLayout = isCustom !== 'true' && layout === 'list';
       
 39985     return {
       
 39986       key: 'templates',
       
 39987       areas: {
       
 39988         sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenTemplatesBrowse, {
       
 39989           backPath: {}
       
 39990         }),
       
 39991         content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PageTemplates, {}),
       
 39992         preview: (isListLayout || hasEditCanvasMode) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 39993           isLoading: isSiteEditorLoading
       
 39994         }),
       
 39995         mobile: hasEditCanvasMode ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 39996           isLoading: isSiteEditorLoading
       
 39997         }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PageTemplates, {})
       
 39998       },
       
 39999       widths: {
       
 40000         content: isListLayout ? 380 : undefined
 13016       }
 40001       }
 13017     }, (0,external_wp_i18n_namespaceObject.__)('Clear customizations')));
 40002     };
 13018   });
 40003   }
 13019 }
 40004 
 13020 
 40005   // Patterns
 13021 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plugins.js
 40006   if ([TEMPLATE_PART_POST_TYPE, PATTERN_TYPES.user].includes(postType)) {
       
 40007     return {
       
 40008       key: 'patterns',
       
 40009       areas: {
       
 40010         sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenPatterns, {
       
 40011           backPath: {}
       
 40012         }),
       
 40013         content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataviewsPatterns, {}),
       
 40014         mobile: hasEditCanvasMode ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40015           isLoading: isSiteEditorLoading
       
 40016         }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataviewsPatterns, {}),
       
 40017         preview: hasEditCanvasMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40018           isLoading: isSiteEditorLoading
       
 40019         })
       
 40020       }
       
 40021     };
       
 40022   }
       
 40023 
       
 40024   // Styles
       
 40025   if (path === '/wp_global_styles') {
       
 40026     return {
       
 40027       key: 'styles',
       
 40028       areas: {
       
 40029         sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenGlobalStyles, {
       
 40030           backPath: {}
       
 40031         }),
       
 40032         preview: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40033           isLoading: isSiteEditorLoading
       
 40034         }),
       
 40035         mobile: hasEditCanvasMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40036           isLoading: isSiteEditorLoading
       
 40037         })
       
 40038       }
       
 40039     };
       
 40040   }
       
 40041 
       
 40042   // Navigation
       
 40043   if (postType === NAVIGATION_POST_TYPE) {
       
 40044     if (postId) {
       
 40045       return {
       
 40046         key: 'navigation',
       
 40047         areas: {
       
 40048           sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenNavigationMenu, {
       
 40049             backPath: {
       
 40050               postType: NAVIGATION_POST_TYPE
       
 40051             }
       
 40052           }),
       
 40053           preview: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40054             isLoading: isSiteEditorLoading
       
 40055           }),
       
 40056           mobile: hasEditCanvasMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40057             isLoading: isSiteEditorLoading
       
 40058           })
       
 40059         }
       
 40060       };
       
 40061     }
       
 40062     return {
       
 40063       key: 'navigation',
       
 40064       areas: {
       
 40065         sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenNavigationMenus, {
       
 40066           backPath: {}
       
 40067         }),
       
 40068         preview: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40069           isLoading: isSiteEditorLoading
       
 40070         }),
       
 40071         mobile: hasEditCanvasMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40072           isLoading: isSiteEditorLoading
       
 40073         })
       
 40074       }
       
 40075     };
       
 40076   }
       
 40077 
       
 40078   // Fallback shows the home page preview
       
 40079   return {
       
 40080     key: 'default',
       
 40081     areas: {
       
 40082       sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationScreenMain, {}),
       
 40083       preview: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40084         isLoading: isSiteEditorLoading
       
 40085       }),
       
 40086       mobile: hasEditCanvasMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditSiteEditor, {
       
 40087         isLoading: isSiteEditorLoading
       
 40088       })
       
 40089     }
       
 40090   };
       
 40091 }
       
 40092 
       
 40093 ;// CONCATENATED MODULE: ./node_modules/@react-spring/rafz/dist/esm/index.js
       
 40094 var esm_f=esm_l(),esm_n=e=>esm_c(e,esm_f),esm_m=esm_l();esm_n.write=e=>esm_c(e,esm_m);var esm_d=esm_l();esm_n.onStart=e=>esm_c(e,esm_d);var esm_h=esm_l();esm_n.onFrame=e=>esm_c(e,esm_h);var esm_p=esm_l();esm_n.onFinish=e=>esm_c(e,esm_p);var esm_i=[];esm_n.setTimeout=(e,t)=>{let a=esm_n.now()+t,o=()=>{let F=esm_i.findIndex(z=>z.cancel==o);~F&&esm_i.splice(F,1),esm_u-=~F?1:0},s={time:a,handler:e,cancel:o};return esm_i.splice(esm_w(a),0,s),esm_u+=1,esm_v(),s};var esm_w=e=>~(~esm_i.findIndex(t=>t.time>e)||~esm_i.length);esm_n.cancel=e=>{esm_d.delete(e),esm_h.delete(e),esm_p.delete(e),esm_f.delete(e),esm_m.delete(e)};esm_n.sync=e=>{T=!0,esm_n.batchedUpdates(e),T=!1};esm_n.throttle=e=>{let t;function a(){try{e(...t)}finally{t=null}}function o(...s){t=s,esm_n.onStart(a)}return o.handler=e,o.cancel=()=>{esm_d.delete(a),t=null},o};var esm_y=typeof window<"u"?window.requestAnimationFrame:()=>{};esm_n.use=e=>esm_y=e;esm_n.now=typeof performance<"u"?()=>performance.now():Date.now;esm_n.batchedUpdates=e=>e();esm_n.catch=console.error;esm_n.frameLoop="always";esm_n.advance=()=>{esm_n.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):esm_x()};var esm_r=-1,esm_u=0,T=!1;function esm_c(e,t){T?(t.delete(e),e(0)):(t.add(e),esm_v())}function esm_v(){esm_r<0&&(esm_r=0,esm_n.frameLoop!=="demand"&&esm_y(esm_b))}function esm_R(){esm_r=-1}function esm_b(){~esm_r&&(esm_y(esm_b),esm_n.batchedUpdates(esm_x))}function esm_x(){let e=esm_r;esm_r=esm_n.now();let t=esm_w(esm_r);if(t&&(Q(esm_i.splice(0,t),a=>a.handler()),esm_u-=t),!esm_u){esm_R();return}esm_d.flush(),esm_f.flush(e?Math.min(64,esm_r-e):16.667),esm_h.flush(),esm_m.flush(),esm_p.flush()}function esm_l(){let e=new Set,t=e;return{add(a){esm_u+=t==e&&!e.has(a)?1:0,e.add(a)},delete(a){return esm_u-=t==e&&e.has(a)?1:0,e.delete(a)},flush(a){t.size&&(e=new Set,esm_u-=t.size,Q(t,o=>o(a)&&e.add(o)),esm_u+=e.size,t=e)}}}function Q(e,t){e.forEach(a=>{try{t(a)}catch(o){esm_n.catch(o)}})}var esm_S={count(){return esm_u},isRunning(){return esm_r>=0},clear(){esm_r=-1,esm_i=[],esm_d=esm_l(),esm_f=esm_l(),esm_h=esm_l(),esm_m=esm_l(),esm_p=esm_l(),esm_u=0}};
       
 40095 
       
 40096 ;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/esm/index.js
       
 40097 var ze=Object.defineProperty;var Le=(e,t)=>{for(var r in t)ze(e,r,{get:t[r],enumerable:!0})};var dist_esm_p={};Le(dist_esm_p,{assign:()=>U,colors:()=>dist_esm_c,createStringInterpolator:()=>esm_k,skipAnimation:()=>ee,to:()=>J,willAdvance:()=>dist_esm_S});function Y(){}var mt=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),dist_esm_l={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function bt(e,t){if(dist_esm_l.arr(e)){if(!dist_esm_l.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var esm_Ve=(e,t)=>e.forEach(t);function xt(e,t,r){if(dist_esm_l.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(let n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var ht=e=>dist_esm_l.und(e)?[]:dist_esm_l.arr(e)?e:[e];function Pe(e,t){if(e.size){let r=Array.from(e);e.clear(),esm_Ve(r,t)}}var yt=(e,...t)=>Pe(e,r=>r(...t)),dist_esm_h=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);var esm_k,J,dist_esm_c=null,ee=!1,dist_esm_S=Y,U=e=>{e.to&&(J=e.to),e.now&&(esm_n.now=e.now),e.colors!==void 0&&(dist_esm_c=e.colors),e.skipAnimation!=null&&(ee=e.skipAnimation),e.createStringInterpolator&&(esm_k=e.createStringInterpolator),e.requestAnimationFrame&&esm_n.use(e.requestAnimationFrame),e.batchedUpdates&&(esm_n.batchedUpdates=e.batchedUpdates),e.willAdvance&&(dist_esm_S=e.willAdvance),e.frameLoop&&(esm_n.frameLoop=e.frameLoop)};var esm_E=new Set,dist_esm_u=[],esm_H=[],A=0,qe={get idle(){return!esm_E.size&&!dist_esm_u.length},start(e){A>e.priority?(esm_E.add(e),esm_n.onStart($e)):(te(e),esm_n(B))},advance:B,sort(e){if(A)esm_n.onFrame(()=>qe.sort(e));else{let t=dist_esm_u.indexOf(e);~t&&(dist_esm_u.splice(t,1),re(e))}},clear(){dist_esm_u=[],esm_E.clear()}};function $e(){esm_E.forEach(te),esm_E.clear(),esm_n(B)}function te(e){dist_esm_u.includes(e)||re(e)}function re(e){dist_esm_u.splice(Ge(dist_esm_u,t=>t.priority>e.priority),0,e)}function B(e){let t=esm_H;for(let r=0;r<dist_esm_u.length;r++){let n=dist_esm_u[r];A=n.priority,n.idle||(dist_esm_S(n),n.advance(e),n.idle||t.push(n))}return A=0,esm_H=dist_esm_u,esm_H.length=0,dist_esm_u=t,dist_esm_u.length>0}function Ge(e,t){let r=e.findIndex(t);return r<0?e.length:r}var ne=(e,t,r)=>Math.min(Math.max(r,e),t);var It={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};var dist_esm_d="[-+]?\\d*\\.?\\d+",esm_M=dist_esm_d+"%";function C(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var oe=new RegExp("rgb"+C(dist_esm_d,dist_esm_d,dist_esm_d)),fe=new RegExp("rgba"+C(dist_esm_d,dist_esm_d,dist_esm_d,dist_esm_d)),ae=new RegExp("hsl"+C(dist_esm_d,esm_M,esm_M)),ie=new RegExp("hsla"+C(dist_esm_d,esm_M,esm_M,dist_esm_d)),se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ue=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,le=/^#([0-9a-fA-F]{6})$/,esm_ce=/^#([0-9a-fA-F]{8})$/;function be(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=le.exec(e))?parseInt(t[1]+"ff",16)>>>0:dist_esm_c&&dist_esm_c[e]!==void 0?dist_esm_c[e]:(t=oe.exec(e))?(dist_esm_y(t[1])<<24|dist_esm_y(t[2])<<16|dist_esm_y(t[3])<<8|255)>>>0:(t=fe.exec(e))?(dist_esm_y(t[1])<<24|dist_esm_y(t[2])<<16|dist_esm_y(t[3])<<8|me(t[4]))>>>0:(t=se.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=esm_ce.exec(e))?parseInt(t[1],16)>>>0:(t=ue.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ae.exec(e))?(de(esm_pe(t[1]),esm_z(t[2]),esm_z(t[3]))|255)>>>0:(t=ie.exec(e))?(de(esm_pe(t[1]),esm_z(t[2]),esm_z(t[3]))|me(t[4]))>>>0:null}function esm_j(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function de(e,t,r){let n=r<.5?r*(1+t):r+t-r*t,f=2*r-n,o=esm_j(f,n,e+1/3),i=esm_j(f,n,e),s=esm_j(f,n,e-1/3);return Math.round(o*255)<<24|Math.round(i*255)<<16|Math.round(s*255)<<8}function dist_esm_y(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function esm_pe(e){return(parseFloat(e)%360+360)%360/360}function me(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function esm_z(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function D(e){let t=be(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,n=(t&16711680)>>>16,f=(t&65280)>>>8,o=(t&255)/255;return`rgba(${r}, ${n}, ${f}, ${o})`}var W=(e,t,r)=>{if(dist_esm_l.fun(e))return e;if(dist_esm_l.arr(e))return W({range:e,output:t,extrapolate:r});if(dist_esm_l.str(e.output[0]))return esm_k(e);let n=e,f=n.output,o=n.range||[0,1],i=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",x=n.easing||(a=>a);return a=>{let F=He(a,o);return Ue(a,o[F],o[F+1],f[F],f[F+1],x,i,s,n.map)}};function Ue(e,t,r,n,f,o,i,s,x){let a=x?x(e):e;if(a<t){if(i==="identity")return a;i==="clamp"&&(a=t)}if(a>r){if(s==="identity")return a;s==="clamp"&&(a=r)}return n===f?n:t===r?e<=t?n:f:(t===-1/0?a=-a:r===1/0?a=a-t:a=(a-t)/(r-t),a=o(a),n===-1/0?a=-a:f===1/0?a=a+n:a=a*(f-n)+n,a)}function He(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var Be=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);let n=r*e,f=t==="end"?Math.floor(n):Math.ceil(n);return ne(0,1,f/e)},P=1.70158,L=P*1.525,xe=P+1,he=2*Math.PI/3,ye=2*Math.PI/4.5,V=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Lt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>xe*e*e*e-P*e*e,easeOutBack:e=>1+xe*Math.pow(e-1,3)+P*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((L+1)*2*e-L)/2:(Math.pow(2*e-2,2)*((L+1)*(e*2-2)+L)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*he),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*he)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ye))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ye)/2+1,easeInBounce:e=>1-V(1-e),easeOutBounce:V,easeInOutBounce:e=>e<.5?(1-V(1-2*e))/2:(1+V(2*e-1))/2,steps:Be};var esm_g=Symbol.for("FluidValue.get"),dist_esm_m=Symbol.for("FluidValue.observers");var Pt=e=>Boolean(e&&e[esm_g]),ve=e=>e&&e[esm_g]?e[esm_g]():e,esm_qt=e=>e[dist_esm_m]||null;function je(e,t){e.eventObserved?e.eventObserved(t):e(t)}function $t(e,t){let r=e[dist_esm_m];r&&r.forEach(n=>{je(n,t)})}var esm_ge=class{[esm_g];[dist_esm_m];constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");De(this,t)}},De=(e,t)=>Ee(e,esm_g,t);function Gt(e,t){if(e[esm_g]){let r=e[dist_esm_m];r||Ee(e,dist_esm_m,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Qt(e,t){let r=e[dist_esm_m];if(r&&r.has(t)){let n=r.size-1;n?r.delete(t):e[dist_esm_m]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Ee=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0});var O=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,esm_Oe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,K=new RegExp(`(${O.source})(%|[a-z]+)`,"i"),we=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,dist_esm_b=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;var esm_N=e=>{let[t,r]=We(e);if(!t||dist_esm_h())return e;let n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){let f=window.getComputedStyle(document.documentElement).getPropertyValue(r);return f||e}else{if(r&&dist_esm_b.test(r))return esm_N(r);if(r)return r}return e},We=e=>{let t=dist_esm_b.exec(e);if(!t)return[,];let[,r,n]=t;return[r,n]};var _,esm_Ke=(e,t,r,n,f)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${f})`,Xt=e=>{_||(_=dist_esm_c?new RegExp(`(${Object.keys(dist_esm_c).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(o=>ve(o).replace(dist_esm_b,esm_N).replace(esm_Oe,D).replace(_,D)),r=t.map(o=>o.match(O).map(Number)),f=r[0].map((o,i)=>r.map(s=>{if(!(i in s))throw Error('The arity of each "output" value must be equal');return s[i]})).map(o=>W({...e,output:o}));return o=>{let i=!K.test(t[0])&&t.find(x=>K.test(x))?.replace(O,""),s=0;return t[0].replace(O,()=>`${f[s++](o)}${i||""}`).replace(we,esm_Ke)}};var Z="react-spring: ",Te=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${Z}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Ne=Te(console.warn);function Jt(){Ne(`${Z}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var _e=Te(console.warn);function er(){_e(`${Z}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function esm_or(e){return dist_esm_l.str(e)&&(e[0]=="#"||/\d/.test(e)||!dist_esm_h()&&dist_esm_b.test(e)||e in(dist_esm_c||{}))}var dist_esm_v,q=new WeakMap,Ze=e=>e.forEach(({target:t,contentRect:r})=>q.get(t)?.forEach(n=>n(r)));function Fe(e,t){dist_esm_v||typeof ResizeObserver<"u"&&(dist_esm_v=new ResizeObserver(Ze));let r=q.get(t);return r||(r=new Set,q.set(t,r)),r.add(e),dist_esm_v&&dist_esm_v.observe(t),()=>{let n=q.get(t);!n||(n.delete(e),!n.size&&dist_esm_v&&dist_esm_v.unobserve(t))}}var esm_$=new Set,dist_esm_w,esm_Xe=()=>{let e=()=>{esm_$.forEach(t=>t({width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},Ie=e=>(esm_$.add(e),dist_esm_w||(dist_esm_w=esm_Xe()),()=>{esm_$.delete(e),!esm_$.size&&dist_esm_w&&(dist_esm_w(),dist_esm_w=void 0)});var ke=(e,{container:t=document.documentElement}={})=>t===document.documentElement?Ie(e):Fe(e,t);var Se=(e,t,r)=>t-e===0?1:(r-e)/(t-e);var esm_Ye={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},esm_G=class{callback;container;info;constructor(t,r){this.callback=t,this.container=r,this.info={time:0,x:this.createAxis(),y:this.createAxis()}}createAxis=()=>({current:0,progress:0,scrollLength:0});updateAxis=t=>{let r=this.info[t],{length:n,position:f}=esm_Ye[t];r.current=this.container[`scroll${f}`],r.scrollLength=this.container["scroll"+n]-this.container["client"+n],r.progress=Se(0,r.scrollLength,r.current)};update=()=>{this.updateAxis("x"),this.updateAxis("y")};sendEvent=()=>{this.callback(this.info)};advance=()=>{this.update(),this.sendEvent()}};var esm_T=new WeakMap,Ae=new WeakMap,X=new WeakMap,Me=e=>e===document.documentElement?window:e,yr=(e,{container:t=document.documentElement}={})=>{let r=X.get(t);r||(r=new Set,X.set(t,r));let n=new esm_G(e,t);if(r.add(n),!esm_T.has(t)){let o=()=>(r?.forEach(s=>s.advance()),!0);esm_T.set(t,o);let i=Me(t);window.addEventListener("resize",o,{passive:!0}),t!==document.documentElement&&Ae.set(t,ke(o,{container:t})),i.addEventListener("scroll",o,{passive:!0})}let f=esm_T.get(t);return Re(f),()=>{Re.cancel(f);let o=X.get(t);if(!o||(o.delete(n),o.size))return;let i=esm_T.get(t);esm_T.delete(t),i&&(Me(t).removeEventListener("scroll",i),window.removeEventListener("resize",i),Ae.get(t)?.())}};function Er(e){let t=Je(null);return t.current===null&&(t.current=e()),t.current}var esm_Q=dist_esm_h()?external_React_.useEffect:external_React_.useLayoutEffect;var Ce=()=>{let e=(0,external_React_.useRef)(!1);return esm_Q(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Mr(){let e=(0,external_React_.useState)()[1],t=Ce();return()=>{t.current&&e(Math.random())}}function Lr(e,t){let[r]=(0,external_React_.useState)(()=>({inputs:t,result:e()})),n=(0,external_React_.useRef)(),f=n.current,o=f;return o?Boolean(t&&o.inputs&&it(t,o.inputs))||(o={inputs:t,result:e()}):o=r,(0,external_React_.useEffect)(()=>{n.current=o,f==r&&(r.inputs=r.result=void 0)},[o]),o.result}function it(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var $r=e=>(0,external_React_.useEffect)(e,ut),ut=[];function Ur(e){let t=ct();return lt(()=>{t.current=e}),t.current}var Wr=()=>{let[e,t]=dt(null);return esm_Q(()=>{let r=window.matchMedia("(prefers-reduced-motion)"),n=f=>{t(f.matches),U({skipAnimation:f.matches})};return n(r),r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[]),e};
       
 40098 
       
 40099 ;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/esm/index.js
       
 40100 var animated_dist_esm_h=Symbol.for("Animated:node"),animated_dist_esm_v=e=>!!e&&e[animated_dist_esm_h]===e,dist_esm_k=e=>e&&e[animated_dist_esm_h],esm_D=(e,t)=>mt(e,animated_dist_esm_h,t),F=e=>e&&e[animated_dist_esm_h]&&e[animated_dist_esm_h].getPayload(),animated_dist_esm_c=class{payload;constructor(){esm_D(this,this)}getPayload(){return this.payload||[]}};var animated_dist_esm_l=class extends animated_dist_esm_c{constructor(r){super();this._value=r;dist_esm_l.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(r){return new animated_dist_esm_l(r)}getPayload(){return[this]}getValue(){return this._value}setValue(r,n){return dist_esm_l.num(r)&&(this.lastPosition=r,n&&(r=Math.round(r/n)*n,this.done&&(this.lastPosition=r))),this._value===r?!1:(this._value=r,!0)}reset(){let{done:r}=this;this.done=!1,dist_esm_l.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,r&&(this.lastVelocity=null),this.v0=null)}};var animated_dist_esm_d=class extends animated_dist_esm_l{_string=null;_toString;constructor(t){super(0),this._toString=W({output:[t,t]})}static create(t){return new animated_dist_esm_d(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(dist_esm_l.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=W({output:[this.getValue(),t]})),this._value=0,super.reset()}};var dist_esm_f={dependencies:null};var animated_dist_esm_u=class extends animated_dist_esm_c{constructor(r){super();this.source=r;this.setValue(r)}getValue(r){let n={};return xt(this.source,(a,i)=>{animated_dist_esm_v(a)?n[i]=a.getValue(r):Pt(a)?n[i]=ve(a):r||(n[i]=a)}),n}setValue(r){this.source=r,this.payload=this._makePayload(r)}reset(){this.payload&&esm_Ve(this.payload,r=>r.reset())}_makePayload(r){if(r){let n=new Set;return xt(r,this._addToPayload,n),Array.from(n)}}_addToPayload(r){dist_esm_f.dependencies&&Pt(r)&&dist_esm_f.dependencies.add(r);let n=F(r);n&&esm_Ve(n,a=>this.add(a))}};var animated_dist_esm_y=class extends animated_dist_esm_u{constructor(t){super(t)}static create(t){return new animated_dist_esm_y(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((n,a)=>n.setValue(t[a])).some(Boolean):(super.setValue(t.map(dist_esm_z)),!0)}};function dist_esm_z(e){return(esm_or(e)?animated_dist_esm_d:animated_dist_esm_l).create(e)}function esm_Le(e){let t=dist_esm_k(e);return t?t.constructor:dist_esm_l.arr(e)?animated_dist_esm_y:esm_or(e)?animated_dist_esm_d:animated_dist_esm_l}var dist_esm_x=(e,t)=>{let r=!dist_esm_l.fun(e)||e.prototype&&e.prototype.isReactComponent;return (0,external_React_.forwardRef)((n,a)=>{let i=(0,external_React_.useRef)(null),o=r&&(0,external_React_.useCallback)(s=>{i.current=esm_ae(a,s)},[a]),[m,T]=esm_ne(n,t),W=Mr(),P=()=>{let s=i.current;if(r&&!s)return;(s?t.applyAnimatedValues(s,m.getValue(!0)):!1)===!1&&W()},_=new animated_dist_esm_b(P,T),p=(0,external_React_.useRef)();esm_Q(()=>(p.current=_,esm_Ve(T,s=>Gt(s,_)),()=>{p.current&&(esm_Ve(p.current.deps,s=>Qt(s,p.current)),esm_n.cancel(p.current.update))})),(0,external_React_.useEffect)(P,[]),$r(()=>()=>{let s=p.current;esm_Ve(s.deps,S=>Qt(S,s))});let $=t.getComponentProps(m.getValue());return external_React_.createElement(e,{...$,ref:o})})},animated_dist_esm_b=class{constructor(t,r){this.update=t;this.deps=r}eventObserved(t){t.type=="change"&&esm_n.write(this.update)}};function esm_ne(e,t){let r=new Set;return dist_esm_f.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new animated_dist_esm_u(e),dist_esm_f.dependencies=null,[e,r]}function esm_ae(e,t){return e&&(dist_esm_l.fun(e)?e(t):e.current=t),t}var dist_esm_j=Symbol.for("AnimatedComponent"),dist_esm_Ke=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=a=>new animated_dist_esm_u(a),getComponentProps:n=a=>a}={})=>{let a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=o=>{let m=esm_I(o)||"Anonymous";return dist_esm_l.str(o)?o=i[o]||(i[o]=dist_esm_x(o,a)):o=o[dist_esm_j]||(o[dist_esm_j]=dist_esm_x(o,a)),o.displayName=`Animated(${m})`,o};return xt(e,(o,m)=>{dist_esm_l.arr(e)&&(m=esm_I(o)),i[m]=i(o)}),{animated:i}},esm_I=e=>dist_esm_l.str(e)?e:e&&dist_esm_l.str(e.displayName)?e.displayName:dist_esm_l.fun(e)&&e.name||null;
       
 40101 
       
 40102 ;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/esm/index.js
       
 40103 function dist_esm_I(t,...e){return dist_esm_l.fun(t)?t(...e):t}var esm_te=(t,e)=>t===!0||!!(e&&t&&(dist_esm_l.fun(t)?t(e):ht(t).includes(e))),et=(t,e)=>dist_esm_l.obj(t)?e&&t[e]:t;var esm_ke=(t,e)=>t.default===!0?t[e]:t.default?t.default[e]:void 0,nn=t=>t,dist_esm_ne=(t,e=nn)=>{let n=rn;t.default&&t.default!==!0&&(t=t.default,n=Object.keys(t));let r={};for(let o of n){let s=e(t[o],o);dist_esm_l.und(s)||(r[o]=s)}return r},rn=["config","onProps","onStart","onChange","onPause","onResume","onRest"],on={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function sn(t){let e={},n=0;if(xt(t,(r,o)=>{on[o]||(e[o]=r,n++)}),n)return e}function esm_de(t){let e=sn(t);if(e){let n={to:e};return xt(t,(r,o)=>o in e||(n[o]=r)),n}return{...t}}function esm_me(t){return t=ve(t),dist_esm_l.arr(t)?t.map(esm_me):esm_or(t)?dist_esm_p.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function esm_Ue(t){for(let e in t)return!0;return!1}function esm_Ee(t){return dist_esm_l.fun(t)||dist_esm_l.arr(t)&&dist_esm_l.obj(t[0])}function esm_xe(t,e){t.ref?.delete(t),e?.delete(t)}function esm_he(t,e){e&&t.ref!==e&&(t.ref?.delete(t),e.add(t),t.ref=e)}function wr(t,e,n=1e3){an(()=>{if(e){let r=0;ge(t,(o,s)=>{let a=o.current;if(a.length){let i=n*e[s];isNaN(i)?i=r:r=i,ge(a,u=>{ge(u.queue,p=>{let f=p.delay;p.delay=d=>i+dist_esm_I(f||0,d)})}),o.start()}})}else{let r=Promise.resolve();ge(t,o=>{let s=o.current;if(s.length){let a=s.map(i=>{let u=i.queue;return i.queue=[],u});r=r.then(()=>(ge(s,(i,u)=>ge(a[u]||[],p=>i.queue.push(p))),Promise.all(o.start())))}})}})}var esm_mt={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};var tt={...esm_mt.default,mass:1,damping:1,easing:Lt.linear,clamp:!1},esm_we=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,tt)}};function gt(t,e,n){n&&(n={...n},esm_ht(n,e),e={...n,...e}),esm_ht(t,e),Object.assign(t,e);for(let a in tt)t[a]==null&&(t[a]=tt[a]);let{mass:r,frequency:o,damping:s}=t;return dist_esm_l.und(o)||(o<.01&&(o=.01),s<0&&(s=0),t.tension=Math.pow(2*Math.PI/o,2)*r,t.friction=4*Math.PI*s*r/o),t}function esm_ht(t,e){if(!dist_esm_l.und(e.decay))t.duration=void 0;else{let n=!dist_esm_l.und(e.tension)||!dist_esm_l.und(e.friction);(n||!dist_esm_l.und(e.frequency)||!dist_esm_l.und(e.damping)||!dist_esm_l.und(e.mass))&&(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}}var esm_yt=[],dist_esm_Le=class{changed=!1;values=esm_yt;toValues=null;fromValues=esm_yt;to;from;config=new esm_we;immediate=!1};function esm_Me(t,{key:e,props:n,defaultProps:r,state:o,actions:s}){return new Promise((a,i)=>{let u,p,f=esm_te(n.cancel??r?.cancel,e);if(f)b();else{dist_esm_l.und(n.pause)||(o.paused=esm_te(n.pause,e));let c=r?.pause;c!==!0&&(c=o.paused||esm_te(c,e)),u=dist_esm_I(n.delay||0,e),c?(o.resumeQueue.add(m),s.pause()):(s.resume(),m())}function d(){o.resumeQueue.add(m),o.timeouts.delete(p),p.cancel(),u=p.time-esm_n.now()}function m(){u>0&&!dist_esm_p.skipAnimation?(o.delayed=!0,p=esm_n.setTimeout(b,u),o.pauseQueue.add(d),o.timeouts.add(p)):b()}function b(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(p),t<=(o.cancelId||0)&&(f=!0);try{s.start({...n,callId:t,cancel:f},a)}catch(c){i(c)}}})}var esm_be=(t,e)=>e.length==1?e[0]:e.some(n=>n.cancelled)?esm_q(t.get()):e.every(n=>n.noop)?nt(t.get()):dist_esm_E(t.get(),e.every(n=>n.finished)),nt=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),dist_esm_E=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),esm_q=t=>({value:t,cancelled:!0,finished:!1});function esm_De(t,e,n,r){let{callId:o,parentId:s,onRest:a}=e,{asyncTo:i,promise:u}=n;return!s&&t===i&&!e.reset?u:n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;let p=dist_esm_ne(e,(l,h)=>h==="onRest"?void 0:l),f,d,m=new Promise((l,h)=>(f=l,d=h)),b=l=>{let h=o<=(n.cancelId||0)&&esm_q(r)||o!==n.asyncId&&dist_esm_E(r,!1);if(h)throw l.result=h,d(l),l},c=(l,h)=>{let g=new esm_Ae,x=new esm_Ne;return(async()=>{if(dist_esm_p.skipAnimation)throw esm_oe(n),x.result=dist_esm_E(r,!1),d(x),x;b(g);let S=dist_esm_l.obj(l)?{...l}:{...h,to:l};S.parentId=o,xt(p,(V,_)=>{dist_esm_l.und(S[_])&&(S[_]=V)});let A=await r.start(S);return b(g),n.paused&&await new Promise(V=>{n.resumeQueue.add(V)}),A})()},P;if(dist_esm_p.skipAnimation)return esm_oe(n),dist_esm_E(r,!1);try{let l;dist_esm_l.arr(t)?l=(async h=>{for(let g of h)await c(g)})(t):l=Promise.resolve(t(c,r.stop.bind(r))),await Promise.all([l.then(f),m]),P=dist_esm_E(r.get(),!0,!1)}catch(l){if(l instanceof esm_Ae)P=l.result;else if(l instanceof esm_Ne)P=l.result;else throw l}finally{o==n.asyncId&&(n.asyncId=s,n.asyncTo=s?i:void 0,n.promise=s?u:void 0)}return dist_esm_l.fun(a)&&esm_n.batchedUpdates(()=>{a(P,r,r.item)}),P})()}function esm_oe(t,e){Pe(t.timeouts,n=>n.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var esm_Ae=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},esm_Ne=class extends Error{result;constructor(){super("SkipAnimationSignal")}};var esm_Re=t=>t instanceof esm_X,Sn=1,esm_X=class extends esm_ge{id=Sn++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=dist_esm_k(this);return e&&e.getValue()}to(...e){return dist_esm_p.to(this,e)}interpolate(...e){return Jt(),dist_esm_p.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,n=!1){$t(this,{type:"change",parent:this,value:e,idle:n})}_onPriorityChange(e){this.idle||qe.sort(this),$t(this,{type:"priority",parent:this,priority:e})}};var esm_se=Symbol.for("SpringPhase"),esm_bt=1,rt=2,ot=4,esm_qe=t=>(t[esm_se]&esm_bt)>0,dist_esm_Q=t=>(t[esm_se]&rt)>0,esm_ye=t=>(t[esm_se]&ot)>0,st=(t,e)=>e?t[esm_se]|=rt|esm_bt:t[esm_se]&=~rt,esm_it=(t,e)=>e?t[esm_se]|=ot:t[esm_se]&=~ot;var esm_ue=class extends esm_X{key;animation=new dist_esm_Le;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,n){if(super(),!dist_esm_l.und(e)||!dist_esm_l.und(n)){let r=dist_esm_l.obj(e)?{...e}:{...n,from:e};dist_esm_l.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(dist_esm_Q(this)||this._state.asyncTo)||esm_ye(this)}get goal(){return ve(this.animation.to)}get velocity(){let e=dist_esm_k(this);return e instanceof animated_dist_esm_l?e.lastVelocity||0:e.getPayload().map(n=>n.lastVelocity||0)}get hasAnimated(){return esm_qe(this)}get isAnimating(){return dist_esm_Q(this)}get isPaused(){return esm_ye(this)}get isDelayed(){return this._state.delayed}advance(e){let n=!0,r=!1,o=this.animation,{config:s,toValues:a}=o,i=F(o.to);!i&&Pt(o.to)&&(a=ht(ve(o.to))),o.values.forEach((f,d)=>{if(f.done)return;let m=f.constructor==animated_dist_esm_d?1:i?i[d].lastPosition:a[d],b=o.immediate,c=m;if(!b){if(c=f.lastPosition,s.tension<=0){f.done=!0;return}let P=f.elapsedTime+=e,l=o.fromValues[d],h=f.v0!=null?f.v0:f.v0=dist_esm_l.arr(s.velocity)?s.velocity[d]:s.velocity,g,x=s.precision||(l==m?.005:Math.min(1,Math.abs(m-l)*.001));if(dist_esm_l.und(s.duration))if(s.decay){let S=s.decay===!0?.998:s.decay,A=Math.exp(-(1-S)*P);c=l+h/(1-S)*(1-A),b=Math.abs(f.lastPosition-c)<=x,g=h*A}else{g=f.lastVelocity==null?h:f.lastVelocity;let S=s.restVelocity||x/10,A=s.clamp?0:s.bounce,V=!dist_esm_l.und(A),_=l==m?f.v0>0:l<m,v,w=!1,C=1,$=Math.ceil(e/C);for(let L=0;L<$&&(v=Math.abs(g)>S,!(!v&&(b=Math.abs(m-c)<=x,b)));++L){V&&(w=c==m||c>m==_,w&&(g=-g*A,c=m));let N=-s.tension*1e-6*(c-m),y=-s.friction*.001*g,T=(N+y)/s.mass;g=g+T*C,c=c+g*C}}else{let S=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,f.durationProgress>0&&(f.elapsedTime=s.duration*f.durationProgress,P=f.elapsedTime+=e)),S=(s.progress||0)+P/this._memoizedDuration,S=S>1?1:S<0?0:S,f.durationProgress=S),c=l+s.easing(S)*(m-l),g=(c-f.lastPosition)/e,b=S==1}f.lastVelocity=g,Number.isNaN(c)&&(console.warn("Got NaN while animating:",this),b=!0)}i&&!i[d].done&&(b=!1),b?f.done=!0:n=!1,f.setValue(c,s.round)&&(r=!0)});let u=dist_esm_k(this),p=u.getValue();if(n){let f=ve(o.to);(p!==f||r)&&!s.decay?(u.setValue(f),this._onChange(f)):r&&s.decay&&this._onChange(p),this._stop()}else r&&this._onChange(p)}set(e){return esm_n.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(dist_esm_Q(this)){let{to:e,config:n}=this.animation;esm_n.batchedUpdates(()=>{this._onStart(),n.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,n){let r;return dist_esm_l.und(e)?(r=this.queue||[],this.queue=[]):r=[dist_esm_l.obj(e)?e:{...n,to:e}],Promise.all(r.map(o=>this._update(o))).then(o=>esm_be(this,o))}stop(e){let{to:n}=this.animation;return this._focus(this.get()),esm_oe(this._state,e&&this._lastCallId),esm_n.batchedUpdates(()=>this._stop(n,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){let n=this.key||"",{to:r,from:o}=e;r=dist_esm_l.obj(r)?r[n]:r,(r==null||esm_Ee(r))&&(r=void 0),o=dist_esm_l.obj(o)?o[n]:o,o==null&&(o=void 0);let s={to:r,from:o};return esm_qe(this)||(e.reverse&&([r,o]=[o,r]),o=ve(o),dist_esm_l.und(o)?dist_esm_k(this)||this._set(r):this._set(o)),s}_update({...e},n){let{key:r,defaultProps:o}=this;e.default&&Object.assign(o,dist_esm_ne(e,(i,u)=>/^on/.test(u)?et(i,r):i)),_t(this,e,"onProps"),esm_Ie(this,"onProps",e,this);let s=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return esm_Me(++this._lastCallId,{key:r,props:e,defaultProps:o,state:a,actions:{pause:()=>{esm_ye(this)||(esm_it(this,!0),yt(a.pauseQueue),esm_Ie(this,"onPause",dist_esm_E(this,esm_Ce(this,this.animation.to)),this))},resume:()=>{esm_ye(this)&&(esm_it(this,!1),dist_esm_Q(this)&&this._resume(),yt(a.resumeQueue),esm_Ie(this,"onResume",dist_esm_E(this,esm_Ce(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(i=>{if(e.loop&&i.finished&&!(n&&i.noop)){let u=at(e);if(u)return this._update(u,!0)}return i})}_merge(e,n,r){if(n.cancel)return this.stop(!0),r(esm_q(this));let o=!dist_esm_l.und(e.to),s=!dist_esm_l.und(e.from);if(o||s)if(n.callId>this._lastToId)this._lastToId=n.callId;else return r(esm_q(this));let{key:a,defaultProps:i,animation:u}=this,{to:p,from:f}=u,{to:d=p,from:m=f}=e;s&&!o&&(!n.default||dist_esm_l.und(d))&&(d=m),n.reverse&&([d,m]=[m,d]);let b=!bt(m,f);b&&(u.from=m),m=ve(m);let c=!bt(d,p);c&&this._focus(d);let P=esm_Ee(n.to),{config:l}=u,{decay:h,velocity:g}=l;(o||s)&&(l.velocity=0),n.config&&!P&&gt(l,dist_esm_I(n.config,a),n.config!==i.config?dist_esm_I(i.config,a):void 0);let x=dist_esm_k(this);if(!x||dist_esm_l.und(d))return r(dist_esm_E(this,!0));let S=dist_esm_l.und(n.reset)?s&&!n.default:!dist_esm_l.und(m)&&esm_te(n.reset,a),A=S?m:this.get(),V=esm_me(d),_=dist_esm_l.num(V)||dist_esm_l.arr(V)||esm_or(V),v=!P&&(!_||esm_te(i.immediate||n.immediate,a));if(c){let L=esm_Le(d);if(L!==x.constructor)if(v)x=this._set(V);else throw Error(`Cannot animate between ${x.constructor.name} and ${L.name}, as the "to" prop suggests`)}let w=x.constructor,C=Pt(d),$=!1;if(!C){let L=S||!esm_qe(this)&&b;(c||L)&&($=bt(esm_me(A),V),C=!$),(!bt(u.immediate,v)&&!v||!bt(l.decay,h)||!bt(l.velocity,g))&&(C=!0)}if($&&dist_esm_Q(this)&&(u.changed&&!S?C=!0:C||this._stop(p)),!P&&((C||Pt(p))&&(u.values=x.getPayload(),u.toValues=Pt(d)?null:w==animated_dist_esm_d?[1]:ht(V)),u.immediate!=v&&(u.immediate=v,!v&&!S&&this._set(p)),C)){let{onRest:L}=u;esm_Ve(_n,y=>_t(this,n,y));let N=dist_esm_E(this,esm_Ce(this,p));yt(this._pendingCalls,N),this._pendingCalls.add(r),u.changed&&esm_n.batchedUpdates(()=>{u.changed=!S,L?.(N,this),S?dist_esm_I(i.onRest,N):u.onStart?.(N,this)})}S&&this._set(A),P?r(esm_De(n.to,n,this._state,this)):C?this._start():dist_esm_Q(this)&&!c?this._pendingCalls.add(r):r(nt(A))}_focus(e){let n=this.animation;e!==n.to&&(esm_qt(this)&&this._detach(),n.to=e,esm_qt(this)&&this._attach())}_attach(){let e=0,{to:n}=this.animation;Pt(n)&&(Gt(n,this),esm_Re(n)&&(e=n.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Pt(e)&&Qt(e,this)}_set(e,n=!0){let r=ve(e);if(!dist_esm_l.und(r)){let o=dist_esm_k(this);if(!o||!bt(r,o.getValue())){let s=esm_Le(r);!o||o.constructor!=s?esm_D(this,s.create(r)):o.setValue(r),o&&esm_n.batchedUpdates(()=>{this._onChange(r,n)})}}return dist_esm_k(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,esm_Ie(this,"onStart",dist_esm_E(this,esm_Ce(this,e.to)),this))}_onChange(e,n){n||(this._onStart(),dist_esm_I(this.animation.onChange,e,this)),dist_esm_I(this.defaultProps.onChange,e,this),super._onChange(e,n)}_start(){let e=this.animation;dist_esm_k(this).reset(ve(e.to)),e.immediate||(e.fromValues=e.values.map(n=>n.lastPosition)),dist_esm_Q(this)||(st(this,!0),esm_ye(this)||this._resume())}_resume(){dist_esm_p.skipAnimation?this.finish():qe.start(this)}_stop(e,n){if(dist_esm_Q(this)){st(this,!1);let r=this.animation;esm_Ve(r.values,s=>{s.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),$t(this,{type:"idle",parent:this});let o=n?esm_q(this.get()):dist_esm_E(this.get(),esm_Ce(this,e??r.to));yt(this._pendingCalls,o),r.changed&&(r.changed=!1,esm_Ie(this,"onRest",o,this))}}};function esm_Ce(t,e){let n=esm_me(e),r=esm_me(t.get());return bt(r,n)}function at(t,e=t.loop,n=t.to){let r=dist_esm_I(e);if(r){let o=r!==!0&&esm_de(r),s=(o||t).reverse,a=!o||o.reset;return esm_Pe({...t,loop:e,default:!1,pause:void 0,to:!s||esm_Ee(n)?n:void 0,from:a?t.from:void 0,reset:a,...o})}}function esm_Pe(t){let{to:e,from:n}=t=esm_de(t),r=new Set;return dist_esm_l.obj(e)&&Vt(e,r),dist_esm_l.obj(n)&&Vt(n,r),t.keys=r.size?Array.from(r):null,t}function Ot(t){let e=esm_Pe(t);return R.und(e.default)&&(e.default=dist_esm_ne(e)),e}function Vt(t,e){xt(t,(n,r)=>n!=null&&e.add(r))}var _n=["onStart","onRest","onChange","onPause","onResume"];function _t(t,e,n){t.animation[n]=e[n]!==esm_ke(e,n)?et(e[n],t.key):void 0}function esm_Ie(t,e,...n){t.animation[e]?.(...n),t.defaultProps[e]?.(...n)}var Fn=["onStart","onChange","onRest"],kn=1,esm_le=class{id=kn++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,n){this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((n,r)=>e[r]=n.get()),e}set(e){for(let n in e){let r=e[n];dist_esm_l.und(r)||this.springs[n].set(r)}}update(e){return e&&this.queue.push(esm_Pe(e)),this}start(e){let{queue:n}=this;return e?n=ht(e).map(esm_Pe):this.queue=[],this._flush?this._flush(this,n):(jt(this,n),esm_ze(this,n))}stop(e,n){if(e!==!!e&&(n=e),n){let r=this.springs;esm_Ve(ht(n),o=>r[o].stop(!!e))}else esm_oe(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(dist_esm_l.und(e))this.start({pause:!0});else{let n=this.springs;esm_Ve(ht(e),r=>n[r].pause())}return this}resume(e){if(dist_esm_l.und(e))this.start({pause:!1});else{let n=this.springs;esm_Ve(ht(e),r=>n[r].resume())}return this}each(e){xt(this.springs,e)}_onFrame(){let{onStart:e,onChange:n,onRest:r}=this._events,o=this._active.size>0,s=this._changed.size>0;(o&&!this._started||s&&!this._started)&&(this._started=!0,Pe(e,([u,p])=>{p.value=this.get(),u(p,this,this._item)}));let a=!o&&this._started,i=s||a&&r.size?this.get():null;s&&n.size&&Pe(n,([u,p])=>{p.value=i,u(p,this,this._item)}),a&&(this._started=!1,Pe(r,([u,p])=>{p.value=i,u(p,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;esm_n.onFrame(this._onFrame)}};function esm_ze(t,e){return Promise.all(e.map(n=>wt(t,n))).then(n=>esm_be(t,n))}async function wt(t,e,n){let{keys:r,to:o,from:s,loop:a,onRest:i,onResolve:u}=e,p=dist_esm_l.obj(e.default)&&e.default;a&&(e.loop=!1),o===!1&&(e.to=null),s===!1&&(e.from=null);let f=dist_esm_l.arr(o)||dist_esm_l.fun(o)?o:void 0;f?(e.to=void 0,e.onRest=void 0,p&&(p.onRest=void 0)):esm_Ve(Fn,P=>{let l=e[P];if(dist_esm_l.fun(l)){let h=t._events[P];e[P]=({finished:g,cancelled:x})=>{let S=h.get(l);S?(g||(S.finished=!1),x&&(S.cancelled=!0)):h.set(l,{value:null,finished:g||!1,cancelled:x||!1})},p&&(p[P]=e[P])}});let d=t._state;e.pause===!d.paused?(d.paused=e.pause,yt(e.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(e.pause=!0);let m=(r||Object.keys(t.springs)).map(P=>t.springs[P].start(e)),b=e.cancel===!0||esm_ke(e,"cancel")===!0;(f||b&&d.asyncId)&&m.push(esm_Me(++t._lastAsyncId,{props:e,state:d,actions:{pause:Y,resume:Y,start(P,l){b?(esm_oe(d,t._lastAsyncId),l(esm_q(t))):(P.onRest=i,l(esm_De(f,P,d,t)))}}})),d.paused&&await new Promise(P=>{d.resumeQueue.add(P)});let c=esm_be(t,await Promise.all(m));if(a&&c.finished&&!(n&&c.noop)){let P=at(e,a,o);if(P)return jt(t,[P]),wt(t,P,!0)}return u&&esm_n.batchedUpdates(()=>u(c,t,t.item)),c}function esm_e(t,e){let n={...t.springs};return e&&pe(Ve(e),r=>{z.und(r.keys)&&(r=esm_Pe(r)),z.obj(r.to)||(r={...r,to:void 0}),Mt(n,r,o=>esm_Lt(o))}),pt(t,n),n}function pt(t,e){Ut(e,(n,r)=>{t.springs[r]||(t.springs[r]=n,Et(n,t))})}function esm_Lt(t,e){let n=new esm_ue;return n.key=t,e&&Gt(n,e),n}function Mt(t,e,n){e.keys&&esm_Ve(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function jt(t,e){esm_Ve(e,n=>{Mt(t.springs,n,r=>esm_Lt(r,t))})}var dist_esm_H=({children:t,...e})=>{let n=(0,external_React_.useContext)(esm_Ge),r=e.pause||!!n.pause,o=e.immediate||!!n.immediate;e=Lr(()=>({pause:r,immediate:o}),[r,o]);let{Provider:s}=esm_Ge;return external_React_.createElement(s,{value:e},t)},esm_Ge=wn(dist_esm_H,{});dist_esm_H.Provider=esm_Ge.Provider;dist_esm_H.Consumer=esm_Ge.Consumer;function wn(t,e){return Object.assign(t,external_React_.createContext(e)),t.Provider._context=t,t.Consumer._context=t,t}var esm_fe=()=>{let t=[],e=function(r){Ln();let o=[];return ce(t,(s,a)=>{if(Ke.und(r))o.push(s.start());else{let i=n(r,s,a);i&&o.push(s.start(i))}}),o};e.current=t,e.add=function(r){t.includes(r)||t.push(r)},e.delete=function(r){let o=t.indexOf(r);~o&&t.splice(o,1)},e.pause=function(){return ce(t,r=>r.pause(...arguments)),this},e.resume=function(){return ce(t,r=>r.resume(...arguments)),this},e.set=function(r){ce(t,(o,s)=>{let a=Ke.fun(r)?r(s,o):r;a&&o.set(a)})},e.start=function(r){let o=[];return ce(t,(s,a)=>{if(Ke.und(r))o.push(s.start());else{let i=this._getProps(r,s,a);i&&o.push(s.start(i))}}),o},e.stop=function(){return ce(t,r=>r.stop(...arguments)),this},e.update=function(r){return ce(t,(o,s)=>o.update(this._getProps(r,o,s))),this};let n=function(r,o,s){return Ke.fun(r)?r(s,o):r};return e._getProps=n,e};function esm_He(t,e,n){let r=jn.fun(e)&&e;r&&!n&&(n=[]);let o=Xe(()=>r||arguments.length==3?esm_fe():void 0,[]),s=Nt(0),a=Dn(),i=Xe(()=>({ctrls:[],queue:[],flush(h,g){let x=esm_e(h,g);return s.current>0&&!i.queue.length&&!Object.keys(x).some(A=>!h.springs[A])?esm_ze(h,g):new Promise(A=>{pt(h,x),i.queue.push(()=>{A(esm_ze(h,g))}),a()})}}),[]),u=Nt([...i.ctrls]),p=[],f=Dt(t)||0;Xe(()=>{Ye(u.current.slice(t,f),h=>{esm_xe(h,o),h.stop(!0)}),u.current.length=t,d(f,t)},[t]),Xe(()=>{d(0,Math.min(f,t))},n);function d(h,g){for(let x=h;x<g;x++){let S=u.current[x]||(u.current[x]=new esm_le(null,i.flush)),A=r?r(x,S):e[x];A&&(p[x]=Ot(A))}}let m=u.current.map((h,g)=>esm_e(h,p[g])),b=Mn(dist_esm_H),c=Dt(b),P=b!==c&&esm_Ue(b);qn(()=>{s.current++,i.ctrls=u.current;let{queue:h}=i;h.length&&(i.queue=[],Ye(h,g=>g())),Ye(u.current,(g,x)=>{o?.add(g),P&&g.start({default:b});let S=p[x];S&&(esm_he(g,S.ref),g.ref?g.queue.push(S):g.start(S))})}),Nn(()=>()=>{Ye(i.ctrls,h=>h.stop(!0))});let l=m.map(h=>({...h}));return o?[l,o]:l}function esm_J(t,e){let n=Qn.fun(t),[[r],o]=esm_He(1,n?t:[t],n?e||[]:e);return n||arguments.length==2?[r,o]:r}var Gn=()=>esm_fe(),Xo=()=>zn(Gn)[0];var Wo=(t,e)=>{let n=Bn(()=>new esm_ue(t,e));return Kn(()=>()=>{n.stop()}),n};function esm_Qt(t,e,n){let r=qt.fun(e)&&e;r&&!n&&(n=[]);let o=!0,s,a=esm_He(t,(i,u)=>{let p=r?r(i,u):e;return s=p.ref,o=o&&p.reverse,p},n||[{}]);if(Yn(()=>{Xn(a[1].current,(i,u)=>{let p=a[1].current[u+(o?1:-1)];if(esm_he(i,s),i.ref){p&&i.update({to:p.springs});return}p?i.start({to:p.springs}):i.start()})},n),r||arguments.length==3){let i=s??a[1];return i._getProps=(u,p,f)=>{let d=qt.fun(u)?u(f,p):u;if(d){let m=i.current[f+(d.reverse?1:-1)];return m&&(d.to=m.springs),d}},a}return a[0]}function esm_Gt(t,e,n){let r=G.fun(e)&&e,{reset:o,sort:s,trail:a=0,expires:i=!0,exitBeforeEnter:u=!1,onDestroyed:p,ref:f,config:d}=r?r():e,m=Jn(()=>r||arguments.length==3?esm_fe():void 0,[]),b=zt(t),c=[],P=lt(null),l=o?null:P.current;Je(()=>{P.current=c}),$n(()=>(j(c,y=>{m?.add(y.ctrl),y.ctrl.ref=m}),()=>{j(P.current,y=>{y.expired&&clearTimeout(y.expirationId),esm_xe(y.ctrl,m),y.ctrl.stop(!0)})}));let h=tr(b,r?r():e,l),g=o&&P.current||[];Je(()=>j(g,({ctrl:y,item:T,key:F})=>{esm_xe(y,m),dist_esm_I(p,T,F)}));let x=[];if(l&&j(l,(y,T)=>{y.expired?(clearTimeout(y.expirationId),g.push(y)):(T=x[T]=h.indexOf(y.key),~T&&(c[T]=y))}),j(b,(y,T)=>{c[T]||(c[T]={key:h[T],item:y,phase:"mount",ctrl:new esm_le},c[T].ctrl.item=y)}),x.length){let y=-1,{leave:T}=r?r():e;j(x,(F,k)=>{let O=l[k];~F?(y=c.indexOf(O),c[y]={...O,item:b[F]}):T&&c.splice(++y,0,O)})}G.fun(s)&&c.sort((y,T)=>s(y.item,T.item));let S=-a,A=Wn(),V=dist_esm_ne(e),_=new Map,v=lt(new Map),w=lt(!1);j(c,(y,T)=>{let F=y.key,k=y.phase,O=r?r():e,U,D,Jt=dist_esm_I(O.delay||0,F);if(k=="mount")U=O.enter,D="enter";else{let M=h.indexOf(F)<0;if(k!="leave")if(M)U=O.leave,D="leave";else if(U=O.update)D="update";else return;else if(!M)U=O.enter,D="enter";else return}if(U=dist_esm_I(U,y.item,T),U=G.obj(U)?esm_de(U):{to:U},!U.config){let M=d||V.config;U.config=dist_esm_I(M,y.item,T,D)}S+=a;let Z={...V,delay:Jt+S,ref:f,immediate:O.immediate,reset:!1,...U};if(D=="enter"&&G.und(Z.from)){let M=r?r():e,Te=G.und(M.initial)||l?M.from:M.initial;Z.from=dist_esm_I(Te,y.item,T)}let{onResolve:Wt}=Z;Z.onResolve=M=>{dist_esm_I(Wt,M);let Te=P.current,B=Te.find(Fe=>Fe.key===F);if(!!B&&!(M.cancelled&&B.phase!="update")&&B.ctrl.idle){let Fe=Te.every(ee=>ee.ctrl.idle);if(B.phase=="leave"){let ee=dist_esm_I(i,B.item);if(ee!==!1){let Ze=ee===!0?0:ee;if(B.expired=!0,!Fe&&Ze>0){Ze<=2147483647&&(B.expirationId=setTimeout(A,Ze));return}}}Fe&&Te.some(ee=>ee.expired)&&(v.current.delete(B),u&&(w.current=!0),A())}};let ft=esm_e(y.ctrl,Z);D==="leave"&&u?v.current.set(y,{phase:D,springs:ft,payload:Z}):_.set(y,{phase:D,springs:ft,payload:Z})});let C=Hn(dist_esm_H),$=Zn(C),L=C!==$&&esm_Ue(C);Je(()=>{L&&j(c,y=>{y.ctrl.start({default:C})})},[C]),j(_,(y,T)=>{if(v.current.size){let F=c.findIndex(k=>k.key===T.key);c.splice(F,1)}}),Je(()=>{j(v.current.size?v.current:_,({phase:y,payload:T},F)=>{let{ctrl:k}=F;F.phase=y,m?.add(k),L&&y=="enter"&&k.start({default:C}),T&&(esm_he(k,T.ref),(k.ref||m)&&!w.current?k.update(T):(k.start(T),w.current&&(w.current=!1)))})},o?void 0:n);let N=y=>Oe.createElement(Oe.Fragment,null,c.map((T,F)=>{let{springs:k}=_.get(T)||T.ctrl,O=y({...k},T.item,T,F);return O&&O.type?Oe.createElement(O.type,{...O.props,key:G.str(T.key)||G.num(T.key)?T.key:T.ctrl.id,ref:O.ref}):O}));return m?[N,m]:N}var esm_er=1;function tr(t,{key:e,keys:n=e},r){if(n===null){let o=new Set;return t.map(s=>{let a=r&&r.find(i=>i.item===s&&i.phase!=="leave"&&!o.has(i));return a?(o.add(a),a.key):esm_er++})}return G.und(n)?t:G.fun(n)?t.map(n):zt(n)}var hs=({container:t,...e}={})=>{let[n,r]=esm_J(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...e}),[]);return or(()=>{let o=rr(({x:s,y:a})=>{r.start({scrollX:s.current,scrollXProgress:s.progress,scrollY:a.current,scrollYProgress:a.progress})},{container:t?.current||void 0});return()=>{nr(Object.values(n),s=>s.stop()),o()}},[]),n};var Ps=({container:t,...e})=>{let[n,r]=esm_J(()=>({width:0,height:0,...e}),[]);return ar(()=>{let o=sr(({width:s,height:a})=>{r.start({width:s,height:a,immediate:n.width.get()===0||n.height.get()===0})},{container:t?.current||void 0});return()=>{ir(Object.values(n),s=>s.stop()),o()}},[]),n};var cr={any:0,all:1};function Cs(t,e){let[n,r]=pr(!1),o=ur(),s=Bt.fun(t)&&t,a=s?s():{},{to:i={},from:u={},...p}=a,f=s?e:t,[d,m]=esm_J(()=>({from:u,...p}),[]);return lr(()=>{let b=o.current,{root:c,once:P,amount:l="any",...h}=f??{};if(!b||P&&n||typeof IntersectionObserver>"u")return;let g=new WeakMap,x=()=>(i&&m.start(i),r(!0),P?void 0:()=>{u&&m.start(u),r(!1)}),S=V=>{V.forEach(_=>{let v=g.get(_.target);if(_.isIntersecting!==Boolean(v))if(_.isIntersecting){let w=x();Bt.fun(w)?g.set(_.target,w):A.unobserve(_.target)}else v&&(v(),g.delete(_.target))})},A=new IntersectionObserver(S,{root:c&&c.current||void 0,threshold:typeof l=="number"||Array.isArray(l)?l:cr[l],...h});return A.observe(b),()=>A.unobserve(b)},[f]),s?[o,d]:[o,n]}function qs({children:t,...e}){return t(esm_J(e))}function Bs({items:t,children:e,...n}){let r=esm_Qt(t.length,n);return t.map((o,s)=>{let a=e(o,s);return fr.fun(a)?a(r[s]):a})}function Ys({items:t,children:e,...n}){return esm_Gt(t,n)(e)}var esm_W=class extends esm_X{constructor(n,r){super();this.source=n;this.calc=W(...r);let o=this._get(),s=esm_Le(o);esm_D(this,s.create(o))}key;idle=!0;calc;_active=new Set;advance(n){let r=this._get(),o=this.get();bt(r,o)||(dist_esm_k(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&Yt(this._active)&&esm_ct(this)}_get(){let n=dist_esm_l.arr(this.source)?this.source.map(ve):ht(ve(this.source));return this.calc(...n)}_start(){this.idle&&!Yt(this._active)&&(this.idle=!1,esm_Ve(F(this),n=>{n.done=!1}),dist_esm_p.skipAnimation?(esm_n.batchedUpdates(()=>this.advance()),esm_ct(this)):qe.start(this))}_attach(){let n=1;esm_Ve(ht(this.source),r=>{Pt(r)&&Gt(r,this),esm_Re(r)&&(r.idle||this._active.add(r),n=Math.max(n,r.priority+1))}),this.priority=n,this._start()}_detach(){esm_Ve(ht(this.source),n=>{Pt(n)&&Qt(n,this)}),this._active.clear(),esm_ct(this)}eventObserved(n){n.type=="change"?n.idle?this.advance():(this._active.add(n.parent),this._start()):n.type=="idle"?this._active.delete(n.parent):n.type=="priority"&&(this.priority=ht(this.source).reduce((r,o)=>Math.max(r,(esm_Re(o)?o.priority:0)+1),0))}};function vr(t){return t.idle!==!1}function Yt(t){return!t.size||Array.from(t).every(vr)}function esm_ct(t){t.idle||(t.idle=!0,esm_Ve(F(t),e=>{e.done=!0}),$t(t,{type:"idle",parent:t}))}var esm_ui=(t,...e)=>new esm_W(t,e),pi=(t,...e)=>(Cr(),new esm_W(t,e));dist_esm_p.assign({createStringInterpolator:Xt,to:(t,e)=>new esm_W(t,e)});var di=qe.advance;
       
 40104 
       
 40105 ;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/esm/index.js
       
 40106 var web_dist_esm_k=/^--/;function web_dist_esm_I(t,e){return e==null||typeof e=="boolean"||e===""?"":typeof e=="number"&&e!==0&&!web_dist_esm_k.test(t)&&!(web_dist_esm_c.hasOwnProperty(t)&&web_dist_esm_c[t])?e+"px":(""+e).trim()}var web_dist_esm_v={};function esm_V(t,e){if(!t.nodeType||!t.setAttribute)return!1;let r=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter",{style:i,children:s,scrollTop:u,scrollLeft:l,viewBox:a,...n}=e,d=Object.values(n),m=Object.keys(n).map(o=>r||t.hasAttribute(o)?o:web_dist_esm_v[o]||(web_dist_esm_v[o]=o.replace(/([A-Z])/g,p=>"-"+p.toLowerCase())));s!==void 0&&(t.textContent=s);for(let o in i)if(i.hasOwnProperty(o)){let p=web_dist_esm_I(o,i[o]);web_dist_esm_k.test(o)?t.style.setProperty(o,p):t.style[o]=p}m.forEach((o,p)=>{t.setAttribute(o,d[p])}),u!==void 0&&(t.scrollTop=u),l!==void 0&&(t.scrollLeft=l),a!==void 0&&t.setAttribute("viewBox",a)}var web_dist_esm_c={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},esm_F=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),esm_L=["Webkit","Ms","Moz","O"];web_dist_esm_c=Object.keys(web_dist_esm_c).reduce((t,e)=>(esm_L.forEach(r=>t[esm_F(r,e)]=t[e]),t),web_dist_esm_c);var esm_=/^(matrix|translate|scale|rotate|skew)/,dist_esm_$=/^(translate)/,dist_esm_G=/^(rotate|skew)/,web_dist_esm_y=(t,e)=>dist_esm_l.num(t)&&t!==0?t+e:t,web_dist_esm_h=(t,e)=>dist_esm_l.arr(t)?t.every(r=>web_dist_esm_h(r,e)):dist_esm_l.num(t)?t===e:parseFloat(t)===e,dist_esm_g=class extends animated_dist_esm_u{constructor({x:e,y:r,z:i,...s}){let u=[],l=[];(e||r||i)&&(u.push([e||0,r||0,i||0]),l.push(a=>[`translate3d(${a.map(n=>web_dist_esm_y(n,"px")).join(",")})`,web_dist_esm_h(a,0)])),xt(s,(a,n)=>{if(n==="transform")u.push([a||""]),l.push(d=>[d,d===""]);else if(esm_.test(n)){if(delete s[n],dist_esm_l.und(a))return;let d=dist_esm_$.test(n)?"px":dist_esm_G.test(n)?"deg":"";u.push(ht(a)),l.push(n==="rotate3d"?([m,o,p,O])=>[`rotate3d(${m},${o},${p},${web_dist_esm_y(O,d)})`,web_dist_esm_h(O,0)]:m=>[`${n}(${m.map(o=>web_dist_esm_y(o,d)).join(",")})`,web_dist_esm_h(m,n.startsWith("scale")?1:0)])}}),u.length&&(s.transform=new web_dist_esm_x(u,l)),super(s)}},web_dist_esm_x=class extends esm_ge{constructor(r,i){super();this.inputs=r;this.transforms=i}_value=null;get(){return this._value||(this._value=this._get())}_get(){let r="",i=!0;return esm_Ve(this.inputs,(s,u)=>{let l=ve(s[0]),[a,n]=this.transforms[u](dist_esm_l.arr(l)?l:s.map(ve));r+=" "+a,i=i&&n}),i?"none":r}observerAdded(r){r==1&&esm_Ve(this.inputs,i=>esm_Ve(i,s=>Pt(s)&&Gt(s,this)))}observerRemoved(r){r==0&&esm_Ve(this.inputs,i=>esm_Ve(i,s=>Pt(s)&&Qt(s,this)))}eventObserved(r){r.type=="change"&&(this._value=null),$t(this,r)}};var esm_C=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];dist_esm_p.assign({batchedUpdates:external_ReactDOM_namespaceObject.unstable_batchedUpdates,createStringInterpolator:Xt,colors:It});var dist_esm_q=dist_esm_Ke(esm_C,{applyAnimatedValues:esm_V,createAnimatedStyle:t=>new dist_esm_g(t),getComponentProps:({scrollTop:t,scrollLeft:e,...r})=>r}),dist_esm_it=dist_esm_q.animated;
       
 40107 
       
 40108 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/layout/animation.js
       
 40109 /**
       
 40110  * External dependencies
       
 40111  */
 13022 
 40112 
 13023 
 40113 
 13024 /**
 40114 /**
 13025  * WordPress dependencies
 40115  * WordPress dependencies
 13026  */
 40116  */
 13027 
 40117 
 13028 const plugins = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
 40118 function getAbsolutePosition(element) {
 13029   xmlns: "http://www.w3.org/2000/svg",
 40119   return {
 13030   viewBox: "0 0 24 24"
 40120     top: element.offsetTop,
 13031 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
 40121     left: element.offsetLeft
 13032   d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"
 40122   };
 13033 }));
 40123 }
 13034 /* harmony default export */ var library_plugins = (plugins);
 40124 const ANIMATION_DURATION = 400;
 13035 
 40125 
 13036 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment-author-avatar.js
 40126 /**
 13037 
 40127  * Hook used to compute the styles required to move a div into a new position.
 13038 
 40128  *
       
 40129  * The way this animation works is the following:
       
 40130  *  - It first renders the element as if there was no animation.
       
 40131  *  - It takes a snapshot of the position of the block to use it
       
 40132  *    as a destination point for the animation.
       
 40133  *  - It restores the element to the previous position using a CSS transform
       
 40134  *  - It uses the "resetAnimation" flag to reset the animation
       
 40135  *    from the beginning in order to animate to the new destination point.
       
 40136  *
       
 40137  * @param {Object} $1                          Options
       
 40138  * @param {*}      $1.triggerAnimationOnChange Variable used to trigger the animation if it changes.
       
 40139  */
       
 40140 function useMovingAnimation({
       
 40141   triggerAnimationOnChange
       
 40142 }) {
       
 40143   const ref = (0,external_wp_element_namespaceObject.useRef)();
       
 40144 
       
 40145   // Whenever the trigger changes, we need to take a snapshot of the current
       
 40146   // position of the block to use it as a destination point for the animation.
       
 40147   const {
       
 40148     previous,
       
 40149     prevRect
       
 40150   } = (0,external_wp_element_namespaceObject.useMemo)(() => ({
       
 40151     previous: ref.current && getAbsolutePosition(ref.current),
       
 40152     prevRect: ref.current && ref.current.getBoundingClientRect()
       
 40153   }),
       
 40154   // eslint-disable-next-line react-hooks/exhaustive-deps
       
 40155   [triggerAnimationOnChange]);
       
 40156   (0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
       
 40157     if (!previous || !ref.current) {
       
 40158       return;
       
 40159     }
       
 40160 
       
 40161     // We disable the animation if the user has a preference for reduced
       
 40162     // motion.
       
 40163     const disableAnimation = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
       
 40164     if (disableAnimation) {
       
 40165       return;
       
 40166     }
       
 40167     const controller = new esm_le({
       
 40168       x: 0,
       
 40169       y: 0,
       
 40170       width: prevRect.width,
       
 40171       height: prevRect.height,
       
 40172       config: {
       
 40173         duration: ANIMATION_DURATION,
       
 40174         easing: Lt.easeInOutQuint
       
 40175       },
       
 40176       onChange({
       
 40177         value
       
 40178       }) {
       
 40179         if (!ref.current) {
       
 40180           return;
       
 40181         }
       
 40182         let {
       
 40183           x,
       
 40184           y,
       
 40185           width,
       
 40186           height
       
 40187         } = value;
       
 40188         x = Math.round(x);
       
 40189         y = Math.round(y);
       
 40190         width = Math.round(width);
       
 40191         height = Math.round(height);
       
 40192         const finishedMoving = x === 0 && y === 0;
       
 40193         ref.current.style.transformOrigin = 'center center';
       
 40194         ref.current.style.transform = finishedMoving ? null // Set to `null` to explicitly remove the transform.
       
 40195         : `translate3d(${x}px,${y}px,0)`;
       
 40196         ref.current.style.width = finishedMoving ? null : `${width}px`;
       
 40197         ref.current.style.height = finishedMoving ? null : `${height}px`;
       
 40198       }
       
 40199     });
       
 40200     ref.current.style.transform = undefined;
       
 40201     const destination = ref.current.getBoundingClientRect();
       
 40202     const x = Math.round(prevRect.left - destination.left);
       
 40203     const y = Math.round(prevRect.top - destination.top);
       
 40204     const width = destination.width;
       
 40205     const height = destination.height;
       
 40206     controller.start({
       
 40207       x: 0,
       
 40208       y: 0,
       
 40209       width,
       
 40210       height,
       
 40211       from: {
       
 40212         x,
       
 40213         y,
       
 40214         width: prevRect.width,
       
 40215         height: prevRect.height
       
 40216       }
       
 40217     });
       
 40218     return () => {
       
 40219       controller.stop();
       
 40220       controller.set({
       
 40221         x: 0,
       
 40222         y: 0,
       
 40223         width: prevRect.width,
       
 40224         height: prevRect.height
       
 40225       });
       
 40226     };
       
 40227   }, [previous, prevRect]);
       
 40228   return ref;
       
 40229 }
       
 40230 /* harmony default export */ const animation = (useMovingAnimation);
       
 40231 
       
 40232 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/save-hub/index.js
 13039 /**
 40233 /**
 13040  * WordPress dependencies
 40234  * WordPress dependencies
 13041  */
 40235  */
 13042 
 40236 
 13043 const commentAuthorAvatar = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
 40237 
 13044   xmlns: "http://www.w3.org/2000/svg",
 40238 
 13045   viewBox: "0 0 24 24"
 40239 
 13046 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
 40240 
 13047   fillRule: "evenodd",
 40241 /**
 13048   d: "M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",
 40242  * Internal dependencies
 13049   clipRule: "evenodd"
 40243  */
 13050 }));
 40244 
 13051 /* harmony default export */ var comment_author_avatar = (commentAuthorAvatar);
 40245 
 13052 
 40246 
 13053 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/globe.js
 40247 function SaveHub() {
 13054 
       
 13055 
       
 13056 /**
       
 13057  * WordPress dependencies
       
 13058  */
       
 13059 
       
 13060 const globe = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
 13061   xmlns: "http://www.w3.org/2000/svg",
       
 13062   viewBox: "0 0 24 24"
       
 13063 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
 13064   d: "M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"
       
 13065 }));
       
 13066 /* harmony default export */ var library_globe = (globe);
       
 13067 
       
 13068 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/added-by.js
       
 13069 
       
 13070 
       
 13071 /**
       
 13072  * External dependencies
       
 13073  */
       
 13074 
       
 13075 /**
       
 13076  * WordPress dependencies
       
 13077  */
       
 13078 
       
 13079 
       
 13080 
       
 13081 
       
 13082 
       
 13083 
       
 13084 
       
 13085 const TEMPLATE_POST_TYPE_NAMES = ['wp_template', 'wp_template_part'];
       
 13086 
       
 13087 function CustomizedTooltip(_ref) {
       
 13088   let {
       
 13089     isCustomized,
       
 13090     children
       
 13091   } = _ref;
       
 13092 
       
 13093   if (!isCustomized) {
       
 13094     return children;
       
 13095   }
       
 13096 
       
 13097   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, {
       
 13098     text: (0,external_wp_i18n_namespaceObject.__)('This template has been customized')
       
 13099   }, children);
       
 13100 }
       
 13101 
       
 13102 function BaseAddedBy(_ref2) {
       
 13103   let {
       
 13104     text,
       
 13105     icon,
       
 13106     imageUrl,
       
 13107     isCustomized
       
 13108   } = _ref2;
       
 13109   const [isImageLoaded, setIsImageLoaded] = (0,external_wp_element_namespaceObject.useState)(false);
       
 13110   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
       
 13111     alignment: "left"
       
 13112   }, (0,external_wp_element_namespaceObject.createElement)(CustomizedTooltip, {
       
 13113     isCustomized: isCustomized
       
 13114   }, imageUrl ? (0,external_wp_element_namespaceObject.createElement)("div", {
       
 13115     className: classnames_default()('edit-site-list-added-by__avatar', {
       
 13116       'is-loaded': isImageLoaded
       
 13117     })
       
 13118   }, (0,external_wp_element_namespaceObject.createElement)("img", {
       
 13119     onLoad: () => setIsImageLoaded(true),
       
 13120     alt: "",
       
 13121     src: imageUrl
       
 13122   })) : (0,external_wp_element_namespaceObject.createElement)("div", {
       
 13123     className: classnames_default()('edit-site-list-added-by__icon', {
       
 13124       'is-customized': isCustomized
       
 13125     })
       
 13126   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
       
 13127     icon: icon
       
 13128   }))), (0,external_wp_element_namespaceObject.createElement)("span", null, text));
       
 13129 }
       
 13130 
       
 13131 function AddedByTheme(_ref3) {
       
 13132   var _theme$name;
       
 13133 
       
 13134   let {
       
 13135     slug,
       
 13136     isCustomized
       
 13137   } = _ref3;
       
 13138   const theme = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getTheme(slug), [slug]);
       
 13139   return (0,external_wp_element_namespaceObject.createElement)(BaseAddedBy, {
       
 13140     icon: library_layout,
       
 13141     text: (theme === null || theme === void 0 ? void 0 : (_theme$name = theme.name) === null || _theme$name === void 0 ? void 0 : _theme$name.rendered) || slug,
       
 13142     isCustomized: isCustomized
       
 13143   });
       
 13144 }
       
 13145 
       
 13146 function AddedByPlugin(_ref4) {
       
 13147   let {
       
 13148     slug,
       
 13149     isCustomized
       
 13150   } = _ref4;
       
 13151   const plugin = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getPlugin(slug), [slug]);
       
 13152   return (0,external_wp_element_namespaceObject.createElement)(BaseAddedBy, {
       
 13153     icon: library_plugins,
       
 13154     text: (plugin === null || plugin === void 0 ? void 0 : plugin.name) || slug,
       
 13155     isCustomized: isCustomized
       
 13156   });
       
 13157 }
       
 13158 
       
 13159 function AddedByAuthor(_ref5) {
       
 13160   var _user$avatar_urls;
       
 13161 
       
 13162   let {
       
 13163     id
       
 13164   } = _ref5;
       
 13165   const user = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getUser(id), [id]);
       
 13166   return (0,external_wp_element_namespaceObject.createElement)(BaseAddedBy, {
       
 13167     icon: comment_author_avatar,
       
 13168     imageUrl: user === null || user === void 0 ? void 0 : (_user$avatar_urls = user.avatar_urls) === null || _user$avatar_urls === void 0 ? void 0 : _user$avatar_urls[48],
       
 13169     text: user === null || user === void 0 ? void 0 : user.nickname
       
 13170   });
       
 13171 }
       
 13172 
       
 13173 function AddedBySite() {
       
 13174   const {
 40248   const {
 13175     name,
 40249     isDisabled,
 13176     logoURL
 40250     isSaving
 13177   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 40251   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
 13178     var _getMedia;
       
 13179 
       
 13180     const {
 40252     const {
 13181       getEntityRecord,
 40253       __experimentalGetDirtyEntityRecords,
 13182       getMedia
 40254       isSavingEntityRecord
 13183     } = select(external_wp_coreData_namespaceObject.store);
 40255     } = select(external_wp_coreData_namespaceObject.store);
 13184     const siteData = getEntityRecord('root', '__unstableBase');
 40256     const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
       
 40257     const _isSaving = dirtyEntityRecords.some(record => isSavingEntityRecord(record.kind, record.name, record.key));
 13185     return {
 40258     return {
 13186       name: siteData === null || siteData === void 0 ? void 0 : siteData.name,
 40259       isSaving: _isSaving,
 13187       logoURL: siteData !== null && siteData !== void 0 && siteData.site_logo ? (_getMedia = getMedia(siteData.site_logo)) === null || _getMedia === void 0 ? void 0 : _getMedia.source_url : undefined
 40260       isDisabled: _isSaving || !dirtyEntityRecords.length && !isPreviewingTheme()
 13188     };
 40261     };
 13189   }, []);
 40262   }, []);
 13190   return (0,external_wp_element_namespaceObject.createElement)(BaseAddedBy, {
 40263   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
 13191     icon: library_globe,
 40264     className: "edit-site-save-hub",
 13192     imageUrl: logoURL,
 40265     alignment: "right",
 13193     text: name
 40266     spacing: 4,
       
 40267     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SaveButton, {
       
 40268       className: "edit-site-save-hub__button",
       
 40269       variant: isDisabled ? null : 'primary',
       
 40270       showTooltip: false,
       
 40271       icon: isDisabled && !isSaving ? library_check : null,
       
 40272       showReviewMessage: true,
       
 40273       __next40pxDefaultSize: true
       
 40274     })
 13194   });
 40275   });
 13195 }
 40276 }
 13196 
 40277 
 13197 function AddedBy(_ref6) {
 40278 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/layout/index.js
 13198   let {
 40279 /**
 13199     templateType,
 40280  * External dependencies
 13200     template
 40281  */
 13201   } = _ref6;
 40282 
 13202 
 40283 
 13203   if (!template) {
 40284 /**
 13204     return;
 40285  * WordPress dependencies
       
 40286  */
       
 40287 
       
 40288 
       
 40289 
       
 40290 
       
 40291 
       
 40292 
       
 40293 
       
 40294 
       
 40295 
       
 40296 
       
 40297 
       
 40298 
       
 40299 /**
       
 40300  * Internal dependencies
       
 40301  */
       
 40302 
       
 40303 
       
 40304 
       
 40305 
       
 40306 
       
 40307 
       
 40308 
       
 40309 
       
 40310 
       
 40311 
       
 40312 
       
 40313 
       
 40314 
       
 40315 
       
 40316 
       
 40317 
       
 40318 
       
 40319 
       
 40320 
       
 40321 
       
 40322 const {
       
 40323   useCommands
       
 40324 } = lock_unlock_unlock(external_wp_coreCommands_namespaceObject.privateApis);
       
 40325 const {
       
 40326   useCommandContext
       
 40327 } = lock_unlock_unlock(external_wp_commands_namespaceObject.privateApis);
       
 40328 const {
       
 40329   useGlobalStyle: layout_useGlobalStyle
       
 40330 } = lock_unlock_unlock(external_wp_blockEditor_namespaceObject.privateApis);
       
 40331 const {
       
 40332   NavigableRegion: layout_NavigableRegion
       
 40333 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
       
 40334 const layout_ANIMATION_DURATION = 0.3;
       
 40335 function Layout() {
       
 40336   // This ensures the edited entity id and type are initialized properly.
       
 40337   useInitEditedEntityFromURL();
       
 40338   useSyncCanvasModeWithURL();
       
 40339   useCommands();
       
 40340   useEditModeCommands();
       
 40341   useCommonCommands();
       
 40342   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
       
 40343   const toggleRef = (0,external_wp_element_namespaceObject.useRef)();
       
 40344   const {
       
 40345     isDistractionFree,
       
 40346     hasFixedToolbar,
       
 40347     hasBlockSelected,
       
 40348     canvasMode,
       
 40349     previousShortcut,
       
 40350     nextShortcut
       
 40351   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 40352     const {
       
 40353       getAllShortcutKeyCombinations
       
 40354     } = select(external_wp_keyboardShortcuts_namespaceObject.store);
       
 40355     const {
       
 40356       getCanvasMode
       
 40357     } = lock_unlock_unlock(select(store));
       
 40358     return {
       
 40359       canvasMode: getCanvasMode(),
       
 40360       previousShortcut: getAllShortcutKeyCombinations('core/editor/previous-region'),
       
 40361       nextShortcut: getAllShortcutKeyCombinations('core/editor/next-region'),
       
 40362       hasFixedToolbar: select(external_wp_preferences_namespaceObject.store).get('core', 'fixedToolbar'),
       
 40363       isDistractionFree: select(external_wp_preferences_namespaceObject.store).get('core', 'distractionFree'),
       
 40364       hasBlockSelected: select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart()
       
 40365     };
       
 40366   }, []);
       
 40367   const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)({
       
 40368     previous: previousShortcut,
       
 40369     next: nextShortcut
       
 40370   });
       
 40371   const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
       
 40372   const [canvasResizer, canvasSize] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
       
 40373   const [fullResizer] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
       
 40374   const isEditorLoading = useIsSiteEditorLoading();
       
 40375   const [isResizableFrameOversized, setIsResizableFrameOversized] = (0,external_wp_element_namespaceObject.useState)(false);
       
 40376   const {
       
 40377     key: routeKey,
       
 40378     areas,
       
 40379     widths
       
 40380   } = useLayoutAreas();
       
 40381   const animationRef = animation({
       
 40382     triggerAnimationOnChange: canvasMode + '__' + routeKey
       
 40383   });
       
 40384 
       
 40385   // Sets the right context for the command palette
       
 40386   let commandContext = 'site-editor';
       
 40387   if (canvasMode === 'edit') {
       
 40388     commandContext = 'entity-edit';
 13205   }
 40389   }
 13206 
 40390   if (hasBlockSelected) {
 13207   if (TEMPLATE_POST_TYPE_NAMES.includes(templateType)) {
 40391     commandContext = 'block-selection-edit';
 13208     // Template originally provided by a theme, but customized by a user.
 40392   }
 13209     // Templates originally didn't have the 'origin' field so identify
 40393   useCommandContext(commandContext);
 13210     // older customized templates by checking for no origin and a 'theme'
 40394   const [backgroundColor] = layout_useGlobalStyle('color.background');
 13211     // or 'custom' source.
 40395   const [gradientValue] = layout_useGlobalStyle('color.gradient');
 13212     if (template.has_theme_file && (template.origin === 'theme' || !template.origin && ['theme', 'custom'].includes(template.source))) {
 40396   const previousCanvaMode = (0,external_wp_compose_namespaceObject.usePrevious)(canvasMode);
 13213       return (0,external_wp_element_namespaceObject.createElement)(AddedByTheme, {
 40397   (0,external_wp_element_namespaceObject.useEffect)(() => {
 13214         slug: template.theme,
 40398     if (previousCanvaMode === 'edit') {
 13215         isCustomized: template.source === 'custom'
 40399       toggleRef.current?.focus();
 13216       });
       
 13217     } // Template originally provided by a plugin, but customized by a user.
       
 13218 
       
 13219 
       
 13220     if (template.has_theme_file && template.origin === 'plugin') {
       
 13221       return (0,external_wp_element_namespaceObject.createElement)(AddedByPlugin, {
       
 13222         slug: template.theme,
       
 13223         isCustomized: template.source === 'custom'
       
 13224       });
       
 13225     } // Template was created from scratch, but has no author. Author support
       
 13226     // was only added to templates in WordPress 5.9. Fallback to showing the
       
 13227     // site logo and title.
       
 13228 
       
 13229 
       
 13230     if (!template.has_theme_file && template.source === 'custom' && !template.author) {
       
 13231       return (0,external_wp_element_namespaceObject.createElement)(AddedBySite, null);
       
 13232     }
 40400     }
 13233   } // Simply show the author for templates created from scratch that have an
 40401     // Should not depend on the previous canvas mode value but the next.
 13234   // author or for any other post type.
 40402     // eslint-disable-next-line react-hooks/exhaustive-deps
 13235 
 40403   }, [canvasMode]);
 13236 
 40404 
 13237   return (0,external_wp_element_namespaceObject.createElement)(AddedByAuthor, {
 40405   // Synchronizing the URL with the store value of canvasMode happens in an effect
 13238     id: template.author
 40406   // This condition ensures the component is only rendered after the synchronization happens
 13239   });
 40407   // which prevents any animations due to potential canvasMode value change.
 13240 }
 40408   if (canvasMode === 'init') {
 13241 
       
 13242 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/table.js
       
 13243 
       
 13244 
       
 13245 /**
       
 13246  * WordPress dependencies
       
 13247  */
       
 13248 
       
 13249 
       
 13250 
       
 13251 
       
 13252 
       
 13253 /**
       
 13254  * Internal dependencies
       
 13255  */
       
 13256 
       
 13257 
       
 13258 
       
 13259 
       
 13260 function Table(_ref) {
       
 13261   let {
       
 13262     templateType
       
 13263   } = _ref;
       
 13264   const {
       
 13265     records: templates,
       
 13266     isResolving: isLoading
       
 13267   } = (0,external_wp_coreData_namespaceObject.__experimentalUseEntityRecords)('postType', templateType, {
       
 13268     per_page: -1
       
 13269   });
       
 13270   const postType = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getPostType(templateType), [templateType]);
       
 13271 
       
 13272   if (!templates || isLoading) {
       
 13273     return null;
 40409     return null;
 13274   }
 40410   }
 13275 
 40411   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 13276   if (!templates.length) {
 40412     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_commands_namespaceObject.CommandMenu, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(register, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(global, {}), fullResizer, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 13277     var _postType$labels, _postType$labels$name;
 40413       ...navigateRegionsProps,
 13278 
 40414       ref: navigateRegionsProps.ref,
 13279     return (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_i18n_namespaceObject.sprintf)( // translators: The template type name, should be either "templates" or "template parts".
 40415       className: dist_clsx('edit-site-layout', navigateRegionsProps.className, {
 13280     (0,external_wp_i18n_namespaceObject.__)('No %s found.'), postType === null || postType === void 0 ? void 0 : (_postType$labels = postType.labels) === null || _postType$labels === void 0 ? void 0 : (_postType$labels$name = _postType$labels.name) === null || _postType$labels$name === void 0 ? void 0 : _postType$labels$name.toLowerCase()));
 40416         'is-distraction-free': isDistractionFree && canvasMode === 'edit',
 13281   }
 40417         'is-full-canvas': canvasMode === 'edit',
 13282 
 40418         'has-fixed-toolbar': hasFixedToolbar,
 13283   return (// These explicit aria roles are needed for Safari.
 40419         'is-block-toolbar-visible': hasBlockSelected
 13284     // See https://developer.mozilla.org/en-US/docs/Web/CSS/display#tables
 40420       }),
 13285     (0,external_wp_element_namespaceObject.createElement)("table", {
 40421       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
 13286       className: "edit-site-list-table",
 40422         className: "edit-site-layout__content",
 13287       role: "table"
 40423         children: [(!isMobileViewport || !areas.mobile) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(layout_NavigableRegion, {
 13288     }, (0,external_wp_element_namespaceObject.createElement)("thead", null, (0,external_wp_element_namespaceObject.createElement)("tr", {
 40424           ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Navigation'),
 13289       className: "edit-site-list-table-head",
 40425           className: "edit-site-layout__sidebar-region",
 13290       role: "row"
 40426           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
 13291     }, (0,external_wp_element_namespaceObject.createElement)("th", {
 40427             children: canvasMode === 'view' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__unstableMotion.div, {
 13292       className: "edit-site-list-table-column",
 40428               initial: {
 13293       role: "columnheader"
 40429                 opacity: 0
 13294     }, (0,external_wp_i18n_namespaceObject.__)('Template')), (0,external_wp_element_namespaceObject.createElement)("th", {
 40430               },
 13295       className: "edit-site-list-table-column",
 40431               animate: {
 13296       role: "columnheader"
 40432                 opacity: 1
 13297     }, (0,external_wp_i18n_namespaceObject.__)('Added by')), (0,external_wp_element_namespaceObject.createElement)("th", {
 40433               },
 13298       className: "edit-site-list-table-column",
 40434               exit: {
 13299       role: "columnheader"
 40435                 opacity: 0
 13300     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, null, (0,external_wp_i18n_namespaceObject.__)('Actions'))))), (0,external_wp_element_namespaceObject.createElement)("tbody", null, templates.map(template => {
 40436               },
 13301       var _template$title;
 40437               transition: {
 13302 
 40438                 type: 'tween',
 13303       return (0,external_wp_element_namespaceObject.createElement)("tr", {
 40439                 duration:
 13304         key: template.id,
 40440                 // Disable transition in mobile to emulate a full page transition.
 13305         className: "edit-site-list-table-row",
 40441                 disableMotion || isMobileViewport ? 0 : layout_ANIMATION_DURATION,
 13306         role: "row"
 40442                 ease: 'easeOut'
 13307       }, (0,external_wp_element_namespaceObject.createElement)("td", {
 40443               },
 13308         className: "edit-site-list-table-column",
 40444               className: "edit-site-layout__sidebar",
 13309         role: "cell"
 40445               children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(site_hub, {
 13310       }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
 40446                 ref: toggleRef,
 13311         level: 4
 40447                 isTransparent: isResizableFrameOversized
 13312       }, (0,external_wp_element_namespaceObject.createElement)(Link, {
 40448               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarContent, {
 13313         params: {
 40449                 routeKey: routeKey,
 13314           postId: template.id,
 40450                 children: areas.sidebar
 13315           postType: template.type
 40451               }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SaveHub, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SavePanel, {})]
 13316         }
 40452             })
 13317       }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(((_template$title = template.title) === null || _template$title === void 0 ? void 0 : _template$title.rendered) || template.slug))), template.description), (0,external_wp_element_namespaceObject.createElement)("td", {
 40453           })
 13318         className: "edit-site-list-table-column",
 40454         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorSnackbars, {}), isMobileViewport && areas.mobile && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
 13319         role: "cell"
 40455           className: "edit-site-layout__mobile",
 13320       }, (0,external_wp_element_namespaceObject.createElement)(AddedBy, {
 40456           children: [canvasMode !== 'edit' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarContent, {
 13321         templateType: templateType,
 40457             routeKey: routeKey,
 13322         template: template
 40458             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteHubMobile, {
 13323       })), (0,external_wp_element_namespaceObject.createElement)("td", {
 40459               ref: toggleRef,
 13324         className: "edit-site-list-table-column",
 40460               isTransparent: isResizableFrameOversized
 13325         role: "cell"
 40461             })
 13326       }, (0,external_wp_element_namespaceObject.createElement)(Actions, {
 40462           }), areas.mobile]
 13327         template: template
 40463         }), !isMobileViewport && areas.content && canvasMode !== 'edit' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 13328       })));
 40464           className: "edit-site-layout__area",
 13329     })))
 40465           style: {
 13330   );
 40466             maxWidth: widths?.content
 13331 }
 40467           },
 13332 
 40468           children: areas.content
 13333 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/index.js
 40469         }), !isMobileViewport && areas.preview && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
 13334 
 40470           className: "edit-site-layout__canvas-container",
 13335 
 40471           children: [canvasResizer, !!canvasSize.width && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 13336 /**
 40472             className: dist_clsx('edit-site-layout__canvas', {
 13337  * External dependencies
 40473               'is-right-aligned': isResizableFrameOversized
 13338  */
 40474             }),
 13339 
 40475             ref: animationRef,
       
 40476             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundary, {
       
 40477               children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(resizable_frame, {
       
 40478                 isReady: !isEditorLoading,
       
 40479                 isFullWidth: canvasMode === 'edit',
       
 40480                 defaultSize: {
       
 40481                   width: canvasSize.width - 24 /* $canvas-padding */,
       
 40482                   height: canvasSize.height
       
 40483                 },
       
 40484                 isOversized: isResizableFrameOversized,
       
 40485                 setIsOversized: setIsResizableFrameOversized,
       
 40486                 innerContentStyle: {
       
 40487                   background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor
       
 40488                 },
       
 40489                 children: areas.preview
       
 40490               })
       
 40491             })
       
 40492           })]
       
 40493         })]
       
 40494       })
       
 40495     })]
       
 40496   });
       
 40497 }
       
 40498 
       
 40499 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/app/index.js
 13340 /**
 40500 /**
 13341  * WordPress dependencies
 40501  * WordPress dependencies
 13342  */
 40502  */
 13343 
 40503 
 13344 
 40504 
 13345 
 40505 
 13346 
 40506 
 13347 
 40507 
 13348 
 40508 
 13349 
 40509 
       
 40510 
 13350 /**
 40511 /**
 13351  * Internal dependencies
 40512  * Internal dependencies
 13352  */
 40513  */
 13353 
 40514 
 13354 
 40515 
 13355 
 40516 
 13356 
 40517 
 13357 
 40518 const {
 13358 
 40519   RouterProvider
 13359 
 40520 } = lock_unlock_unlock(external_wp_router_namespaceObject.privateApis);
 13360 
 40521 const {
 13361 function List() {
 40522   GlobalStylesProvider
 13362   var _postType$labels, _postType$labels2;
 40523 } = lock_unlock_unlock(external_wp_editor_namespaceObject.privateApis);
 13363 
 40524 function App() {
 13364   const {
       
 13365     params: {
       
 13366       postType: templateType
       
 13367     }
       
 13368   } = useLocation();
       
 13369   useRegisterShortcuts();
       
 13370   const {
       
 13371     previousShortcut,
       
 13372     nextShortcut,
       
 13373     isNavigationOpen
       
 13374   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
 13375     return {
       
 13376       previousShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-site/previous-region'),
       
 13377       nextShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-site/next-region'),
       
 13378       isNavigationOpen: select(store_store).isNavigationOpened()
       
 13379     };
       
 13380   }, []);
       
 13381   const postType = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getPostType(templateType), [templateType]);
       
 13382   useTitle(postType === null || postType === void 0 ? void 0 : (_postType$labels = postType.labels) === null || _postType$labels === void 0 ? void 0 : _postType$labels.name); // `postType` could load in asynchronously. Only provide the detailed region labels if
       
 13383   // the postType has loaded, otherwise `InterfaceSkeleton` will fallback to the defaults.
       
 13384 
       
 13385   const itemsListLabel = postType === null || postType === void 0 ? void 0 : (_postType$labels2 = postType.labels) === null || _postType$labels2 === void 0 ? void 0 : _postType$labels2.items_list;
       
 13386   const detailedRegionLabels = postType ? {
       
 13387     header: (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s - the name of the page, 'Header' as in the header area of that page.
       
 13388     (0,external_wp_i18n_namespaceObject.__)('%s - Header'), itemsListLabel),
       
 13389     body: (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s - the name of the page, 'Content' as in the content area of that page.
       
 13390     (0,external_wp_i18n_namespaceObject.__)('%s - Content'), itemsListLabel)
       
 13391   } : undefined;
       
 13392   return (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
       
 13393     className: classnames_default()('edit-site-list', {
       
 13394       'is-navigation-open': isNavigationOpen
       
 13395     }),
       
 13396     labels: {
       
 13397       drawer: (0,external_wp_i18n_namespaceObject.__)('Navigation Sidebar'),
       
 13398       ...detailedRegionLabels
       
 13399     },
       
 13400     header: (0,external_wp_element_namespaceObject.createElement)(header_Header, {
       
 13401       templateType: templateType
       
 13402     }),
       
 13403     drawer: (0,external_wp_element_namespaceObject.createElement)(navigation_sidebar.Slot, null),
       
 13404     notices: (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorSnackbars, null),
       
 13405     content: (0,external_wp_element_namespaceObject.createElement)(Table, {
       
 13406       templateType: templateType
       
 13407     }),
       
 13408     shortcuts: {
       
 13409       previous: previousShortcut,
       
 13410       next: nextShortcut
       
 13411     }
       
 13412   });
       
 13413 }
       
 13414 
       
 13415 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/get-is-list-page.js
       
 13416 /**
       
 13417  * Returns if the params match the list page route.
       
 13418  *
       
 13419  * @param {Object} params          The search params.
       
 13420  * @param {string} params.postId   The post ID.
       
 13421  * @param {string} params.postType The post type.
       
 13422  * @return {boolean} Is list page or not.
       
 13423  */
       
 13424 function getIsListPage(_ref) {
       
 13425   let {
       
 13426     postId,
       
 13427     postType
       
 13428   } = _ref;
       
 13429   return !!(!postId && postType);
       
 13430 }
       
 13431 
       
 13432 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/app/index.js
       
 13433 
       
 13434 
       
 13435 /**
       
 13436  * WordPress dependencies
       
 13437  */
       
 13438 
       
 13439 
       
 13440 
       
 13441 
       
 13442 
       
 13443 
       
 13444 /**
       
 13445  * Internal dependencies
       
 13446  */
       
 13447 
       
 13448 
       
 13449 
       
 13450 
       
 13451 
       
 13452 
       
 13453 function EditSiteApp(_ref) {
       
 13454   let {
       
 13455     reboot
       
 13456   } = _ref;
       
 13457   const {
 40525   const {
 13458     createErrorNotice
 40526     createErrorNotice
 13459   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 40527   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 13460 
       
 13461   function onPluginAreaError(name) {
 40528   function onPluginAreaError(name) {
 13462     createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)(
 40529     createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: plugin name */
 13463     /* translators: %s: plugin name */
       
 13464     (0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
 40530     (0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
 13465   }
 40531   }
 13466 
 40532   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SlotFillProvider, {
 13467   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.UnsavedChangesWarning, null), (0,external_wp_element_namespaceObject.createElement)(Routes, null, _ref2 => {
 40533     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(GlobalStylesProvider, {
 13468     let {
 40534       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.UnsavedChangesWarning, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(RouterProvider, {
 13469       params
 40535         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Layout, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_plugins_namespaceObject.PluginArea, {
 13470     } = _ref2;
 40536           onError: onPluginAreaError
 13471     const isListPage = getIsListPage(params);
 40537         })]
 13472     return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isListPage ? (0,external_wp_element_namespaceObject.createElement)(List, null) : (0,external_wp_element_namespaceObject.createElement)(editor, {
 40538       })]
 13473       onError: reboot
 40539     })
 13474     }), (0,external_wp_element_namespaceObject.createElement)(external_wp_plugins_namespaceObject.PluginArea, {
 40540   });
 13475       onError: onPluginAreaError
 40541 }
 13476     }), (0,external_wp_element_namespaceObject.createElement)(navigation_sidebar // Open the navigation sidebar by default when in the list page.
 40542 
 13477     , {
 40543 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/deprecated.js
 13478       isDefaultOpen: !!isListPage,
       
 13479       activeTemplateType: isListPage ? params.postType : undefined
       
 13480     }));
       
 13481   }));
       
 13482 }
       
 13483 
       
 13484 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/plugin-sidebar/index.js
       
 13485 
       
 13486 
       
 13487 
       
 13488 /**
 40544 /**
 13489  * WordPress dependencies
 40545  * WordPress dependencies
 13490  */
 40546  */
 13491 
 40547 
 13492 /**
 40548 
 13493  * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.
 40549 
 13494  * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.
 40550 
 13495  * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:
 40551 const isSiteEditor = (0,external_wp_url_namespaceObject.getPath)(window.location.href)?.includes('site-editor.php');
 13496  *
 40552 const deprecateSlot = name => {
 13497  * ```js
 40553   external_wp_deprecated_default()(`wp.editPost.${name}`, {
 13498  * wp.data.dispatch( 'core/edit-site' ).openGeneralSidebar( 'plugin-name/sidebar-name' );
 40554     since: '6.6',
 13499  * ```
 40555     alternative: `wp.editor.${name}`
 13500  *
 40556   });
 13501  * @see PluginSidebarMoreMenuItem
 40557 };
 13502  *
 40558 
 13503  * @param {Object}                props                                 Element props.
 40559 /* eslint-disable jsdoc/require-param */
 13504  * @param {string}                props.name                            A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.
 40560 /**
 13505  * @param {string}                [props.className]                     An optional class name added to the sidebar body.
 40561  * @see PluginMoreMenuItem in @wordpress/editor package.
 13506  * @param {string}                props.title                           Title displayed at the top of the sidebar.
 40562  */
 13507  * @param {boolean}               [props.isPinnable=true]               Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.
 40563 function PluginMoreMenuItem(props) {
 13508  * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
 40564   if (!isSiteEditor) {
 13509  *
 40565     return null;
 13510  * @example
 40566   }
 13511  * ```js
 40567   deprecateSlot('PluginMoreMenuItem');
 13512  * // Using ES5 syntax
 40568   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginMoreMenuItem, {
 13513  * var __ = wp.i18n.__;
       
 13514  * var el = wp.element.createElement;
       
 13515  * var PanelBody = wp.components.PanelBody;
       
 13516  * var PluginSidebar = wp.editSite.PluginSidebar;
       
 13517  * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
       
 13518  *
       
 13519  * function MyPluginSidebar() {
       
 13520  * 	return el(
       
 13521  * 			PluginSidebar,
       
 13522  * 			{
       
 13523  * 				name: 'my-sidebar',
       
 13524  * 				title: 'My sidebar title',
       
 13525  * 				icon: moreIcon,
       
 13526  * 			},
       
 13527  * 			el(
       
 13528  * 				PanelBody,
       
 13529  * 				{},
       
 13530  * 				__( 'My sidebar content' )
       
 13531  * 			)
       
 13532  * 	);
       
 13533  * }
       
 13534  * ```
       
 13535  *
       
 13536  * @example
       
 13537  * ```jsx
       
 13538  * // Using ESNext syntax
       
 13539  * import { __ } from '@wordpress/i18n';
       
 13540  * import { PanelBody } from '@wordpress/components';
       
 13541  * import { PluginSidebar } from '@wordpress/edit-site';
       
 13542  * import { more } from '@wordpress/icons';
       
 13543  *
       
 13544  * const MyPluginSidebar = () => (
       
 13545  * 	<PluginSidebar
       
 13546  * 		name="my-sidebar"
       
 13547  * 		title="My sidebar title"
       
 13548  * 		icon={ more }
       
 13549  * 	>
       
 13550  * 		<PanelBody>
       
 13551  * 			{ __( 'My sidebar content' ) }
       
 13552  * 		</PanelBody>
       
 13553  * 	</PluginSidebar>
       
 13554  * );
       
 13555  * ```
       
 13556  */
       
 13557 
       
 13558 function PluginSidebarEditSite(_ref) {
       
 13559   let {
       
 13560     className,
       
 13561     ...props
 40569     ...props
 13562   } = _ref;
 40570   });
 13563   return (0,external_wp_element_namespaceObject.createElement)(complementary_area, extends_extends({
 40571 }
 13564     panelClassName: className,
 40572 
 13565     className: "edit-site-sidebar",
 40573 /**
 13566     scope: "core/edit-site"
 40574  * @see PluginSidebar in @wordpress/editor package.
 13567   }, props));
 40575  */
 13568 }
 40576 function PluginSidebar(props) {
 13569 
 40577   if (!isSiteEditor) {
 13570 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/plugin-sidebar-more-menu-item/index.js
 40578     return null;
 13571 
 40579   }
 13572 
 40580   deprecateSlot('PluginSidebar');
 13573 
 40581   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginSidebar, {
       
 40582     ...props
       
 40583   });
       
 40584 }
       
 40585 
       
 40586 /**
       
 40587  * @see PluginSidebarMoreMenuItem in @wordpress/editor package.
       
 40588  */
       
 40589 function PluginSidebarMoreMenuItem(props) {
       
 40590   if (!isSiteEditor) {
       
 40591     return null;
       
 40592   }
       
 40593   deprecateSlot('PluginSidebarMoreMenuItem');
       
 40594   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginSidebarMoreMenuItem, {
       
 40595     ...props
       
 40596   });
       
 40597 }
       
 40598 /* eslint-enable jsdoc/require-param */
       
 40599 
       
 40600 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/index.js
 13574 /**
 40601 /**
 13575  * WordPress dependencies
 40602  * WordPress dependencies
 13576  */
 40603  */
 13577 
 40604 
 13578 /**
       
 13579  * Renders a menu item in `Plugins` group in `More Menu` drop down,
       
 13580  * and can be used to activate the corresponding `PluginSidebar` component.
       
 13581  * The text within the component appears as the menu item label.
       
 13582  *
       
 13583  * @param {Object}                props                                 Component props.
       
 13584  * @param {string}                props.target                          A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.
       
 13585  * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
       
 13586  *
       
 13587  * @example
       
 13588  * ```js
       
 13589  * // Using ES5 syntax
       
 13590  * var __ = wp.i18n.__;
       
 13591  * var PluginSidebarMoreMenuItem = wp.editSite.PluginSidebarMoreMenuItem;
       
 13592  * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
       
 13593  *
       
 13594  * function MySidebarMoreMenuItem() {
       
 13595  * 	return wp.element.createElement(
       
 13596  * 		PluginSidebarMoreMenuItem,
       
 13597  * 		{
       
 13598  * 			target: 'my-sidebar',
       
 13599  * 			icon: moreIcon,
       
 13600  * 		},
       
 13601  * 		__( 'My sidebar title' )
       
 13602  * 	)
       
 13603  * }
       
 13604  * ```
       
 13605  *
       
 13606  * @example
       
 13607  * ```jsx
       
 13608  * // Using ESNext syntax
       
 13609  * import { __ } from '@wordpress/i18n';
       
 13610  * import { PluginSidebarMoreMenuItem } from '@wordpress/edit-site';
       
 13611  * import { more } from '@wordpress/icons';
       
 13612  *
       
 13613  * const MySidebarMoreMenuItem = () => (
       
 13614  * 	<PluginSidebarMoreMenuItem
       
 13615  * 		target="my-sidebar"
       
 13616  * 		icon={ more }
       
 13617  * 	>
       
 13618  * 		{ __( 'My sidebar title' ) }
       
 13619  * 	</PluginSidebarMoreMenuItem>
       
 13620  * );
       
 13621  * ```
       
 13622  *
       
 13623  * @return {WPComponent} The component to be rendered.
       
 13624  */
       
 13625 
       
 13626 function PluginSidebarMoreMenuItem(props) {
       
 13627   return (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaMoreMenuItem // Menu item is marked with unstable prop for backward compatibility.
       
 13628   // @see https://github.com/WordPress/gutenberg/issues/14457
       
 13629   , extends_extends({
       
 13630     __unstableExplicitMenuItem: true,
       
 13631     scope: "core/edit-site"
       
 13632   }, props));
       
 13633 }
       
 13634 
       
 13635 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/plugin-more-menu-item/index.js
       
 13636 /**
       
 13637  * WordPress dependencies
       
 13638  */
       
 13639 
       
 13640 
       
 13641 
       
 13642 
       
 13643 /**
       
 13644  * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.
       
 13645  * The text within the component appears as the menu item label.
       
 13646  *
       
 13647  * @param {Object}                props                                 Component properties.
       
 13648  * @param {string}                [props.href]                          When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.
       
 13649  * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
       
 13650  * @param {Function}              [props.onClick=noop]                  The callback function to be executed when the user clicks the menu item.
       
 13651  * @param {...*}                  [props.other]                         Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.
       
 13652  *
       
 13653  * @example
       
 13654  * ```js
       
 13655  * // Using ES5 syntax
       
 13656  * var __ = wp.i18n.__;
       
 13657  * var PluginMoreMenuItem = wp.editSite.PluginMoreMenuItem;
       
 13658  * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
       
 13659  *
       
 13660  * function onButtonClick() {
       
 13661  * 	alert( 'Button clicked.' );
       
 13662  * }
       
 13663  *
       
 13664  * function MyButtonMoreMenuItem() {
       
 13665  * 	return wp.element.createElement(
       
 13666  * 		PluginMoreMenuItem,
       
 13667  * 		{
       
 13668  * 			icon: moreIcon,
       
 13669  * 			onClick: onButtonClick,
       
 13670  * 		},
       
 13671  * 		__( 'My button title' )
       
 13672  * 	);
       
 13673  * }
       
 13674  * ```
       
 13675  *
       
 13676  * @example
       
 13677  * ```jsx
       
 13678  * // Using ESNext syntax
       
 13679  * import { __ } from '@wordpress/i18n';
       
 13680  * import { PluginMoreMenuItem } from '@wordpress/edit-site';
       
 13681  * import { more } from '@wordpress/icons';
       
 13682  *
       
 13683  * function onButtonClick() {
       
 13684  * 	alert( 'Button clicked.' );
       
 13685  * }
       
 13686  *
       
 13687  * const MyButtonMoreMenuItem = () => (
       
 13688  * 	<PluginMoreMenuItem
       
 13689  * 		icon={ more }
       
 13690  * 		onClick={ onButtonClick }
       
 13691  * 	>
       
 13692  * 		{ __( 'My button title' ) }
       
 13693  * 	</PluginMoreMenuItem>
       
 13694  * );
       
 13695  * ```
       
 13696  *
       
 13697  * @return {WPComponent} The component to be rendered.
       
 13698  */
       
 13699 
       
 13700 /* harmony default export */ var plugin_more_menu_item = ((0,external_wp_compose_namespaceObject.compose)((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => {
       
 13701   var _ownProps$as;
       
 13702 
       
 13703   return {
       
 13704     as: (_ownProps$as = ownProps.as) !== null && _ownProps$as !== void 0 ? _ownProps$as : external_wp_components_namespaceObject.MenuItem,
       
 13705     icon: ownProps.icon || context.icon,
       
 13706     name: 'core/edit-site/plugin-more-menu'
       
 13707   };
       
 13708 }))(action_item));
       
 13709 
       
 13710 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/index.js
       
 13711 
       
 13712 
       
 13713 /**
       
 13714  * WordPress dependencies
       
 13715  */
       
 13716 
       
 13717 
       
 13718 
 40605 
 13719 
 40606 
 13720 
 40607 
 13721 
 40608 
 13722 
 40609 
 13728  */
 40615  */
 13729 
 40616 
 13730 
 40617 
 13731 
 40618 
 13732 
 40619 
 13733 
       
 13734 
       
 13735 /**
       
 13736  * Reinitializes the editor after the user chooses to reboot the editor after
       
 13737  * an unhandled error occurs, replacing previously mounted editor element using
       
 13738  * an initial state from prior to the crash.
       
 13739  *
       
 13740  * @param {Element} target   DOM node in which editor is rendered.
       
 13741  * @param {?Object} settings Editor settings object.
       
 13742  */
       
 13743 
       
 13744 function reinitializeEditor(target, settings) {
       
 13745   // Display warning if editor wasn't able to resolve homepage template.
       
 13746   if (!settings.__unstableHomeTemplate) {
       
 13747     (0,external_wp_element_namespaceObject.render)((0,external_wp_element_namespaceObject.createElement)(ErrorBoundaryWarning, {
       
 13748       message: (0,external_wp_i18n_namespaceObject.__)('The editor is unable to find a block template for the homepage.'),
       
 13749       dashboardLink: "index.php"
       
 13750     }), target);
       
 13751     return;
       
 13752   } // This will be a no-op if the target doesn't have any React nodes.
       
 13753 
       
 13754 
       
 13755   (0,external_wp_element_namespaceObject.unmountComponentAtNode)(target);
       
 13756   const reboot = reinitializeEditor.bind(null, target, settings); // We dispatch actions and update the store synchronously before rendering
       
 13757   // so that we won't trigger unnecessary re-renders with useEffect.
       
 13758 
       
 13759   {
       
 13760     (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/edit-site', {
       
 13761       editorMode: 'visual',
       
 13762       fixedToolbar: false,
       
 13763       focusMode: false,
       
 13764       keepCaretInsideBlock: false,
       
 13765       welcomeGuide: true,
       
 13766       welcomeGuideStyles: true
       
 13767     });
       
 13768     (0,external_wp_data_namespaceObject.dispatch)(store_store).updateSettings(settings); // Keep the defaultTemplateTypes in the core/editor settings too,
       
 13769     // so that they can be selected with core/editor selectors in any editor.
       
 13770     // This is needed because edit-site doesn't initialize with EditorProvider,
       
 13771     // which internally uses updateEditorSettings as well.
       
 13772 
       
 13773     (0,external_wp_data_namespaceObject.dispatch)(external_wp_editor_namespaceObject.store).updateEditorSettings({
       
 13774       defaultTemplateTypes: settings.defaultTemplateTypes,
       
 13775       defaultTemplatePartAreas: settings.defaultTemplatePartAreas
       
 13776     });
       
 13777     const isLandingOnListPage = getIsListPage((0,external_wp_url_namespaceObject.getQueryArgs)(window.location.href));
       
 13778 
       
 13779     if (isLandingOnListPage) {
       
 13780       // Default the navigation panel to be opened when we're in a bigger
       
 13781       // screen and land in the list screen.
       
 13782       (0,external_wp_data_namespaceObject.dispatch)(store_store).setIsNavigationPanelOpened((0,external_wp_data_namespaceObject.select)(external_wp_viewport_namespaceObject.store).isViewportMatch('medium'));
       
 13783     }
       
 13784   }
       
 13785   (0,external_wp_element_namespaceObject.render)((0,external_wp_element_namespaceObject.createElement)(EditSiteApp, {
       
 13786     reboot: reboot
       
 13787   }), target);
       
 13788 }
       
 13789 /**
 40620 /**
 13790  * Initializes the site editor screen.
 40621  * Initializes the site editor screen.
 13791  *
 40622  *
 13792  * @param {string} id       ID of the root element to render the screen in.
 40623  * @param {string} id       ID of the root element to render the screen in.
 13793  * @param {Object} settings Editor settings.
 40624  * @param {Object} settings Editor settings.
 13794  */
 40625  */
 13795 
 40626 
 13796 function initializeEditor(id, settings) {
 40627 function initializeEditor(id, settings) {
 13797   settings.__experimentalFetchLinkSuggestions = (search, searchOptions) => (0,external_wp_coreData_namespaceObject.__experimentalFetchLinkSuggestions)(search, searchOptions, settings);
       
 13798 
       
 13799   settings.__experimentalFetchRichUrlData = external_wp_coreData_namespaceObject.__experimentalFetchUrlData;
       
 13800   settings.__experimentalSpotlightEntityBlocks = ['core/template-part'];
       
 13801   const target = document.getElementById(id);
 40628   const target = document.getElementById(id);
 13802 
 40629   const root = (0,external_wp_element_namespaceObject.createRoot)(target);
 13803   (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).__experimentalReapplyBlockTypeFilters();
 40630   (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters();
 13804 
 40631   const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(({
 13805   (0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)();
 40632     name
 13806 
 40633   }) => name !== 'core/freeform');
       
 40634   (0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)(coreBlocks);
       
 40635   (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).setFreeformFallbackBlockName('core/html');
       
 40636   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)({
       
 40637     inserter: false
       
 40638   });
       
 40639   (0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)({
       
 40640     inserter: false
       
 40641   });
 13807   if (false) {}
 40642   if (false) {}
 13808 
 40643 
 13809   reinitializeEditor(target, settings);
 40644   // We dispatch actions and update the store synchronously before rendering
 13810 }
 40645   // so that we won't trigger unnecessary re-renders with useEffect.
 13811 
 40646   (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/edit-site', {
 13812 
 40647     welcomeGuide: true,
 13813 
 40648     welcomeGuideStyles: true,
 13814 
 40649     welcomeGuidePage: true,
 13815 
 40650     welcomeGuideTemplate: true
 13816 
 40651   });
 13817 }();
 40652   (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core', {
       
 40653     allowRightClickOverrides: true,
       
 40654     distractionFree: false,
       
 40655     editorMode: 'visual',
       
 40656     fixedToolbar: false,
       
 40657     focusMode: false,
       
 40658     inactivePanels: [],
       
 40659     keepCaretInsideBlock: false,
       
 40660     openPanels: ['post-status'],
       
 40661     showBlockBreadcrumbs: true,
       
 40662     showListViewByDefault: false
       
 40663   });
       
 40664   (0,external_wp_data_namespaceObject.dispatch)(store).updateSettings(settings);
       
 40665 
       
 40666   // Keep the defaultTemplateTypes in the core/editor settings too,
       
 40667   // so that they can be selected with core/editor selectors in any editor.
       
 40668   // This is needed because edit-site doesn't initialize with EditorProvider,
       
 40669   // which internally uses updateEditorSettings as well.
       
 40670   (0,external_wp_data_namespaceObject.dispatch)(external_wp_editor_namespaceObject.store).updateEditorSettings({
       
 40671     defaultTemplateTypes: settings.defaultTemplateTypes,
       
 40672     defaultTemplatePartAreas: settings.defaultTemplatePartAreas
       
 40673   });
       
 40674 
       
 40675   // Prevent the default browser action for files dropped outside of dropzones.
       
 40676   window.addEventListener('dragover', e => e.preventDefault(), false);
       
 40677   window.addEventListener('drop', e => e.preventDefault(), false);
       
 40678   root.render( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(App, {}));
       
 40679   return root;
       
 40680 }
       
 40681 function reinitializeEditor() {
       
 40682   external_wp_deprecated_default()('wp.editSite.reinitializeEditor', {
       
 40683     since: '6.2',
       
 40684     version: '6.3'
       
 40685   });
       
 40686 }
       
 40687 
       
 40688 
       
 40689 
       
 40690 
       
 40691 })();
       
 40692 
 13818 (window.wp = window.wp || {}).editSite = __webpack_exports__;
 40693 (window.wp = window.wp || {}).editSite = __webpack_exports__;
 13819 /******/ })()
 40694 /******/ })()
 13820 ;
 40695 ;